Exemplo n.º 1
0
        public string GetUpdateProfilBackgroundImageQuery(IAccountUpdateProfileBackgroundImageParameters parameters)
        {
            var query = new StringBuilder(Resources.Account_UpdateProfileBackgroundImage);

            if (parameters.Binary == null)
            {
                query.AddParameterToQuery("media_id", parameters.MediaId);
            }

            query.AddParameterToQuery("tile", parameters.UseTileMode);
            query.AddParameterToQuery("include_entities", parameters.IncludeEntities);
            query.AddParameterToQuery("skip_status", parameters.SkipStatus);

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);

            return(query.ToString());
        }
Exemplo n.º 2
0
        public bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
        {
            var query = _accountQueryGenerator.GetUpdateProfilBackgroundImageQuery(parameters);

            if (parameters.Binary != null)
            {
                return(_twitterAccessor.TryExecuteMultipartQuery(new MultipartHttpRequestParameters
                {
                    Query = query,
                    HttpMethod = HttpMethod.POST,
                    Binaries = new [] { parameters.Binary },
                    ContentId = "image",
                    Timeout = parameters.Timeout
                }));
            }

            return(_twitterAccessor.TryExecutePOSTQuery(query));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Updates the authenticated user’s profile background image. 
 /// </summary>
 public static bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
 {
     return AccountController.UpdateProfileBackgroundImage(parameters);
 }
Exemplo n.º 4
0
 public bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
 {
     return _accountQueryExecutor.UpdateProfileBackgroundImage(parameters);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Updates the authenticated user’s profile background image.
 /// </summary>
 public static bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
 {
     return(AccountController.UpdateProfileBackgroundImage(parameters));
 }
Exemplo n.º 6
0
 public bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
 {
     return(_accountQueryExecutor.UpdateProfileBackgroundImage(parameters));
 }
Exemplo n.º 7
0
        public bool UpdateProfileBackgroundImage(IAccountUpdateProfileBackgroundImageParameters parameters)
        {
            var query = _accountQueryGenerator.GetUpdateProfilBackgroundImageQuery(parameters);

            if (parameters.Binary != null)
            {
                return _twitterAccessor.TryExecuteMultipartQuery(new MultipartHttpRequestParameters
                {
                    Query = query,
                    HttpMethod = HttpMethod.POST,
                    Binaries = new [] { parameters.Binary },
                    ContentId = "image",
                    Timeout = parameters.Timeout
                });
            }

            return _twitterAccessor.TryExecutePOSTQuery(query);
        }
        public string GetUpdateProfilBackgroundImageQuery(IAccountUpdateProfileBackgroundImageParameters parameters)
        {
            var query = new StringBuilder(Resources.Account_UpdateProfileBackgroundImage);

            if (parameters.Binary == null)
            {
                query.AddParameterToQuery("media_id", parameters.MediaId);
            }

            query.AddParameterToQuery("tile", parameters.UseTileMode);
            query.AddParameterToQuery("include_entities", parameters.IncludeEntities);
            query.AddParameterToQuery("skip_status", parameters.SkipStatus);

            query.AddFormattedParameterToQuery(parameters.FormattedCustomQueryParameters);

            return query.ToString();
        }