/// <summary>
        /// Inits this instance.
        /// </summary>
        public override void Init()
        {
            this.RequestParameters.Add("include_entities", "true");

            BlockingOptions options = this.OptionalProperties as BlockingOptions;

            if (options == null || options.Page <= 0)
            {
                this.RequestParameters.Add("page", "1");
            }
            else
            {
                this.RequestParameters.Add("page", options.Page.ToString(CultureInfo.CurrentCulture));
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockingCommand"/> class.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 public BlockingCommand(OAuthTokens tokens, BlockingOptions options) :
     base(HTTPVerb.GET, "blocks/blocking.json", tokens, options)
 {
 }
Пример #3
0
 /// <summary>
 /// Returns a collection of user objects that the authenticating user is blocking.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static TwitterResponse<TwitterUserCollection> Blocking(OAuthTokens tokens, BlockingOptions options)
 {
     Commands.BlockingCommand command = new Commands.BlockingCommand(tokens, options);
     return Core.CommandPerformer<TwitterUserCollection>.PerformAction(command);
 }
Пример #4
0
 /// <summary>
 /// Returns a collection of user objects that the authenticating user is blocking.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static TwitterResponse <TwitterUserCollection> Blocking(OAuthTokens tokens, BlockingOptions options)
 {
     Commands.BlockingCommand command = new Commands.BlockingCommand(tokens, options);
     return(Core.CommandPerformer.PerformAction(command));
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockingCommand"/> class.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 public BlockingCommand(OAuthTokens tokens, BlockingOptions options) :
     base(HttpMethod.Get, "blocks/blocking.json", tokens, options)
 {
 }