public async Task <UserToken> AuthenticateUserAsync(string username, string password) { var response = await _clientFactory.CreateClient().LoginAsync(new LoginModel { Name = username, Password = password }); //var result = await response.Stream.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <UserToken>(response.ToString())); }
public Task <User> CreateUserGroupAsync(int userId, int groupId) { return(_clientFactory.CreateClient().PostUserGroupAsync(new UserGroup { UserId = userId, GroupId = groupId })); }
public Task <Report> CreateReportAsync(AddReportModel report) { return(_clientFactory.CreateClient().PostAsync(report)); }
public Task <Category> CreateCategoryAsync(Category category) { return(_clientFactory.CreateClient().PostAsync(category)); }
public Task <ShoppingList> CreateShoppingListAsync(ShoppingList shoppingList, int groupId) { return(_clientFactory.CreateClient().PostAsync(shoppingList, groupId)); }
public Task <Expense> CreateExpenseAsync(AddExpenseModel expense) { return(_clientFactory.CreateClient().PostAsync(expense)); }
public Task <Group> CreateGroupAsync(Group group) { return(_clientFactory.CreateClient().PostAsync(group)); }