/// <summary>
        /// Initializes the command.
        /// </summary>
        public override void Init()
        {
            if (!String.IsNullOrEmpty(screenname))
            {
                this.RequestParameters.Add("screen_name", screenname);
            }

            if (userid > 0)
            {
                this.RequestParameters.Add("user_id", userid.ToString("#"));
            }

            ListMembershipsOptions options = this.OptionalProperties as ListMembershipsOptions;

            if (options != null)
            {
                if (options.Cursor <= 0)
                {
                    this.RequestParameters.Add("cursor", "-1");
                }
                else
                {
                    this.RequestParameters.Add("cursor", options.Cursor.ToString(CultureInfo.CurrentCulture));
                }

                if (options.FilterToOwnedLists)
                {
                    this.RequestParameters.Add("filter_to_owned_lists", "true");
                }
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListMembershipsCommand"/> class.
        /// </summary>
        /// <param name="requestTokens">The request tokens.</param>
        /// <param name="userid">The screenname.</param>
        /// <param name="options">The options.</param>
        public ListMembershipsCommand(OAuthTokens requestTokens, decimal userid, ListMembershipsOptions options)
            : base(
                HTTPVerb.GET,
                "lists/memberships.json",
                requestTokens,
                options)
        {
            if (userid <= 0)
            {
                throw new ArgumentNullException("userid");
            }

            if (Tokens == null)
            {
                throw new ArgumentNullException("requestTokens");
            }

            this.DeserializationHandler = TwitterListCollection.Deserialize;
            this.userid = userid;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListMembershipsCommand"/> class.
        /// </summary>
        /// <param name="requestTokens">The request tokens.</param>
        /// <param name="screenname">The screenname.</param>
        /// <param name="options">The options.</param>
        public ListMembershipsCommand(OAuthTokens requestTokens, string screenname, ListMembershipsOptions options)
            : base(
                HTTPVerb.GET,
                "lists/memberships.json",
                requestTokens,
                options)
        {
            if (string.IsNullOrEmpty(screenname))
            {
                throw new ArgumentNullException("screenname");
            }

            if (Tokens == null)
            {
                throw new ArgumentNullException("requestTokens");
            }

            this.DeserializationHandler = TwitterListCollection.Deserialize;
            this.screenname             = screenname;
        }