Exemplo n.º 1
0
        /// <summary>
        /// Get all the related videos of a video This method returns every related video of a particular video.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="videoId">The ID of the video.</param>
        /// <param name="filter">The attribute by which to filter the results.  Option descriptions:  * &#x60;related&#x60; - Return related videos.  (optional)</param>
        /// <param name="page">The page number of the results to show. (optional)</param>
        /// <param name="perPage">The number of items to show on each page of results, up to a maximum of 100. (optional)</param>
        /// <returns>Task of ApiResponse (List&lt;Video&gt;)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <List <Video> > > GetRelatedVideosAsyncWithHttpInfo(decimal videoId, string filter = default(string), decimal?page = default(decimal?), decimal?perPage = default(decimal?))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.video+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId)); // path parameter
            if (filter != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "filter", filter));
            }
            if (page != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "page", page));
            }
            if (perPage != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "per_page", perPage));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <List <Video> >("/videos/{video_id}/videos", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetRelatedVideos", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Complete a streaming upload This method completes the specified streaming upload of the authenticated user.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="uploadId">The ID of the streaming upload.</param>
        /// <param name="userId">The ID of the user.</param>
        /// <param name="signature">The crypto signature of the completed upload.</param>
        /// <param name="videoFileId">The ID of the uploaded file.</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> CompleteStreamingUploadWithHttpInfo(decimal uploadId, decimal userId, string signature, decimal videoFileId)
        {
            // verify the required parameter 'signature' is set
            if (signature == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'signature' when calling VideosUploadsApi->CompleteStreamingUpload");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("upload_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(uploadId)); // path parameter
            localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId));     // path parameter
            localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "signature", signature));
            localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "video_file_id", videoFileId));

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Delete <Object>("/users/{user_id}/uploads/{upload_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("CompleteStreamingUpload", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Upload a video This method begins the video upload process for the authenticated user. For more information, see our [upload documentation](https://developer.vimeo.com/api/upload/videos).
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="userId">The ID of the user.</param>
        /// <param name="inlineObject50"></param>
        /// <returns>ApiResponse of Video</returns>
        public VimeoOpenApi.Client.ApiResponse <Video> UploadVideoWithHttpInfo(decimal userId, InlineObject50 inlineObject50)
        {
            // verify the required parameter 'inlineObject50' is set
            if (inlineObject50 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject50' when calling VideosUploadsApi->UploadVideo");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.video+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId)); // path parameter
            localVarRequestOptions.Data = inlineObject50;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Post <Video>("/users/{user_id}/videos", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("UploadVideo", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Add a channel to a list of categories This method adds the specified channel to multiple categories.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="channelId">The ID of the channel.</param>
        /// <param name="inlineObject2"></param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> AddChannelCategoriesWithHttpInfo(decimal channelId, InlineObject2 inlineObject2)
        {
            // verify the required parameter 'inlineObject2' is set
            if (inlineObject2 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject2' when calling ChannelsCategoriesApi->AddChannelCategories");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("channel_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(channelId)); // path parameter
            localVarRequestOptions.Data = inlineObject2;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Put <Object>("/channels/{channel_id}/categories", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AddChannelCategories", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Get all the posters on an On Demand page This method returns every poster on the specified On Demand page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand.</param>
        /// <param name="page">The page number of the results to show. (optional)</param>
        /// <param name="perPage">The number of items to show on each page of results, up to a maximum of 100. (optional)</param>
        /// <returns>ApiResponse of List&lt;Picture&gt;</returns>
        public VimeoOpenApi.Client.ApiResponse <List <Picture> > GetVodPostersWithHttpInfo(decimal ondemandId, decimal?page = default(decimal?), decimal?perPage = default(decimal?))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("ondemand_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(ondemandId)); // path parameter
            if (page != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "page", page));
            }
            if (perPage != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "per_page", perPage));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <List <Picture> >("/ondemand/pages/{ondemand_id}/pictures", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVodPosters", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Remove a domain from a video&#39;s whitelist This method removes the specified domain from a video&#39;s whitelist.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="domain">The domain name.</param>
        /// <param name="videoId">The ID of the video.</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> DeleteVideoPrivacyDomainWithHttpInfo(string domain, decimal videoId)
        {
            // verify the required parameter 'domain' is set
            if (domain == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'domain' when calling VideosEmbedPrivacyApi->DeleteVideoPrivacyDomain");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("domain", VimeoOpenApi.Client.ClientUtils.ParameterToString(domain));    // path parameter
            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Delete <Object>("/videos/{video_id}/privacy/domains/{domain}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DeleteVideoPrivacyDomain", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Exchange an authorization code for an access token This method exchanges an OAuth authorization code for an OAuth access token.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject27"></param>
        /// <returns>ApiResponse of Auth</returns>
        public VimeoOpenApi.Client.ApiResponse <Auth> ExchangeAuthCodeWithHttpInfo(InlineObject27 inlineObject27)
        {
            // verify the required parameter 'inlineObject27' is set
            if (inlineObject27 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject27' when calling AuthenticationExtrasExchangeApi->ExchangeAuthCode");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.auth+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.auth+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = inlineObject27;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Post <Auth>("/oauth/access_token", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ExchangeAuthCode", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Permit a list of users to access a private channel This method gives multiple users access to the specified private channel. The authenticated user must be the owner of the channel.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="channelId">The ID of the channel.</param>
        /// <param name="inlineObject6"></param>
        /// <returns>Task of ApiResponse (List&lt;User&gt;)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <List <User> > > SetChannelPrivacyUsersAsyncWithHttpInfo(decimal channelId, InlineObject6 inlineObject6)
        {
            // verify the required parameter 'inlineObject6' is set
            if (inlineObject6 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject6' when calling ChannelsPrivateChannelMembersApi->SetChannelPrivacyUsers");
            }


            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.user+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.user+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("channel_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(channelId)); // path parameter
            localVarRequestOptions.Data = inlineObject6;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PutAsync <List <User> >("/channels/{channel_id}/privacy/users", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("SetChannelPrivacyUsers", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Get a tag This method returns the specified tag.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="word">The tag to return.</param>
        /// <returns>ApiResponse of Tag</returns>
        public VimeoOpenApi.Client.ApiResponse <Tag> GetTagWithHttpInfo(string word)
        {
            // verify the required parameter 'word' is set
            if (word == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'word' when calling TagsEssentialsApi->GetTag");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.tag+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("word", VimeoOpenApi.Client.ClientUtils.ParameterToString(word)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Tag>("/tags/{word}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetTag", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Get membership information about a team This method returns information about the membership of the specified team. Usage is currently limited to the team join forms.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="code">The code corresponding to the desired team. This value appears under &#x60;TeamUser&#x60; &gt; &#x60;code&#x60;.</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> GetTeamInformationWithHttpInfo(string code)
        {
            // verify the required parameter 'code' is set
            if (code == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'code' when calling TeamMembersEssentialsApi->GetTeamInformation");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("code", VimeoOpenApi.Client.ClientUtils.ParameterToString(code)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Object>("/teammembers/{code}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetTeamInformation", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Convert an OAuth 1 access token to an OAuth 2 access token This method exchanges a legacy Advanced API OAuth 1 token for an API v3 OAuth 2 token.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject29"></param>
        /// <returns>Task of ApiResponse (Auth)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Auth> > ConvertAccessTokenAsyncWithHttpInfo(InlineObject29 inlineObject29)
        {
            // verify the required parameter 'inlineObject29' is set
            if (inlineObject29 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject29' when calling AuthenticationExtrasConvertApi->ConvertAccessToken");
            }


            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.auth+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.auth+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = inlineObject29;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <Auth>("/oauth/authorize/vimeo_oauth1", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ConvertAccessToken", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Remove a channel from a category This method removes a channel from the specified category. The authenticated user must be the owner of the channel.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="category">The name of the category.</param>
        /// <param name="channelId">The ID of the channel.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Object> > DeleteChannelCategoryAsyncWithHttpInfo(string category, decimal channelId)
        {
            // verify the required parameter 'category' is set
            if (category == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'category' when calling ChannelsCategoriesApi->DeleteChannelCategory");
            }


            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.category+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("category", VimeoOpenApi.Client.ClientUtils.ParameterToString(category));    // path parameter
            localVarRequestOptions.PathParameters.Add("channel_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(channelId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.DeleteAsync <Object>("/channels/{channel_id}/categories/{category}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DeleteChannelCategory", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Edit a poster on an On Demand page This method edits a poster image on the specified On Demand page. The authenticated user must be the owner of the page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand page.</param>
        /// <param name="posterId">The ID of the poster.</param>
        /// <param name="inlineObject32"> (optional)</param>
        /// <returns>ApiResponse of Picture</returns>
        public VimeoOpenApi.Client.ApiResponse <Picture> EditVodPosterWithHttpInfo(decimal ondemandId, decimal posterId, InlineObject32 inlineObject32 = default(InlineObject32))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("ondemand_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(ondemandId)); // path parameter
            localVarRequestOptions.PathParameters.Add("poster_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(posterId));     // path parameter
            localVarRequestOptions.Data = inlineObject32;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Patch <Picture>("/ondemand/pages/{ondemand_id}/pictures/{poster_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("EditVodPoster", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 14
0
        /// <summary>
        /// Get the API specification This method returns the full OpenAPI specification for the Vimeo API.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="openapi">Return an OpenAPI specification. (optional)</param>
        /// <returns>ApiResponse of Endpoint</returns>
        public VimeoOpenApi.Client.ApiResponse <Endpoint> GetEndpointsWithHttpInfo(bool?openapi = default(bool?))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.endpoint+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (openapi != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "openapi", openapi));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Endpoint>("/", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetEndpoints", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Add or remove a video from a list of showcases This endpoint adds the specified video to (or removes the video from) muliple showcases.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="videoId">The ID of the video.</param>
        /// <param name="inlineObject52"> (optional)</param>
        /// <returns>ApiResponse of List&lt;Album&gt;</returns>
        public VimeoOpenApi.Client.ApiResponse <List <Album> > AddOrRemoveMultipleAlbumsWithHttpInfo(decimal videoId, InlineObject52 inlineObject52 = default(InlineObject52))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.album+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.album+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId)); // path parameter
            localVarRequestOptions.Data = inlineObject52;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Patch <List <Album> >("/videos/{video_id}/albums", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("AddOrRemoveMultipleAlbums", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Edit the user This method edits the Vimeo account of the authenticated user.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject15"> (optional)</param>
        /// <returns>ApiResponse of User</returns>
        public VimeoOpenApi.Client.ApiResponse <User> EditUserAlt1WithHttpInfo(InlineObject15 inlineObject15 = default(InlineObject15))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.user+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.user+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = inlineObject15;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Patch <User>("/me", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("EditUserAlt1", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Get a timeline event thumbnail This method returns a single timeline event thumbnail that belongs to the specified video.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="thumbnailId">The ID of the timeline event thumbnail.</param>
        /// <param name="videoId">The ID of the video.</param>
        /// <returns>ApiResponse of Picture</returns>
        public VimeoOpenApi.Client.ApiResponse <Picture> GetVideoCustomLogoWithHttpInfo(decimal thumbnailId, decimal videoId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("thumbnail_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(thumbnailId)); // path parameter
            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId));         // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Picture>("/videos/{video_id}/timelinethumbnails/{thumbnail_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVideoCustomLogo", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Get a specific season on an On Demand page This method returns a single season on the specified On Demand page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand page.</param>
        /// <param name="seasonId">The ID of the season.</param>
        /// <returns>ApiResponse of OnDemandSeason</returns>
        public VimeoOpenApi.Client.ApiResponse <OnDemandSeason> GetVodSeasonWithHttpInfo(decimal ondemandId, decimal seasonId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.ondemand.season+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("ondemand_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(ondemandId)); // path parameter
            localVarRequestOptions.PathParameters.Add("season_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(seasonId));     // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <OnDemandSeason>("/ondemand/pages/{ondemand_id}/seasons/{season_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVodSeason", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Get an M3U8 playback URL for a one-time live event This method returns an M3U8 playback URL for the specified one-time live event stream. You should use this endpoint only in conjunction with our recommended procedure for playing live events via HLS.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="userId">The ID of the user.</param>
        /// <param name="videoId">The ID of the video.</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> GetOneTimeEventM3u8PlaybackWithHttpInfo(decimal userId, decimal videoId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId));   // path parameter
            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Object>("/users/{user_id}/videos/{video_id}/m3u8_playback", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetOneTimeEventM3u8Playback", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 20
0
        /// <summary>
        /// Get the API specification This method returns the full OpenAPI specification for the Vimeo API.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="openapi">Return an OpenAPI specification. (optional)</param>
        /// <returns>Task of ApiResponse (Endpoint)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Endpoint> > GetEndpointsAsyncWithHttpInfo(bool?openapi = default(bool?))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.endpoint+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (openapi != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "openapi", openapi));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Endpoint>("/", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetEndpoints", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 21
0
        /// <summary>
        /// Get all the categories to which a channel belongs This method returns every category to which the specified channel belongs.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="channelId">The ID of the channel.</param>
        /// <returns>ApiResponse of List&lt;Category&gt;</returns>
        public VimeoOpenApi.Client.ApiResponse <List <Category> > GetChannelCategoriesWithHttpInfo(decimal channelId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.category+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("channel_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(channelId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <List <Category> >("/channels/{channel_id}/categories", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetChannelCategories", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 22
0
        /// <summary>
        /// Remove the user from a group This method removes the authenticated user from the specified group. The authenticated user can&#39;t be the owner of the group; assign a new owner through a PATCH request first.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="groupId">The ID of the group.</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> LeaveGroupAlt1WithHttpInfo(decimal groupId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("group_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(groupId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Delete <Object>("/me/groups/{group_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("LeaveGroupAlt1", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 23
0
        /// <summary>
        /// Get all Creative Commons licenses This method returns all available Creative Commons licenses.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of List&lt;CreativeCommons&gt;</returns>
        public VimeoOpenApi.Client.ApiResponse <List <CreativeCommons> > GetCcLicensesWithHttpInfo()
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.creativecommons+json"
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <List <CreativeCommons> >("/creativecommons", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetCcLicenses", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 24
0
        /// <summary>
        /// Edit the user This method edits the Vimeo account of the authenticated user.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="userId">The ID of the user.</param>
        /// <param name="inlineObject37"> (optional)</param>
        /// <returns>Task of ApiResponse (User)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <User> > EditUserAsyncWithHttpInfo(decimal userId, InlineObject37 inlineObject37 = default(InlineObject37))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.user+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.user+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId)); // path parameter
            localVarRequestOptions.Data = inlineObject37;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PatchAsync <User>("/users/{user_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("EditUser", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Delete the user&#39;s watch history This method deletes the entire watch history of the authenticated user.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of Object(void)</returns>
        public VimeoOpenApi.Client.ApiResponse <Object> DeleteWatchHistoryWithHttpInfo()
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }


            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request
            var localVarResponse = this.Client.Delete <Object>("/me/watched/videos", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DeleteWatchHistory", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
        /// <summary>
        /// Permit a specific user to access a private channel This method gives a single user access to the specified private channel. The authenticated user must be the owner of the channel.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="channelId">The ID of the channel.</param>
        /// <param name="userId">The ID of the user.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Object> > SetChannelPrivacyUserAsyncWithHttpInfo(decimal channelId, decimal userId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("channel_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(channelId)); // path parameter
            localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId));       // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PutAsync <Object>("/channels/{channel_id}/privacy/users/{user_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("SetChannelPrivacyUser", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Get a specific poster on an On Demand page This method returns a single poster on the specified On Demand page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand page.</param>
        /// <param name="posterId">The ID of the poster.</param>
        /// <returns>Task of ApiResponse (Picture)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Picture> > GetVodPosterAsyncWithHttpInfo(decimal ondemandId, decimal posterId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("ondemand_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(ondemandId)); // path parameter
            localVarRequestOptions.PathParameters.Add("poster_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(posterId));     // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Picture>("/ondemand/pages/{ondemand_id}/pictures/{poster_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVodPoster", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 28
0
        /// <summary>
        /// Get an M3U8 playback URL for a one-time live event This method returns an M3U8 playback URL for the specified one-time live event stream. You should use this endpoint only in conjunction with our recommended procedure for playing live events via HLS.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="videoId">The ID of the video.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Object> > GetOneTimeEventM3u8PlaybackAlt1AsyncWithHttpInfo(decimal videoId)
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("video_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(videoId)); // path parameter

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Object>("/me/videos/{video_id}/m3u8_playback", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetOneTimeEventM3u8PlaybackAlt1", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 29
0
        /// <summary>
        /// Get the user This method returns the authenticated user.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (User)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <User> > GetUserAlt1AsyncWithHttpInfo()
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.user+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }


            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <User>("/me", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetUserAlt1", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 30
0
        /// <summary>
        /// Get all the On Demand purchases and rentals that the user has made This method returns every purchase and rental that the authenticated user has made across all On Demand pages.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="direction">The sort direction of the results.  Option descriptions:  * &#x60;asc&#x60; - Sort the results in ascending order.  * &#x60;desc&#x60; - Sort the results in descending order.  (optional)</param>
        /// <param name="filter">The type of On Demand videos to show.  Option descriptions:  * &#x60;important&#x60; - This option shows the pages that are about to expire.  (optional)</param>
        /// <param name="page">The page number of the results to show. (optional)</param>
        /// <param name="perPage">The number of items to show on each page of results, up to a maximum of 100. (optional)</param>
        /// <param name="sort">The way to sort the results. (optional)</param>
        /// <returns>Task of ApiResponse (List&lt;OnDemandPage&gt;)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <List <OnDemandPage> > > GetVodPurchasesAlt1AsyncWithHttpInfo(string direction = default(string), string filter = default(string), decimal?page = default(decimal?), decimal?perPage = default(decimal?), string sort = default(string))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.ondemand.page+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (direction != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "direction", direction));
            }
            if (filter != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "filter", filter));
            }
            if (page != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "page", page));
            }
            if (perPage != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "per_page", perPage));
            }
            if (sort != null)
            {
                localVarRequestOptions.QueryParameters.Add(VimeoOpenApi.Client.ClientUtils.ParameterToMultiMap("", "sort", sort));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <List <OnDemandPage> >("/me/ondemand/purchases", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetVodPurchasesAlt1", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }