예제 #1
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.comments.get
        /// </summary>
        public Data.CommentList GetById(string videoId, string parentId, int?page, int?perPage, Data.CommentListSortType?sort)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("video_id", videoId);
            if (!string.IsNullOrEmpty(parentId))
            {
                parameters.Add("parent_id", parentId);
            }
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }
            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.Comments.Get, Data.CommentList>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.setDetails
        /// </summary>
        public Data.Video SetDetails(
            string videoId, string title, string description, int?ageLimit, string tags, bool?viewResetSecret, int?thumbnailIndex,
            Data.PermissionLevel?viewPermission, Data.PermissionLevel?embedPermission,
            Data.PermissionLevel?commentingPermission, Data.PermissionLevel?downloadPermission,
            Data.PermissionLevel?taggingPermission, Data.CommentsModerationLevel?commentsModerationLevel)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("video_id", videoId);
            if (!string.IsNullOrEmpty(title))
            {
                parameters.Add("title", title);
            }
            if (description != null)
            {
                parameters.Add("description", description);
            }
            if (ageLimit.HasValue)
            {
                parameters.Add("age_limit", ageLimit.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (thumbnailIndex.HasValue)
            {
                parameters.Add("thumbnail_index", thumbnailIndex.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (viewResetSecret.HasValue)
            {
                parameters.Add("view_reset_secret", viewResetSecret.Value ? "1" : "0");
            }
            if (tags != null)
            {
                parameters.Add("tags", tags);
            }
            if (viewPermission.HasValue)
            {
                parameters.Add("view_perm", ViddlerHelper.GetEnumName(viewPermission.Value.GetType().GetField(viewPermission.Value.ToString())));
            }
            if (embedPermission.HasValue)
            {
                parameters.Add("embed_perm", ViddlerHelper.GetEnumName(embedPermission.Value.GetType().GetField(embedPermission.Value.ToString())));
            }
            if (commentingPermission.HasValue)
            {
                parameters.Add("commenting_perm", ViddlerHelper.GetEnumName(commentingPermission.Value.GetType().GetField(commentingPermission.Value.ToString())));
            }
            if (downloadPermission.HasValue)
            {
                parameters.Add("download_perm", ViddlerHelper.GetEnumName(downloadPermission.Value.GetType().GetField(downloadPermission.Value.ToString())));
            }
            if (taggingPermission.HasValue)
            {
                parameters.Add("tagging_perm", ViddlerHelper.GetEnumName(taggingPermission.Value.GetType().GetField(taggingPermission.Value.ToString())));
            }
            if (commentsModerationLevel.HasValue)
            {
                parameters.Add("comments_moderation_level", ViddlerHelper.GetEnumName(commentsModerationLevel.Value.GetType().GetField(commentsModerationLevel.Value.ToString())));
            }

            return(this.Service.ExecuteHttpRequest <Videos.SetDetails, Data.Video>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.getByTag
        /// </summary>
        public Data.VideoList GetByTag(string tag, bool?status, int?page, int?perPage, Data.VideoListSortType?sort, bool?idOnly)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("tag", tag);
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }
            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (status.HasValue)
            {
                parameters.Add("status", status.Value ? "1" : "0");
            }
            if (idOnly.HasValue)
            {
                parameters.Add("id_only", idOnly.Value ? "1" : "0");
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.GetByTag, Data.VideoList>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.search
        /// </summary>
        public Data.VideoList SearchAllVideos(string query, int?page, int?perPage, Data.VideoListSortType?sort)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("type", "allvideos");
            parameters.Add("query", query);
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }
            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.Search, Data.VideoList>(parameters));
        }
예제 #5
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.moderation.setCommentStatus
        /// </summary>
        public Data.Comment SetCommentStatus(string commentId, Data.CommentsModerationStatus status)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("comment_id", commentId);
            parameters.Add("status", ViddlerHelper.GetEnumName(status.GetType().GetField(status.ToString())));

            return(this.Service.ExecuteHttpRequest <Moderation.SetCommentStatus, Data.Comment>(parameters));
        }
예제 #6
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.playlists.setDetails
        /// </summary>
        public Data.PlaylistVideoList SetDetails(
            string playlistId, string name, Data.PlaylistVisibilityType?visibility, string videoIds,
            string users, int?maxAge, string tags, int?min_views, int?max_views, DateTime?min_upload_date,
            DateTime?max_upload_date, Data.VideoListSortType?sort)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("playlist_id", playlistId);
            if (!string.IsNullOrEmpty(name))
            {
                parameters.Add("name", name);
            }
            if (visibility.HasValue)
            {
                parameters.Add("visibility", ViddlerHelper.GetEnumName(visibility.Value.GetType().GetField(visibility.Value.ToString())));
            }
            if (videoIds != null)
            {
                parameters.Add("video_ids", videoIds);
            }
            if (users != null)
            {
                parameters.Add("users", users);
            }
            if (maxAge.HasValue)
            {
                parameters.Add("max_age", maxAge.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (tags != null)
            {
                parameters.Add("tags", tags);
            }
            if (min_views.HasValue)
            {
                parameters.Add("min_views", min_views.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (max_views.HasValue)
            {
                parameters.Add("max_views", max_views.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (min_upload_date.HasValue)
            {
                parameters.Add("min_upload_date", min_upload_date.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            }
            if (max_upload_date.HasValue)
            {
                parameters.Add("max_upload_date", max_upload_date.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            }
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }

            return(this.Service.ExecuteHttpRequest <Playlists.SetDetails, Data.PlaylistVideoList>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.setDetails
        /// </summary>
        public bool SetDetailsForMany(
            string videoIds, bool?viewResetSecret, int?thumbnailIndex,
            Data.PermissionLevel?viewPermission, Data.PermissionLevel?embedPermission,
            Data.PermissionLevel?commentingPermission, Data.PermissionLevel?downloadPermission,
            Data.PermissionLevel?taggingPermission)
        {
            StringDictionary parameters = new StringDictionary();

            if (string.IsNullOrEmpty(videoIds) || videoIds.IndexOf(',') == -1)
            {
                parameters.Add("video_id", string.Concat(videoIds, ",", videoIds));
            }
            else
            {
                parameters.Add("video_id", videoIds);
            }
            if (thumbnailIndex.HasValue)
            {
                parameters.Add("thumbnail_index", thumbnailIndex.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (viewResetSecret.HasValue)
            {
                parameters.Add("view_reset_secret", viewResetSecret.Value ? "1" : "0");
            }
            if (viewPermission.HasValue)
            {
                parameters.Add("view_perm", ViddlerHelper.GetEnumName(viewPermission.Value.GetType().GetField(viewPermission.Value.ToString())));
            }
            if (embedPermission.HasValue)
            {
                parameters.Add("embed_perm", ViddlerHelper.GetEnumName(embedPermission.Value.GetType().GetField(embedPermission.Value.ToString())));
            }
            if (commentingPermission.HasValue)
            {
                parameters.Add("commenting_perm", ViddlerHelper.GetEnumName(commentingPermission.Value.GetType().GetField(commentingPermission.Value.ToString())));
            }
            if (downloadPermission.HasValue)
            {
                parameters.Add("download_perm", ViddlerHelper.GetEnumName(downloadPermission.Value.GetType().GetField(downloadPermission.Value.ToString())));
            }
            if (taggingPermission.HasValue)
            {
                parameters.Add("tagging_perm", ViddlerHelper.GetEnumName(taggingPermission.Value.GetType().GetField(taggingPermission.Value.ToString())));
            }

            ViddlerResponseSuccess responseObject = this.Service.ExecuteHttpRequest <Videos.SetDetailsForMany, ViddlerResponseSuccess>(parameters);

            return(responseObject != null && responseObject.IsSuccess);
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.getEmbedCode
        /// </summary>
        public Data.VideoEmbedCode GetEmbedCode(string videoId, int?width, int?height, Data.PlayerType?playerType,
                                                Data.PlayerWindowMode?wmode, bool?autoplay, bool?branding, int?offset, int?embedCodeType, string flashvar)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("video_id", videoId);
            if (width.HasValue)
            {
                parameters.Add("width", width.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (height.HasValue)
            {
                parameters.Add("height", height.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (playerType.HasValue)
            {
                parameters.Add("player_type", ViddlerHelper.GetEnumName(playerType.Value.GetType().GetField(playerType.Value.ToString())));
            }
            if (wmode.HasValue)
            {
                parameters.Add("wmode", ViddlerHelper.GetEnumName(wmode.Value.GetType().GetField(wmode.Value.ToString())));
            }
            if (autoplay.HasValue)
            {
                parameters.Add("autoplay", autoplay.Value ? "1" : "0");
            }
            if (branding.HasValue)
            {
                parameters.Add("branding", branding.Value ? "1" : "0");
            }
            if (offset.HasValue)
            {
                parameters.Add("offset", offset.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (embedCodeType.HasValue)
            {
                parameters.Add("embed_code_type", embedCodeType.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (!string.IsNullOrEmpty(flashvar))
            {
                parameters.Add("flashvar", flashvar);
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.GetEmbedCode, Data.VideoEmbedCode>(parameters));
        }
예제 #9
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.moderation.getComments
        /// </summary>
        public Data.CommentsModerationList GetComments(int?page, int?perPage, Data.CommentListSortType?sort)
        {
            StringDictionary parameters = new StringDictionary();

            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }

            return(this.Service.ExecuteHttpRequest <Moderation.GetComments, Data.CommentsModerationList>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.getByUser
        /// </summary>
        public Data.VideoList GetByUser(string userName, string tags, bool?status, Data.PermissionLevel?visibility, int?page, int?perPage, Data.VideoListSortType?sort, bool?idOnly)
        {
            StringDictionary parameters = new StringDictionary();

            if (!string.IsNullOrEmpty(userName))
            {
                parameters.Add("user", userName);
            }
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }
            if (visibility.HasValue)
            {
                parameters.Add("visibility", ViddlerHelper.GetEnumName(visibility.Value.GetType().GetField(visibility.Value.ToString())));
            }
            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (status.HasValue)
            {
                parameters.Add("status", status.Value ? "1" : "0");
            }
            if (idOnly.HasValue)
            {
                parameters.Add("id_only", idOnly.Value ? "1" : "0");
            }
            if (!string.IsNullOrEmpty(tags))
            {
                parameters.Add("tags", tags);
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.GetByUser, Data.VideoList>(parameters));
        }
        /// <summary>
        /// Calls the remote Viddler API method: viddler.videos.search
        /// </summary>
        public Data.VideoList SearchYourVideos(string query, DateTime?minUploadDate, DateTime?maxUploadDate, int?maxAge, int?page, int?perPage, Data.VideoListSortType?sort)
        {
            StringDictionary parameters = new StringDictionary();

            parameters.Add("type", "yourvideos");
            parameters.Add("query", query);
            if (minUploadDate.HasValue)
            {
                parameters.Add("min_upload_date", minUploadDate.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            }
            if (maxUploadDate.HasValue)
            {
                parameters.Add("max_upload_date", maxUploadDate.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
            }
            if (maxAge.HasValue)
            {
                parameters.Add("max_age", maxAge.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (sort.HasValue)
            {
                parameters.Add("sort", ViddlerHelper.GetEnumName(sort.Value.GetType().GetField(sort.Value.ToString())));
            }
            if (page.HasValue)
            {
                parameters.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (perPage.HasValue)
            {
                parameters.Add("per_page", perPage.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (this.Service.IsAuthenticated)
            {
                parameters.Add("sessionid", this.Service.SessionId);
            }

            return(this.Service.ExecuteHttpRequest <Videos.Search, Data.VideoList>(parameters));
        }
예제 #12
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.users.setPlayerBranding
        /// </summary>
        public Data.PlayerBranding SetPlayerBranding(string logoUrl, string logoClickUrl, int?logoOffsetX, int?logoOffsetY,
                                                     Data.ImageAlignmentType?logoAlign, bool?logoVisible, bool?shadeDark, bool?enableStirpes, string simpleColor,
                                                     string controlBar, string bHover, string bIdle, string bClicked, string pIdle, string pHover, string pClicked,
                                                     string timePlayed, string timeLoaded, string timeBackground)
        {
            StringDictionary parameters = new StringDictionary();

            if (logoUrl != null)
            {
                parameters.Add("logo_url", logoUrl);
            }
            if (logoClickUrl != null)
            {
                parameters.Add("logo_click_url", logoClickUrl);
            }
            if (logoOffsetX.HasValue)
            {
                parameters.Add("logo_offset_x", logoOffsetX.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (logoOffsetY.HasValue)
            {
                parameters.Add("logo_offset_y", logoOffsetY.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (logoAlign.HasValue)
            {
                parameters.Add("logo_align", ViddlerHelper.GetEnumName(logoAlign.Value.GetType().GetField(logoAlign.Value.ToString())));
            }
            if (logoVisible.HasValue)
            {
                parameters.Add("logo_visible", logoVisible.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (shadeDark.HasValue)
            {
                parameters.Add("shade_dark", shadeDark.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (enableStirpes.HasValue)
            {
                parameters.Add("enable_stirpes", enableStirpes.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (!string.IsNullOrEmpty(simpleColor))
            {
                parameters.Add("simple_color", simpleColor);
            }
            if (!string.IsNullOrEmpty(controlBar))
            {
                parameters.Add("control_bar", controlBar);
            }
            if (!string.IsNullOrEmpty(bHover))
            {
                parameters.Add("bhover", bHover);
            }
            if (!string.IsNullOrEmpty(bIdle))
            {
                parameters.Add("bidle", bIdle);
            }
            if (!string.IsNullOrEmpty(bClicked))
            {
                parameters.Add("bclicked", bClicked);
            }
            if (!string.IsNullOrEmpty(pIdle))
            {
                parameters.Add("pidle", pIdle);
            }
            if (!string.IsNullOrEmpty(pHover))
            {
                parameters.Add("phover", pHover);
            }
            if (!string.IsNullOrEmpty(pClicked))
            {
                parameters.Add("pclicked", pClicked);
            }
            if (!string.IsNullOrEmpty(timePlayed))
            {
                parameters.Add("timeplayed", timePlayed);
            }
            if (!string.IsNullOrEmpty(timeLoaded))
            {
                parameters.Add("timeloaded", timeLoaded);
            }
            if (!string.IsNullOrEmpty(timeBackground))
            {
                parameters.Add("timebackground", timeBackground);
            }

            return(this.Service.ExecuteHttpRequest <Users.SetPlayerBranding, Data.PlayerBranding>(parameters));
        }
예제 #13
0
        /// <summary>
        /// Calls the remote Viddler API method: viddler.users.setSettings
        /// </summary>
        public Data.UserSettings SetSettings(bool?visible, bool?gravatar, Data.PermissionLevel?defaultViewPermission,
                                             Data.PermissionLevel?defaultCommentPermission, Data.PermissionLevel?defaultDownloadPermission,
                                             Data.PermissionLevel?defaultEmbedPermission, Data.PermissionLevel?defaultTagPermission,
                                             string whitelistedDomains, bool?clickingThroughEnabled, bool?showRelatedVideos, bool?videoBrowserEnabled,
                                             bool?getLinkEnabled, int?embedCodeType, Data.VideoDeliveryMethod?videoDeliveryMethod, bool?hdPlayback, bool?mobilePlayback,
                                             string defaultVideoPermalink, string customEmbedUrl, Data.CommentsModerationLevel?commentsModeration, bool?emailEncodingEnd,
                                             bool?emailCommentReceived, bool?emailTagAdded, bool?emailCommentedVideoReceivedComment, bool?emailNewsletter)
        {
            StringDictionary parameters = new StringDictionary();

            if (visible.HasValue)
            {
                parameters.Add("visible", visible.Value ? "1" : "0");
            }
            if (gravatar.HasValue)
            {
                parameters.Add("gravatar", gravatar.Value ? "1" : "0");
            }
            if (defaultViewPermission.HasValue)
            {
                parameters.Add("default_view_permission", ViddlerHelper.GetEnumName(defaultViewPermission.Value.GetType().GetField(defaultViewPermission.Value.ToString())));
            }
            if (defaultCommentPermission.HasValue)
            {
                parameters.Add("default_comment_permission", ViddlerHelper.GetEnumName(defaultCommentPermission.Value.GetType().GetField(defaultCommentPermission.Value.ToString())));
            }
            if (defaultDownloadPermission.HasValue)
            {
                parameters.Add("default_download_permission", ViddlerHelper.GetEnumName(defaultDownloadPermission.Value.GetType().GetField(defaultDownloadPermission.Value.ToString())));
            }
            if (defaultEmbedPermission.HasValue)
            {
                parameters.Add("default_embed_permission", ViddlerHelper.GetEnumName(defaultEmbedPermission.Value.GetType().GetField(defaultEmbedPermission.Value.ToString())));
            }
            if (defaultTagPermission.HasValue)
            {
                parameters.Add("default_tag_permission", ViddlerHelper.GetEnumName(defaultTagPermission.Value.GetType().GetField(defaultTagPermission.Value.ToString())));
            }
            if (whitelistedDomains != null)
            {
                parameters.Add("whitelisted_domains", whitelistedDomains);
            }
            if (clickingThroughEnabled.HasValue)
            {
                parameters.Add("clicking_through_enabled", clickingThroughEnabled.Value ? "1" : "0");
            }
            if (showRelatedVideos.HasValue)
            {
                parameters.Add("show_related_videos", showRelatedVideos.Value ? "1" : "0");
            }
            if (videoBrowserEnabled.HasValue)
            {
                parameters.Add("video_browser_enabled", videoBrowserEnabled.Value ? "1" : "0");
            }
            if (getLinkEnabled.HasValue)
            {
                parameters.Add("get_link_enabled", getLinkEnabled.Value ? "1" : "0");
            }
            if (embedCodeType.HasValue)
            {
                parameters.Add("embed_code_type", embedCodeType.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (videoDeliveryMethod.HasValue)
            {
                parameters.Add("video_delivery_method", ViddlerHelper.GetEnumName(videoDeliveryMethod.Value.GetType().GetField(videoDeliveryMethod.Value.ToString())));
            }
            if (hdPlayback.HasValue)
            {
                parameters.Add("hd_playback", hdPlayback.Value ? "1" : "0");
            }
            if (mobilePlayback.HasValue)
            {
                parameters.Add("mobile_playback", mobilePlayback.Value ? "1" : "0");
            }
            if (defaultVideoPermalink != null)
            {
                parameters.Add("default_video_permalink", defaultVideoPermalink);
            }
            if (customEmbedUrl != null)
            {
                parameters.Add("custom_embed_url", customEmbedUrl);
            }
            if (commentsModeration.HasValue)
            {
                parameters.Add("comments_moderation", ViddlerHelper.GetEnumName(commentsModeration.Value.GetType().GetField(commentsModeration.Value.ToString())));
            }
            if (emailEncodingEnd.HasValue)
            {
                parameters.Add("email_encoding_end", emailEncodingEnd.Value ? "1" : "0");
            }
            if (emailCommentReceived.HasValue)
            {
                parameters.Add("email_comment_received", emailCommentReceived.Value ? "1" : "0");
            }
            if (emailTagAdded.HasValue)
            {
                parameters.Add("email_tag_added", emailTagAdded.Value ? "1" : "0");
            }
            if (emailCommentedVideoReceivedComment.HasValue)
            {
                parameters.Add("email_commented_video_received_comment", emailCommentedVideoReceivedComment.Value ? "1" : "0");
            }
            if (emailNewsletter.HasValue)
            {
                parameters.Add("email_newsletter", emailNewsletter.Value ? "1" : "0");
            }

            return(this.Service.ExecuteHttpRequest <Users.SetSettings, Data.UserSettings>(parameters));
        }