/// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageData">The image data.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static IAsyncResult UpdateProfileBackgroundImage(OAuthTokens tokens, byte[] imageData, TimeSpan timeout, Action <TwitterAsyncResponse <TwitterUser> > function, UpdateProfileBackgroundImageOptions options = null)
 {
     return(AsyncUtility.ExecuteAsyncMethod(tokens, imageData, options, timeout, TwitterAccount.UpdateProfileBackgroundImage, function));
 }
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="fileLocation">The file location.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static IAsyncResult UpdateProfileBackgroundImage(OAuthTokens tokens, string fileLocation, TimeSpan timeout, Action <TwitterAsyncResponse <TwitterUser> > function, UpdateProfileBackgroundImageOptions options = null)
 {
     return(UpdateProfileBackgroundImage(tokens, System.IO.File.ReadAllBytes(fileLocation), timeout, function, options));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageData">The image data.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static IAsyncResult UpdateProfileBackgroundImage(OAuthTokens tokens, byte[] imageData, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function, UpdateProfileBackgroundImageOptions options = null)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, imageData, options, timeout, TwitterAccount.UpdateProfileBackgroundImage, function);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="fileLocation">The file location.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static IAsyncResult UpdateProfileBackgroundImage(OAuthTokens tokens, string fileLocation, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function, UpdateProfileBackgroundImageOptions options = null)
 {
     return UpdateProfileBackgroundImage(tokens, System.IO.File.ReadAllBytes(fileLocation), timeout, function, options);
 }
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageLocation">The image location.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static TwitterResponse <TwitterUser> UpdateProfileBackgroundImage(OAuthTokens tokens, string imageLocation, UpdateProfileBackgroundImageOptions options = null)
 {
     return(UpdateProfileBackgroundImage(tokens, System.IO.File.ReadAllBytes(imageLocation), options));
 }
        /// <summary>
        /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="imageData">The image data.</param>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        public static TwitterResponse <TwitterUser> UpdateProfileBackgroundImage(OAuthTokens tokens, byte[] imageData = null, UpdateProfileBackgroundImageOptions options = null)
        {
            if (imageData == null && options == null)
            {
                throw new System.ArgumentNullException("imageData", "You must provide image data or indicate you wish to not use any image in the options argument.");
            }

            Commands.UpdateProfileBackgroundImageCommand command = new Twitterizer.Commands.UpdateProfileBackgroundImageCommand(tokens, imageData, options);

            return(CommandPerformer.PerformAction(command));
        }
Exemplo n.º 7
0
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageLocation">The image location.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static TwitterResponse<TwitterUser> UpdateProfileBackgroundImage(OAuthTokens tokens, string imageLocation, UpdateProfileBackgroundImageOptions options)
 {
     return UpdateProfileBackgroundImage(tokens, System.IO.File.ReadAllBytes(imageLocation), options);
 }
Exemplo n.º 8
0
        /// <summary>
        /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="imageData">The image data.</param>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        public static TwitterResponse<TwitterUser> UpdateProfileBackgroundImage(OAuthTokens tokens, byte[] imageData, UpdateProfileBackgroundImageOptions options)
        {
            if (imageData == null && options == null)
            {
                throw new System.ArgumentNullException("imageData", "You must provide image data or indicate you wish to not use any image in the options argument.");
            }

            Commands.UpdateProfileBackgroundImageCommand command = new Twitterizer.Commands.UpdateProfileBackgroundImageCommand(tokens, imageData, options);

            return CommandPerformer.PerformAction(command);
        }
Exemplo n.º 9
0
 /// <summary>
 /// Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageData">The image data.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static async Task<TwitterResponse<User>> UpdateProfileBackgroundImageAsync(OAuthTokens tokens, byte[] imageData = null, UpdateProfileBackgroundImageOptions options = null)
 {
     if (imageData == null && options == null)
     {
         throw new System.ArgumentNullException("imageData", "You must provide image data or indicate you wish to not use any image in the options argument.");
     }
     return await Core.CommandPerformer.PerformAction(new Twitterizer.Commands.UpdateProfileBackgroundImageCommand(tokens, imageData, options));
 }