/// <summary> /// Initializes the command. /// </summary> public override void Init() { if (!string.IsNullOrEmpty(id)) { this.RequestParameters.Add("list_id", id); } UpdateListOptions options = this.OptionalProperties as UpdateListOptions; if (options == null) { return; } if (!string.IsNullOrEmpty(options.Name)) { this.RequestParameters.Add("name", options.Name); } if (options.IsPublic != null) { this.RequestParameters.Add("mode", options.IsPublic.Value ? "public" : "private"); } if (!string.IsNullOrEmpty(options.Description)) { this.RequestParameters.Add("description", options.Description); } }
/// <summary> /// Initializes a new instance of the <see cref="UpdateListCommand"/> class. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="id">The id.</param> /// <param name="options">The options.</param> /// <remarks></remarks> public UpdateListCommand(OAuthTokens tokens, string id, UpdateListOptions options) : base( HttpMethod.Post, "lists/update.json", tokens, options) { if (tokens == null) { throw new ArgumentNullException("tokens"); } if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } this.id = id; }