Beispiel #1
0
        public static Task <AuthenticationResult> GetToken(this IRestaurantApi This, string email, string password)
        {
            var dict = new Dictionary <string, string>
            {
                { "grant_type", "password" },
                { "username", email },
                { "password", password }
            };

            return(This.GetTokenRaw(dict));
        }
Beispiel #2
0
        public static Task <object> Regester(this IRestaurantApi This, string name, string email, string password, string confirmPassword)
        {
            var dict = new Dictionary <string, string>
            {
                { "Name", name },
                { "Email", email },
                { "Password", password },
                { "ConfirmPassword", confirmPassword }
            };

            return(This.RegesterRaw(dict));
        }
Beispiel #3
0
 public FoodRepository(IRestaurantApi api)
 {
     _api = api;
 }
Beispiel #4
0
 public UserRepository(IRestaurantApi api)
 {
     _api = api;
 }
Beispiel #5
0
 public static Task <List <Food> > GetFoods(this IRestaurantApi This)
 {
     return(This.GetFoods());
 }
Beispiel #6
0
 public static Task <UserInfo> GetUserInfo(this IRestaurantApi This)
 {
     return(This.GetUserInfoRaw());
 }
Beispiel #7
0
 public static Task <object> Values(this IRestaurantApi This)
 {
     return(This.GetValues());
 }