Exemple #1
0
        /// <summary>
        /// Inits this instance.
        /// </summary>
        public override void Init()
        {
            RetweetedByOptions options = this.OptionalProperties as RetweetedByOptions;

            if (options == null)
            {
                this.RequestParameters.Add("page", "1");
                return;
            }

            if (options.Count > 1)
            {
                this.RequestParameters.Add("count", options.Count.ToString());
            }

            if (options.IncludeEntities)
            {
                this.RequestParameters.Add("include_entities", "true");
            }

            if (options.TrimUser)
            {
                this.RequestParameters.Add("trim_user", "true");
            }

            if (options.Page > 0)
            {
                this.RequestParameters.Add("page", options.Page.ToString());
            }
        }
Exemple #2
0
        public RetweetedByCommand(OAuthTokens tokens, decimal statusId, RetweetedByOptions options)
            : base(HTTPVerb.GET, string.Format("statuses/{0}/retweeted_by.json", statusId), tokens, options)
        {
            if (tokens == null)
            {
                throw new ArgumentNullException("tokens");
            }

            if (statusId <= 0)
            {
                throw new ArgumentNullException("statusId", "Status ID is required.");
            }
        }