public ITweetList UpdateList(string slug, IUser owner, IListUpdateParameters parameters) { if (owner == null) { throw new ArgumentException("Owner cannot be null"); } return(UpdateList(slug, owner.UserDTO, parameters)); }
public bool Update(IListUpdateParameters parameters) { var updateList = _tweetListController.UpdateList(_tweetListDTO, parameters); if (updateList != null) { _tweetListDTO = updateList.TweetListDTO; return(true); } return(false); }
public string GetUpdateListQuery(IListIdentifier identifier, IListUpdateParameters parameters) { if (!_listsQueryValidator.IsListIdentifierValid(identifier) || !_listsQueryValidator.IsListUpdateParametersValid(parameters)) { return(null); } var listIdentifierParameter = _tweetListQueryParameterGenerator.GenerateIdentifierParameter(identifier); var updateQueryParameters = GenerateUpdateAdditionalParameters(parameters); var queryParameters = String.Format("{0}{1}", listIdentifierParameter, updateQueryParameters); return(String.Format(Resources.List_Update, queryParameters)); }
private string GenerateUpdateAdditionalParameters(IListUpdateParameters parameters) { string privacyModeParameter = String.Format(Resources.List_PrivacyModeParameter, parameters.PrivacyMode.ToString().ToLower()); StringBuilder queryParameterBuilder = new StringBuilder(privacyModeParameter); if (_listsQueryValidator.IsDescriptionParameterValid(parameters.Description)) { string descriptionParameter = String.Format(Resources.List_DescriptionParameter, parameters.Description); queryParameterBuilder.Append(descriptionParameter); } if (_listsQueryValidator.IsNameParameterValid(parameters.Name)) { string nameParameter = String.Format(Resources.List_NameParameter, parameters.Name); queryParameterBuilder.Append(nameParameter); } return(queryParameterBuilder.ToString()); }
// Update List public ITweetListDTO UpdateList(IListIdentifier identifier, IListUpdateParameters parameters) { string query = _listsQueryGenerator.GetUpdateListQuery(identifier, parameters); return(_twitterAccessor.ExecutePOSTQuery <ITweetListDTO>(query)); }
public static async Task <ITweetList> UpdateList(string slug, IUserIdentifier ownerDTO, IListUpdateParameters parameters) { return(await Sync.ExecuteTaskAsync(() => TweetList.UpdateList(slug, ownerDTO, parameters))); }
public static async Task <ITweetList> UpdateList(long listId, IListUpdateParameters parameters) { return(await Sync.ExecuteTaskAsync(() => TweetList.UpdateList(listId, parameters))); }
public ITweetList UpdateList(string slug, string ownerScreenName, IListUpdateParameters parameters) { var identifier = _listIdentifierFactory.Create(slug, ownerScreenName); return(UpdateList(identifier, parameters)); }
public static ITweetList UpdateList(string slug, long ownerId, IListUpdateParameters parameters) { return(TweetListController.UpdateList(slug, ownerId, parameters)); }
public static ITweetList UpdateList(long listId, IListUpdateParameters parameters) { return(TweetListController.UpdateList(listId, parameters)); }
public ITweetList UpdateList(string slug, IUserIdDTO ownerDTO, IListUpdateParameters parameters) { var identifier = _listIdentifierFactory.Create(slug, ownerDTO); return(UpdateList(identifier, parameters)); }
public ITweetList UpdateList(long listId, IListUpdateParameters parameters) { var identifier = _listIdentifierFactory.Create(listId); return(UpdateList(identifier, parameters)); }
public ITweetList UpdateList(ITweetListDTO tweetListDTO, IListUpdateParameters parameters) { var identifier = _listIdentifierFactory.Create(tweetListDTO); return(UpdateList(identifier, parameters)); }
// Update List public ITweetList UpdateList(ITweetList tweetList, IListUpdateParameters parameters) { return(UpdateList(tweetList.TweetListDTO, parameters)); }
public ITweetList UpdateList(IListIdentifier identifier, IListUpdateParameters parameters) { var tweetListDTO = _listsQueryExecutor.UpdateList(identifier, parameters); return(_listsFactory.GenerateTweetListFromDTO(tweetListDTO)); }
public bool IsListUpdateParametersValid(IListUpdateParameters parameters) { return(parameters != null); }
public static ITweetList UpdateList(ITweetListDTO tweetListDTO, IListUpdateParameters parameters) { return(TweetListController.UpdateList(tweetListDTO, parameters)); }
public static async Task <ITweetList> UpdateList(string slug, string ownerScreenName, IListUpdateParameters parameters) { return(await Sync.ExecuteTaskAsync(() => TweetList.UpdateList(slug, ownerScreenName, parameters))); }
public static ITweetList UpdateList(string slug, IUserIdDTO ownerDTO, IListUpdateParameters parameters) { return(TweetListController.UpdateList(slug, ownerDTO, parameters)); }
public static async Task <ITweetList> UpdateList(ITweetListDTO tweetListDTO, IListUpdateParameters parameters) { return(await Sync.ExecuteTaskAsync(() => TweetList.UpdateList(tweetListDTO, parameters))); }
public static ITweetList UpdateList(string slug, string ownerScreenName, IListUpdateParameters parameters) { return(TweetListController.UpdateList(slug, ownerScreenName, parameters)); }
public async Task <bool> UpdateAsync(IListUpdateParameters parameters) { return(await _taskFactory.ExecuteTaskAsync(() => Update(parameters))); }