Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Vimeo API

Introduction

Build something great. Vimeo's API supports flexible, high-quality video integration with your custom apps.

Requirements

The SDK requires Go version 1.18 or above.

Building

Install Dependencies

Resolve all the SDK dependencies, using the go get command.

Installation

The following section explains how to use the vimeoApi library in a new project.

1. Add SDK as a Dependency to the Application

  • Add the following lines to your application's go.mod file:
replace vimeoApi => ".\\vimeo-api-go_generic_lib" // local path to the SDK

require vimeoApi v0.0.0
  • Resolve the dependencies in the updated go.mod file, using the go get command.

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
httpConfiguration HttpConfiguration Configurable http client options like timeout and retries.
loggerConfiguration LoggerConfiguration Represents the logger configurations for API calls
bearerCredentials BearerCredentials The Credentials Setter for OAuth 2 Bearer token
oauth2AuthorizationCodeCredentials Oauth2AuthorizationCodeCredentials The Credentials Setter for OAuth 2 Authorization Code Grant
oauth2ClientCredentialsCredentials Oauth2ClientCredentialsCredentials The Credentials Setter for OAuth 2 Client Credentials Grant

The API client can be initialized as follows:

package main

import (
    "vimeoApi"
    "vimeoApi/models"
)

func main() {
    client := vimeoApi.NewClient(
    vimeoApi.CreateConfiguration(
            vimeoApi.WithHttpConfiguration(
                vimeoApi.CreateHttpConfiguration(
                    vimeoApi.WithTimeout(30),
                ),
            ),
            vimeoApi.WithBearerCredentials(
                vimeoApi.NewBearerCredentials("AccessToken"),
            ),
            vimeoApi.WithOauth2AuthorizationCodeCredentials(
                vimeoApi.NewOauth2AuthorizationCodeCredentials(
                    "OAuthClientId",
                    "OAuthClientSecret",
                    "OAuthRedirectUri",
                ).
                WithOauthScopes([]models.OauthScopeOauth2AuthorizationCode{
        models.OauthScopeOauth2AuthorizationCode_Ai,
        models.OauthScopeOauth2AuthorizationCode_Create,
    }),
            ),
            vimeoApi.WithOauth2ClientCredentialsCredentials(
                vimeoApi.NewOauth2ClientCredentialsCredentials(
                    "OAuthClientId",
                    "OAuthClientSecret",
                ).
                WithOauthScopes([]models.OauthScopeOauth2ClientCredentials{
        models.OauthScopeOauth2ClientCredentials_Ai,
        models.OauthScopeOauth2ClientCredentials_Create,
    }),
            ),
            vimeoApi.WithLoggerConfiguration(
                vimeoApi.WithLevel("info"),
                vimeoApi.WithRequestConfiguration(
                    vimeoApi.WithRequestBody(true),
                ),
                vimeoApi.WithResponseConfiguration(
                    vimeoApi.WithResponseHeaders(true),
                ),
            ),
        ),
    )
}

Authorization

This API uses the following authentication schemes.

List of APIs

SDK Infrastructure

Configuration

Utilities

Releases

Packages

Contributors

Languages