public Task <ITwitterResult <IRelationshipDetailsDTO> > UpdateRelationship(IUpdateRelationshipParameters parameters, ITwitterRequest request) { var query = _userQueryGenerator.GetUpdateRelationshipQuery(parameters); request.Query.Url = query; request.Query.HttpMethod = HttpMethod.POST; return(_twitterAccessor.ExecuteRequest <IRelationshipDetailsDTO>(request)); }
public void Validate(IUpdateRelationshipParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } _userQueryValidator.ThrowIfUserCannotBeIdentified(parameters.User, $"{nameof(parameters.User)}"); }
public string GetUpdateRelationshipQuery(IUpdateRelationshipParameters parameters) { var query = new StringBuilder(Resources.Friendship_Update); query.AddFormattedParameterToQuery(_userQueryParameterGenerator.GenerateIdOrScreenNameParameter(parameters.User)); query.AddParameterToQuery("device", parameters.EnableDeviceNotifications); query.AddParameterToQuery("retweets", parameters.EnableRetweets); query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters); return(query.ToString()); }
public void Validate(IUpdateRelationshipParameters parameters) { _usersClientParametersValidator.Validate(parameters); }
// Friendships public Task UpdateRelationship(IUpdateRelationshipParameters parameters) { return(Client.Users.UpdateRelationship(parameters)); }
public async Task UpdateRelationship(IUpdateRelationshipParameters parameters) { await _usersRequester.UpdateRelationship(parameters).ConfigureAwait(false); }
public Task <ITwitterResult <IRelationshipDetailsDTO> > UpdateRelationship(IUpdateRelationshipParameters parameters) { _validator.Validate(parameters); return(ExecuteRequest(request => _userController.UpdateRelationship(parameters, request))); }
public Task <ITwitterResult <IRelationshipDetailsDTO> > UpdateRelationship(IUpdateRelationshipParameters parameters, ITwitterRequest request) { return(_userQueryExecutor.UpdateRelationship(parameters, request)); }
public UpdateRelationshipParameters(IUpdateRelationshipParameters source) : base(source) { User = source?.User; EnableRetweets = source?.EnableRetweets; EnableDeviceNotifications = source?.EnableDeviceNotifications; }