Example #1
0
        public bool editVideo(VideoEditQuery query)
        {
            var url = apiUrl + "/api/videos/" + query.id.ToString() + ".json";

            var data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><vzaar-api><_method>put</_method><video><title>" + query.title + "</title><description>" + query.description + "</description>";

            data += "<private>" + query.markAsPrivate + "</private>";

            if (query.seoUrl != "")
            {
                data += "<seo_url>" + query.seoUrl + "</seo_url>";
            }
            data += "</video></vzaar-api>";

            var response = executeRequest(url, "PUT", data);

            if (String.IsNullOrEmpty(response))
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        public bool editVideo ( VideoEditQuery query )
        {

            var url = apiUrl + "/api/videos/" + query.id.ToString() + ".xml";

            var data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><vzaar-api><_method>put</_method><video><title>" + HttpUtility.HtmlEncode(query.title) + "</title><description>" + HttpUtility.HtmlEncode(query.description) + "</description>";
            data += "<private>" + query.markAsPrivate + "</private>";

            if (query.seoUrl != "")
                data += "<seo_url>" + query.seoUrl + "</seo_url>";
            data += "</video></vzaar-api>";

            var response = executeRequest( url, "PUT", data );
            if (String.IsNullOrEmpty( response ))
                return false;

            return true;
        }