vimeo

package
Version: v2.2.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2018 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.

Types

type Album

type Album struct {
	URI          string    `json:"uri,omitempty"`
	Name         string    `json:"name,omitempty"`
	Description  string    `json:"description,omitempty"`
	Link         string    `json:"link,omitempty"`
	Duration     int       `json:"duration,omitempty"`
	CreatedTime  time.Time `json:"created_time,omitempty"`
	ModifiedTime time.Time `json:"modified_time,omitempty"`
	User         *User     `json:"user,omitempty"`
	Pictures     *Pictures `json:"pictures,omitempty"`
	Privacy      *Privacy  `json:"privacy,omitempty"`
}

Album represents a album.

type AlbumRequest

type AlbumRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Privacy     string `json:"privacy,omitempty"`
	Password    string `json:"password,omitempty"`
	Sort        string `json:"sort,omitempty"`
}

AlbumRequest represents a request to create/edit an album.

type App

type App struct {
	URI  string `json:"uri,omitempty"`
	Name string `json:"name,omitempty"`
}

App internal object provides access to specific app.

type Buttons

type Buttons struct {
	Like       bool `json:"like"`
	WatchLater bool `json:"watchlater"`
	Share      bool `json:"share"`
	Embed      bool `json:"embed"`
	Vote       bool `json:"vote"`
	HD         bool `json:"HD"`
}

Buttons internal object embed settings.

type CallOption

type CallOption interface {
	Get() (key, value string)
}

CallOption is an optional argument to an API call. A CallOption is something that configures an API call in a way that is not specific to that API: page, filter and etc

type CategoriesService

type CategoriesService service

CategoriesService handles communication with the categories related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/categories

func (*CategoriesService) Get

func (s *CategoriesService) Get(cat string, opt ...CallOption) (*Category, *Response, error)

Get specific category by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories/%7Bcategory%7D

func (*CategoriesService) GetVideo

func (s *CategoriesService) GetVideo(cat string, vid int, opt ...CallOption) (*Video, *Response, error)

GetVideo specific video by category name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories/%7Bcategory%7D/videos/%7Bvideo_id%7D

func (*CategoriesService) List

func (s *CategoriesService) List(opt ...CallOption) ([]*Category, *Response, error)

List the category.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories

func (*CategoriesService) ListChannel

func (s *CategoriesService) ListChannel(cat string, opt ...CallOption) ([]*Channel, *Response, error)

ListChannel lists the channel for an category.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories/%7Bcategory%7D/channels

func (*CategoriesService) ListGroup

func (s *CategoriesService) ListGroup(cat string, opt ...CallOption) ([]*Group, *Response, error)

ListGroup lists the group for an category.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories/%7Bcategory%7D/groups

func (*CategoriesService) ListVideo

func (s *CategoriesService) ListVideo(cat string, opt ...CallOption) ([]*Video, *Response, error)

ListVideo lists the video for an category.

Vimeo API docs: https://developer.vimeo.com/api/playground/categories/%7Bcategory%7D/videos

type Category

type Category struct {
	URI                   string         `json:"uri,omitempty"`
	Link                  string         `json:"link,omitempty"`
	Name                  string         `json:"name,omitempty"`
	TopLevel              bool           `json:"top_level"`
	Pictures              *Pictures      `json:"pictures,omitempty"`
	LastVideoFeaturedTime string         `json:"last_video_featured_time,omitempty"`
	Parent                *SubCategory   `json:"parent,omitempty"`
	SubCategories         []*SubCategory `json:"subcategories,omitempty"`
	ResourceKey           string         `json:"resource_key,omitempty"`
}

Category represents a category.

type Channel

type Channel struct {
	URI          string    `json:"uri,omitempty"`
	Name         string    `json:"name,omitempty"`
	Description  string    `json:"description,omitempty"`
	Link         string    `json:"link,omitempty"`
	CreatedTime  time.Time `json:"created_time,omitempty"`
	ModifiedTime time.Time `json:"modified_time,omitempty"`
	User         *User     `json:"user,omitempty"`
	Pictures     *Pictures `json:"pictures,omitempty"`
	Header       *Header   `json:"header,omitempty"`
	Privacy      *Privacy  `json:"privacy,omitempty"`
	ResourceKey  string    `json:"resource_key,omitempty"`
}

Channel represents a channel.

func (Channel) GetID

func (c Channel) GetID() string

GetID returns the identifier (ID) of the channel.

type ChannelRequest

type ChannelRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Privacy     string `json:"privacy,omitempty"`
}

ChannelRequest represents a request to create/edit an channel.

type ChannelsService

type ChannelsService service

ChannelsService handles communication with the channels related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/channels

func (*ChannelsService) AddVideo

func (s *ChannelsService) AddVideo(ch string, vid int) (*Video, *Response, error)

AddVideo add video to channel by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/videos/%7Bvideo_id%7D

func (*ChannelsService) Create

func (s *ChannelsService) Create(r *ChannelRequest) (*Channel, *Response, error)

Create a new channel.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels

func (*ChannelsService) Delete

func (s *ChannelsService) Delete(ch string) (*Response, error)

Delete specific channel by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D

func (*ChannelsService) DeleteVideo

func (s *ChannelsService) DeleteVideo(ch string, vid int) (*Response, error)

DeleteVideo specific video by channel name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/videos/%7Bvideo_id%7D

func (*ChannelsService) Edit

Edit specific channel by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D

func (*ChannelsService) Get

func (s *ChannelsService) Get(ch string, opt ...CallOption) (*Channel, *Response, error)

Get specific channel by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D

func (*ChannelsService) GetVideo

func (s *ChannelsService) GetVideo(ch string, vid int, opt ...CallOption) (*Video, *Response, error)

GetVideo specific video by channel name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/videos/%7Bvideo_id%7D

func (*ChannelsService) List

func (s *ChannelsService) List(opt ...CallOption) ([]*Channel, *Response, error)

List lists the channel for an category.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels

func (*ChannelsService) ListUser

func (s *ChannelsService) ListUser(ch string, opt ...CallOption) ([]*User, *Response, error)

ListUser lists the user for an channel.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/users

func (*ChannelsService) ListVideo

func (s *ChannelsService) ListVideo(ch string, opt ...CallOption) ([]*Video, *Response, error)

ListVideo lists the video for an channel.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/videos

type Client

type Client struct {
	BaseURL *url.URL

	UserAgent string

	// Config
	Config *Config

	// Services used for communicating with the API
	Categories      *CategoriesService
	Channels        *ChannelsService
	ContentRatings  *ContentRatingsService
	CreativeCommons *CreativeCommonsService
	Groups          *GroupsService
	Languages       *LanguagesService
	Tags            *TagsService
	Videos          *VideosService
	Users           *UsersService
	// contains filtered or unexported fields
}

Client manages communication with Vimeo API.

func NewClient

func NewClient(httpClient *http.Client, config *Config) *Client

NewClient returns a new Vimeo API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the golang.org/x/oauth2 library).

func (*Client) Client

func (c *Client) Client() *http.Client

Client returns the HTTP client configured for this client.

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request.

type Comment

type Comment struct {
	URI         string `json:"uri,omitempty"`
	Type        string `json:"type,omitempty"`
	Text        string `json:"text,omitempty"`
	CreatedOn   string `json:"created_on,omitempty"`
	User        *User  `json:"user,omitempty"`
	ResourceKey string `json:"resource_key,omitempty"`
}

Comment represents a comment.

type CommentRequest

type CommentRequest struct {
	Text string `json:"text,omitempty"`
}

CommentRequest represents a request to create/edit an comment.

type Config

type Config struct {
	// Uploader
	Uploader Uploader
}

Config provides a way to configure the Client depending on your needs.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig return the default Client configuration.

type ContentRating

type ContentRating struct {
	Code string `json:"code,omitempty"`
	Name string `json:"name,omitempty"`
}

ContentRating represents a content rating.

type ContentRatingsService

type ContentRatingsService service

ContentRatingsService handles communication with the content ratings related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/contentratings

func (*ContentRatingsService) List

List the content rating.

Vimeo API docs: https://developer.vimeo.com/api/playground/contentratings

type CreativeCommon

type CreativeCommon struct {
	Code string `json:"code,omitempty"`
	Name string `json:"name,omitempty"`
}

CreativeCommon represents a creative common.

type CreativeCommonsService

type CreativeCommonsService service

CreativeCommonsService handles communication with the creative commons related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/creativecommons

func (*CreativeCommonsService) List

List the creative common.

Vimeo API docs: https://developer.vimeo.com/api/playground/creativecommons

type Credit

type Credit struct {
	URI   string `json:"uri,omitempty"`
	Name  string `json:"name,omitempty"`
	Role  string `json:"role,omitempty"`
	User  *User  `json:"user,omitempty"`
	Video *Video `json:"video,omitempty"`
}

Credit represents a creadit.

type CreditRequest

type CreditRequest struct {
	Role    string `json:"role,omitempty"`
	Name    string `json:"name,omitempty"`
	Email   string `json:"email,omitempty"`
	UserURI string `json:"user_uri,omitempty"`
}

CreditRequest represents a request to create/edit an creadit.

type Domain

type Domain struct {
	URI  string `json:"uri,omitempty"`
	Name string `json:"name,omitempty"`
}

Domain represents a domain.

type Embed

type Embed struct {
	HTML string `json:"html,omitempty"`
}

Embed internal object provides access to HTML embed code.

type EmbedPresets

type EmbedPresets struct {
	URI      string         `json:"uri,omitempty"`
	Name     string         `json:"name,omitempty"`
	Settings *EmbedSettings `json:"settings,omitempty"`
	User     *User          `json:"user,omitempty"`
}

EmbedPresets internal object present settings.

type EmbedRequest

type EmbedRequest struct {
	Buttons                         *Buttons           `json:"buttons,omitempty"`
	Logos                           *Logos             `json:"logos,omitempty"`
	Outro                           string             `json:"outro,omitempty"`
	Portrait                        string             `json:"portrait,omitempty"`
	Title                           *TitleRequest      `json:"title,omitempty"`
	ByLine                          string             `json:"byline,omitempty"`
	Badge                           bool               `json:"badge"`
	ByLineBadge                     bool               `json:"byline_badge"`
	CollectionsButton               bool               `json:"collections_button"`
	PlayBar                         bool               `json:"playbar"`
	Volume                          bool               `json:"volume"`
	FullscreenButton                bool               `json:"fullscreen_button"`
	ScalingButton                   bool               `json:"scaling_button"`
	Autoplay                        bool               `json:"autoplay"`
	Autopause                       bool               `json:"autopause"`
	Loop                            bool               `json:"loop"`
	Color                           string             `json:"color,omitempty"`
	Link                            bool               `json:"link"`
	RatingsRequest                  *RatingsRequest    `json:"ratings,omitempty"`
	ExtraLinks                      *ExtraLinksRequest `json:"external_links,omitempty"`
	OverlayEmailCapture             int                `json:"overlay_email_capture,omitempty"`
	OverlayEmailCaptureText         string             `json:"overlay_email_capture_text,omitempty"`
	OverlayEmailCaptureConfirmation string             `json:"overlay_email_capture_confirmation,omitempty"`
}

EmbedRequest a request to edit an embed settings.

type EmbedSettings

type EmbedSettings struct {
	Buttons                         *Buttons `json:"buttons,omitempty"`
	Logos                           *Logos   `json:"logos,omitempty"`
	Outro                           string   `json:"outro,omitempty"`
	Portrait                        string   `json:"portrait,omitempty"`
	Title                           string   `json:"title,omitempty"`
	ByLine                          string   `json:"byline,omitempty"`
	Badge                           bool     `json:"badge"`
	ByLineBadge                     bool     `json:"byline_badge"`
	CollectionsButton               bool     `json:"collections_button"`
	PlayBar                         bool     `json:"playbar"`
	Volume                          bool     `json:"volume"`
	FullscreenButton                bool     `json:"fullscreen_button"`
	ScalingButton                   bool     `json:"scaling_button"`
	Autoplay                        bool     `json:"autoplay"`
	Autopause                       bool     `json:"autopause"`
	Loop                            bool     `json:"loop"`
	Color                           string   `json:"color,omitempty"`
	Link                            bool     `json:"link"`
	OverlayEmailCapture             int      `json:"overlay_email_capture,omitempty"`
	OverlayEmailCaptureText         string   `json:"overlay_email_capture_text,omitempty"`
	OverlayEmailCaptureConfirmation string   `json:"overlay_email_capture_confirmation,omitempty"`
}

EmbedSettings internal object provides access to embed settings.

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response
	Message  string `json:"error"`
}

ErrorResponse is a Vimeo error response. This wraps the standard http.Response. Provides access error message returned Vimeo.

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type ExtraLinksRequest

type ExtraLinksRequest struct {
	IMDB           string `json:"imdb,omitempty"`
	RottenTomatoes string `json:"rotten_tomatoes,omitempty"`
}

ExtraLinksRequest a request to edit video.

type Feed

type Feed struct {
	URI  string `json:"uri,omitempty"`
	Clip *Video `json:"clip,omitempty"`
}

Feed represents a feed.

type File

type File struct {
	Quality     string    `json:"quality,omitempty"`
	Type        string    `json:"type,omitempty"`
	Width       int       `json:"width,omitempty"`
	Height      int       `json:"height,omitempty"`
	Link        string    `json:"link,omitempty"`
	CreatedTime time.Time `json:"created_time,omitempty"`
	FPS         float32   `json:"fps,omitempty"`
	Size        int       `json:"size,omitempty"`
	MD5         string    `json:"md5,omitempty"`
}

File internal object provides access to video file information

type Group

type Group struct {
	URI          string    `json:"uri,omitempty"`
	Name         string    `json:"name,omitempty"`
	Description  string    `json:"description,omitempty"`
	Link         string    `json:"link,omitempty"`
	CreatedTime  time.Time `json:"created_time,omitempty"`
	ModifiedTime time.Time `json:"modified_time,omitempty"`
	Privacy      *Privacy  `json:"privacy,omitempty"`
	Pictures     *Pictures `json:"pictures,omitempty"`
	Header       *Header   `json:"header,omitempty"`
	User         *User     `json:"user,omitempty"`
	ResourceKey  string    `json:"resource_key,omitempty"`
}

Group represents a group.

func (Group) GetID

func (g Group) GetID() string

GetID returns the identifier (ID) of the group.

type GroupRequest

type GroupRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

GroupRequest represents a request to create/edit an group.

type GroupsService

type GroupsService service

GroupsService handles communication with the group related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/groups

func (*GroupsService) AddVideo

func (s *GroupsService) AddVideo(gr string, vid int, opt ...CallOption) (*Video, *Response, error)

AddVideo add video to group by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D/videos/%7Bvideo_id%7D

func (*GroupsService) Create

func (s *GroupsService) Create(r *GroupRequest) (*Group, *Response, error)

Create a new group.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups

func (*GroupsService) Delete

func (s *GroupsService) Delete(gr string) (*Response, error)

Delete specific group by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D

func (*GroupsService) DeleteVideo

func (s *GroupsService) DeleteVideo(gr string, vid int) (*Response, error)

DeleteVideo specific video by group name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D/videos/%7Bvideo_id%7D

func (*GroupsService) Get

func (s *GroupsService) Get(gr string, opt ...CallOption) (*Group, *Response, error)

Get specific group by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D

func (*GroupsService) GetVideo

func (s *GroupsService) GetVideo(gr string, vid int, opt ...CallOption) (*Video, *Response, error)

GetVideo specific video by group name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D/videos/%7Bvideo_id%7D

func (*GroupsService) List

func (s *GroupsService) List(opt ...CallOption) ([]*Group, *Response, error)

List lists the group.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups

func (*GroupsService) ListUser

func (s *GroupsService) ListUser(gr string, opt ...CallOption) ([]*User, *Response, error)

ListUser lists the user for an group.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D/users

func (*GroupsService) ListVideo

func (s *GroupsService) ListVideo(gr string, opt ...CallOption) ([]*Video, *Response, error)

ListVideo lists the video for an group.

Vimeo API docs: https://developer.vimeo.com/api/playground/groups/%7Bgroup_id%7D/videos

type Header struct {
	URI         string         `json:"uri,omitempty"`
	Active      bool           `json:"active"`
	Type        string         `json:"type,omitempty"`
	Sizes       []*PictureSize `json:"sizes,omitempty"`
	ResourceKey string         `json:"resource_key,omitempty"`
}

Header internal object provides access to header pictures.

type Language

type Language struct {
	Code string `json:"code,omitempty"`
	Name string `json:"name,omitempty"`
}

Language represents a language.

type LanguagesService

type LanguagesService service

LanguagesService handles communication with the languages related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/languages

func (*LanguagesService) List

func (s *LanguagesService) List(opt ...CallOption) ([]*Language, *Response, error)

List the languages.

Vimeo API docs: https://developer.vimeo.com/api/playground/languages

type Logos

type Logos struct {
	Vimeo        bool `json:"vimeo"`
	Custom       bool `json:"custom"`
	StickyCustom bool `json:"sticky_custom"`
}

Logos internal object embed settings.

type OptDirection

type OptDirection string

OptDirection is an optional argument to an API call All sortable resources accept the direction parameter which must be either asc or desc.

func (OptDirection) Get

func (o OptDirection) Get() (string, string)

Get key/value for make query

type OptFields

type OptFields []string

OptFields is an optional argument to an API call. With a simple parameter you can reduce the size of the responses, and dramatically increase the performance of your API requests.

func (OptFields) Get

func (o OptFields) Get() (string, string)

Get key/value for make query

type OptFilter

type OptFilter string

OptFilter is an optional argument to an API call

func (OptFilter) Get

func (o OptFilter) Get() (string, string)

Get key/value for make query

type OptFilterContentRating

type OptFilterContentRating []string

OptFilterContentRating is an optional argument to an API call Content filter is a specific type of resource filter, available on all video resources. Any videos that do not match one of the provided ratings will be excluded from the list of videos. Valid ratings include: language/drugs/violence/nudity/safe/unrated

func (OptFilterContentRating) Get

Get key/value for make query

type OptFilterEmbeddable

type OptFilterEmbeddable string

OptFilterEmbeddable is an optional argument to an API call

func (OptFilterEmbeddable) Get

func (o OptFilterEmbeddable) Get() (string, string)

Get key/value for make query

type OptFilterPlayable

type OptFilterPlayable string

OptFilterPlayable is an optional argument to an API call

func (OptFilterPlayable) Get

func (o OptFilterPlayable) Get() (string, string)

Get key/value for make query

type OptPage

type OptPage int

OptPage is an optional argument to an API call

func (OptPage) Get

func (o OptPage) Get() (string, string)

Get return key/value for make query

type OptPerPage

type OptPerPage int

OptPerPage is an optional argument to an API call

func (OptPerPage) Get

func (o OptPerPage) Get() (string, string)

Get return key/value for make query

type OptQuery

type OptQuery string

OptQuery is an optional argument to an API call. Search query.

func (OptQuery) Get

func (o OptQuery) Get() (string, string)

Get key/value for make query

type OptSort

type OptSort string

OptSort is an optional argument to an API call

func (OptSort) Get

func (o OptSort) Get() (string, string)

Get key/value for make query

type OptWeakSearch

type OptWeakSearch bool

OptWeakSearch is an option argument to an API call to allow usage of legacy search on the vimeo backend to find private videos

func (OptWeakSearch) Get

func (o OptWeakSearch) Get() (string, string)

Get return key/value for make query

type PictureSize

type PictureSize struct {
	Width              int    `json:"width,omitempty"`
	Height             int    `json:"height,omitempty"`
	Link               string `json:"link,omitempty"`
	LinkWithPlayButton string `json:"link_with_play_button,omitempty"`
}

PictureSize internal object provides access to picture size.

type Pictures

type Pictures struct {
	URI         string         `json:"uri,omitempty"`
	Active      bool           `json:"active"`
	Type        string         `json:"type,omitempty"`
	Sizes       []*PictureSize `json:"sizes,omitempty"`
	Link        string         `json:"link,omitempty"`
	ResourceKey string         `json:"resource_key,omitempty"`
}

Pictures internal object provides access to pictures.

func (Pictures) GetID

func (v Pictures) GetID() int

GetID returns the numeric identifier (ID) of the video.

type PicturesRequest

type PicturesRequest struct {
	Time   float32 `json:"time,omitempty"`
	Active bool    `json:"active,omitempty"`
}

PicturesRequest represents a request to create/edit an pictures.

type Portfolio

type Portfolio struct {
	URI          string    `json:"uri,omitempty"`
	Name         string    `json:"name,omitempty"`
	Description  string    `json:"description,omitempty"`
	Link         string    `json:"link,omitempty"`
	CreatedTime  time.Time `json:"created_time,omitempty"`
	ModifiedTime time.Time `json:"modified_time,omitempty"`
	Sort         string    `json:"sort,omitempty"`
}

Portfolio represents a portfolio.

type Preset

type Preset struct {
	URI  string `json:"uri,omitempty"`
	Name string `json:"name,omitempty"`
}

Preset represents a preset.

type Privacy

type Privacy struct {
	View     string `json:"view,omitempty"`
	Join     string `json:"join,omitempty"`
	Videos   string `json:"videos,omitempty"`
	Comment  string `json:"comment,omitempty"`
	Forums   string `json:"forums,omitempty"`
	Invite   string `json:"invite,omitempty"`
	Embed    string `json:"embed,omitempty"`
	Download bool   `json:"download"`
	Add      bool   `json:"add"`
}

Privacy internal object provides access to privacy.

type Rate

type Rate struct {
	Limit     int
	Remaining int
	Reset     time.Time
}

Rate represents the rate limit for the current client.

type RateLimitError

type RateLimitError struct {
	Rate     Rate
	Response *http.Response
	Message  string
}

RateLimitError occurs when API response with a rate limit remaining value of 0.

func (*RateLimitError) Error

func (r *RateLimitError) Error() string

type RatingMPAARequest

type RatingMPAARequest struct {
	Rating string `json:"rating,omitempty"`
	Reason string `json:"reason,omitempty"`
}

RatingMPAARequest a request to edit video.

type RatingTVRequest

type RatingTVRequest struct {
	Rating string `json:"rating,omitempty"`
	Reason string `json:"reason,omitempty"`
}

RatingTVRequest a request to edit video.

type RatingsRequest

type RatingsRequest struct {
	RatingTVRequest   string `json:"tv,omitempty"`
	RatingMPAARequest string `json:"mpaa,omitempty"`
}

RatingsRequest a request to edit an embed settings.

type Response

type Response struct {
	*http.Response
	// Pagination
	Page       int
	TotalPages int
	Total      int
	NextPage   string
	PrevPage   string
	FirstPage  string
	LastPage   string
}

Response is a Vimeo response. This wraps the standard http.Response. Provides access pagination links.

type ReviewPageRequest

type ReviewPageRequest struct {
	Active bool `json:"name,active"`
}

ReviewPageRequest represents a request to edit an video.

type Stats

type Stats struct {
	Plays int `json:"plays,omitempty"`
}

Stats internal object provides access to video statistic.

type SubCategory

type SubCategory struct {
	URI  string `json:"URI,omitempty"`
	Name string `json:"name,omitempty"`
	Link string `json:"link,omitempty"`
}

SubCategory internal object provides access to subcategory in category.

type Tag

type Tag struct {
	URI         string `json:"uri,omitempty"`
	Name        string `json:"name,omitempty"`
	Tag         string `json:"tag,omitempty"`
	Canonical   string `json:"canonical,omitempty"`
	ResourceKey string `json:"resource_key,omitempty"`
}

Tag represents a tag.

type TagsService

type TagsService service

TagsService handles communication with the tag related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/tags

func (*TagsService) Get

func (s *TagsService) Get(t string, opt ...CallOption) (*Tag, *Response, error)

Get specific tag by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/tags/%7Bword%7D

func (*TagsService) ListVideo

func (s *TagsService) ListVideo(t string, opt ...CallOption) ([]*Video, *Response, error)

ListVideo lists the video for an tag.

Vimeo API docs: https://developer.vimeo.com/api/playground/tags/%7Bword%7D/videos

type TextTrack

type TextTrack struct {
	URI  string `json:"uri,omitempty"`
	Name string `json:"name,omitempty"`
}

TextTrack represents a text track. TODO: Need full object.

type TextTrackRequest

type TextTrackRequest struct {
	Active   bool   `json:"role"`
	Type     string `json:"type,omitempty"`
	Language string `json:"language,omitempty"`
	Name     string `json:"name,omitempty"`
}

TextTrackRequest represents a request to create/edit text track.

type TitleRequest

type TitleRequest struct {
	Owner    string `json:"owner,omitempty"`
	Portrait string `json:"portrait,omitempty"`
	Name     string `json:"name,omitempty"`
}

TitleRequest a request to edit an embed settings.

type Upload

type Upload struct {
	Status      string `json:"status,omitempty"`
	UploadLink  string `json:"upload_link,omitempty"`
	RedirectURL string `json:"redirect_url,omitempty"`
	Link        string `json:"link,omitempty"`
	Rorm        string `json:"form,omitempty"`
	Approach    string `json:"approach,omitempty"`
	Size        int64  `json:"size,omitempty"`
}

Upload represents a request to upload video.

type UploadVideoRequest

type UploadVideoRequest struct {
	FileName string  `json:"file_name"`
	Upload   *Upload `json:"upload,omitempty"`
}

UploadVideoRequest specifies the optional parameters to the uploadVideo method.

type Uploader

type Uploader interface {
	UploadFromFile(c *Client, uploadURL string, f *os.File) error
}

type User

type User struct {
	URI           string     `json:"uri,omitempty"`
	Name          string     `json:"name,omitempty"`
	Link          string     `json:"link,omitempty"`
	Location      string     `json:"location,omitempty"`
	Bio           string     `json:"bio,omitempty"`
	CreatedTime   time.Time  `json:"created_time,omitempty"`
	Account       string     `json:"account,omitempty"`
	Pictures      *Pictures  `json:"pictures,omitempty"`
	WebSites      []*WebSite `json:"websites,omitempty"`
	ContentFilter []string   `json:"content_filter,omitempty"`
	ResourceKey   string     `json:"resource_key,omitempty"`
}

User represents a user.

type UserRequest

type UserRequest struct {
	Name     string `json:"name,omitempty"`
	Location string `json:"location,omitempty"`
	Bio      string `json:"bio,omitempty"`
}

UserRequest represents a request to create/edit an user.

type UsersService

type UsersService service

UsersService handles communication with the users related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/users

func (*UsersService) AlbumAddVideo

func (s *UsersService) AlbumAddVideo(uid string, ab string, vid int) (*Video, *Response, error)

AlbumAddVideo add specific video by album name and video ID. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) AlbumDeleteVideo

func (s *UsersService) AlbumDeleteVideo(uid string, ab string, vid int) (*Response, error)

AlbumDeleteVideo delete specific video by album name and video ID. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) AlbumGetVideo

func (s *UsersService) AlbumGetVideo(uid string, ab string, vid int, opt ...CallOption) (*Video, *Response, error)

AlbumGetVideo get specific video by album name and video ID. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) AlbumListVideo

func (s *UsersService) AlbumListVideo(uid string, ab string, opt ...CallOption) ([]*Video, *Response, error)

AlbumListVideo lists the video for an album. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D/videos

func (*UsersService) ClearWatchedList

func (s *UsersService) ClearWatchedList(uid string) (*Response, error)

ClearWatchedList delete all video from watch history.

Vimeo API docs: https://developer.vimeo.com/api/playground/me/watchlater/%7Bvideo_id%7D

func (*UsersService) CreateAlbum

func (s *UsersService) CreateAlbum(uid string, r *AlbumRequest) (*Album, *Response, error)

CreateAlbum a new album. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums

func (*UsersService) DeleteAlbum

func (s *UsersService) DeleteAlbum(uid string, ab string) (*Response, error)

DeleteAlbum specific album by name. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D

func (*UsersService) Edit

func (s *UsersService) Edit(uid string, r *UserRequest) (*User, *Response, error)

Edit one user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D

func (*UsersService) EditAlbum

func (s *UsersService) EditAlbum(uid string, ab string, r *AlbumRequest) (*Album, *Response, error)

EditAlbum specific album by name. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D

func (*UsersService) Feed

func (s *UsersService) Feed(uid string, opt ...CallOption) ([]*Feed, *Response, error)

Feed lists the feed for an user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/feed

func (*UsersService) FollowUser

func (s *UsersService) FollowUser(uid string, fid string) (*Response, error)

FollowUser follow a user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/following/%7Bfollow_user_id%7D

func (*UsersService) Get

func (s *UsersService) Get(uid string, opt ...CallOption) (*User, *Response, error)

Get show one user. Passing the empty string will authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D

func (*UsersService) GetAlbum

func (s *UsersService) GetAlbum(uid string, ab string, opt ...CallOption) (*Album, *Response, error)

GetAlbum specific album by name. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums/%7Balbum_id%7D

func (*UsersService) GetPreset

func (s *UsersService) GetPreset(uid string, p int, opt ...CallOption) (*Preset, *Response, error)

GetPreset get preset by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/presets/%7Bpreset_id%7D

func (*UsersService) GetProtfolio

func (s *UsersService) GetProtfolio(uid string, p string, opt ...CallOption) (*Portfolio, *Response, error)

GetProtfolio get portfolio by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios/%7Bportfolio_id%7D

func (*UsersService) GetVideo

func (s *UsersService) GetVideo(uid string, vid int, opt ...CallOption) (*Video, *Response, error)

GetVideo get specific video by video ID. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/videos

func (*UsersService) JoinGroup

func (s *UsersService) JoinGroup(uid string, gid string) (*Response, error)

JoinGroup join user to group. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/groups/%7Bgroup_id%7D

func (*UsersService) LeaveGroup

func (s *UsersService) LeaveGroup(uid string, gid string) (*Response, error)

LeaveGroup leaved user from group. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/groups/%7Bgroup_id%7D

func (*UsersService) LikeVideo

func (s *UsersService) LikeVideo(uid string, vid int) (*Response, error)

LikeVideo like one video. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/likes/%7Bvideo_id%7D

func (*UsersService) ListAlbum

func (s *UsersService) ListAlbum(uid string, opt ...CallOption) ([]*Album, *Response, error)

ListAlbum lists the album for an current user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/albums

func (*UsersService) ListAppearance

func (s *UsersService) ListAppearance(uid string, opt ...CallOption) ([]*Video, *Response, error)

ListAppearance all videos a user is credited in. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/appearances

func (*UsersService) ListCategory

func (s *UsersService) ListCategory(uid string, opt ...CallOption) ([]*Category, *Response, error)

ListCategory list the subscribed category for user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/categories

func (*UsersService) ListChannel

func (s *UsersService) ListChannel(uid string, opt ...CallOption) ([]*Channel, *Response, error)

ListChannel list the subscribed channel for user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/channels

func (*UsersService) ListFollowed

func (s *UsersService) ListFollowed(uid string, opt ...CallOption) ([]*User, *Response, error)

ListFollowed lists the following. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/following

func (*UsersService) ListFollower

func (s *UsersService) ListFollower(uid string, opt ...CallOption) ([]*User, *Response, error)

ListFollower lists the followers. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/followers

func (*UsersService) ListGroup

func (s *UsersService) ListGroup(uid string, opt ...CallOption) ([]*Group, *Response, error)

ListGroup lists all joined groups. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/groups

func (*UsersService) ListLikedVideo

func (s *UsersService) ListLikedVideo(uid string, opt ...CallOption) ([]*Video, *Response, error)

ListLikedVideo all liked videos. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/likes

func (*UsersService) ListPortfolio

func (s *UsersService) ListPortfolio(uid string, opt ...CallOption) ([]*Portfolio, *Response, error)

ListPortfolio lists the portfolio for user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios

func (*UsersService) ListPreset

func (s *UsersService) ListPreset(uid string, opt ...CallOption) ([]*Preset, *Response, error)

ListPreset lists the preset for an current user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/presets

func (*UsersService) ListVideo

func (s *UsersService) ListVideo(uid string, opt ...CallOption) ([]*Video, *Response, error)

ListVideo lists the video for user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/videos

func (*UsersService) PresetListVideo

func (s *UsersService) PresetListVideo(uid string, p int, opt ...CallOption) ([]*Video, *Response, error)

PresetListVideo lists the preset for an preset.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/presets/%7Bpreset_id%7D/videos

func (*UsersService) ProtfolioAddVideo

func (s *UsersService) ProtfolioAddVideo(uid string, p string, vid int) (*Response, error)

ProtfolioAddVideo add one video.

Vimeo API docs: hhttps://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios/%7Bportfolio_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) ProtfolioDeleteVideo

func (s *UsersService) ProtfolioDeleteVideo(uid string, p string, vid int) (*Response, error)

ProtfolioDeleteVideo delete specific video by portfolio name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios/%7Bportfolio_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) ProtfolioGetVideo

func (s *UsersService) ProtfolioGetVideo(uid string, p string, vid int, opt ...CallOption) (*Video, *Response, error)

ProtfolioGetVideo get specific video by portfolio name and video ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios/%7Bportfolio_id%7D/videos/%7Bvideo_id%7D

func (*UsersService) ProtfolioListVideo

func (s *UsersService) ProtfolioListVideo(uid string, p string, opt ...CallOption) ([]*Video, *Response, error)

ProtfolioListVideo lists the video for an portfolio.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/portfolios/%7Bportfolio_id%7D/videos

func (*UsersService) RemovePortrait

func (s *UsersService) RemovePortrait(uid string, pid string) (*Response, error)

RemovePortrait removed specific a portrait. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/pictures/%7Bportraitset_id%7D

func (*UsersService) Search

func (s *UsersService) Search(opt ...CallOption) ([]*User, *Response, error)

Search users.

Vimeo API docs: https://developer.vimeo.com/api/playground/channels/%7Bchannel_id%7D/users

func (*UsersService) SubscribeCategory

func (s *UsersService) SubscribeCategory(uid string, cat string) (*Response, error)

SubscribeCategory subscribe category user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/categories/%7Bcategory%7D

func (*UsersService) SubscribeChannel

func (s *UsersService) SubscribeChannel(uid string, ch string) (*Response, error)

SubscribeChannel subscribe channel user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/channels/%7Bchannel_id%7D

func (*UsersService) UnfollowUser

func (s *UsersService) UnfollowUser(uid string, fid string) (*Response, error)

UnfollowUser unfollow a user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/following/%7Bfollow_user_id%7D

func (*UsersService) UnlikeVideo

func (s *UsersService) UnlikeVideo(uid string, vid int) (*Response, error)

UnlikeVideo unlike one video. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/likes/%7Bvideo_id%7D

func (*UsersService) UnsubscribeCategory

func (s *UsersService) UnsubscribeCategory(uid string, cat string) (*Response, error)

UnsubscribeCategory unsubscribe category current user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/categories/%7Bcategory%7D

func (*UsersService) UnsubscribeChannel

func (s *UsersService) UnsubscribeChannel(uid string, ch string) (*Response, error)

UnsubscribeChannel unsubscribe channel user. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/channels/%7Bchannel_id%7D

func (*UsersService) UploadVideo

func (s *UsersService) UploadVideo(uid string, file *os.File) (*Video, *Response, error)

UploadVideo upload video file. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/videos

func (*UsersService) UploadVideoByURL

func (s *UsersService) UploadVideoByURL(uid string, videoURL string) (*Video, *Response, error)

UploadVideo upload video by url. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/videos

func (*UsersService) WatchLaterAddVideo

func (s *UsersService) WatchLaterAddVideo(uid string, vid int) (*Response, error)

WatchLaterAddVideo add video to watch later list. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/watchlater/%7Bvideo_id%7D

func (*UsersService) WatchLaterDeleteVideo

func (s *UsersService) WatchLaterDeleteVideo(uid string, vid int) (*Response, error)

WatchLaterDeleteVideo delete video from watch later list. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/watchlater/%7Bvideo_id%7D

func (*UsersService) WatchLaterGetVideo

func (s *UsersService) WatchLaterGetVideo(uid string, vid int) (*Video, *Response, error)

WatchLaterGetVideo get specific video by video ID. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/watchlater/%7Bvideo_id%7D

func (*UsersService) WatchLaterListVideo

func (s *UsersService) WatchLaterListVideo(uid string, opt ...CallOption) ([]*Video, *Response, error)

WatchLaterListVideo lists the video. Passing the empty string will edit authenticated user.

Vimeo API docs: https://developer.vimeo.com/api/playground/users/%7Buser_id%7D/watchlater

func (*UsersService) WatchedDeleteVideo

func (s *UsersService) WatchedDeleteVideo(uid string, vid int) (*Response, error)

WatchedDeleteVideo delete specific video from watch history.

Vimeo API docs: https://developer.vimeo.com/api/playground/me/watched/videos/%7Bvideo_id%7D

func (*UsersService) WatchedListVideo

func (s *UsersService) WatchedListVideo(uid string, opt ...CallOption) ([]*Video, *Response, error)

WatchedListVideo lists the video.

Vimeo API docs: https://developer.vimeo.com/api/playground/me/watched/videos

type Video

type Video struct {
	URI           string        `json:"uri,omitempty"`
	Name          string        `json:"name,omitempty"`
	Description   string        `json:"description,omitempty"`
	Link          string        `json:"link,omitempty"`
	Duration      int           `json:"duration,omitempty"`
	Width         int           `json:"width,omitempty"`
	Height        int           `json:"height,omitempty"`
	Language      string        `json:"language,omitempty"`
	Embed         *Embed        `json:"embed,omitempty"`
	CreatedTime   time.Time     `json:"created_time,omitempty"`
	ModifiedTime  time.Time     `json:"modified_time,omitempty"`
	ReleaseTime   time.Time     `json:"release_time,omitempty"`
	ContentRating []string      `json:"content_rating,omitempty"`
	License       string        `json:"license,omitempty"`
	Privacy       *Privacy      `json:"privacy,omitempty"`
	Pictures      *Pictures     `json:"pictures,omitempty"`
	Tags          []*Tag        `json:"tags,omitempty"`
	Stats         *Stats        `json:"stats,omitempty"`
	Categories    []*Category   `json:"categories,omitempty"`
	User          *User         `json:"user,omitempty"`
	Files         []*File       `json:"files,omitempty"`
	App           *App          `json:"app,omitempty"`
	Status        string        `json:"status,omitempty"`
	ResourceKey   string        `json:"resource_key,omitempty"`
	EmbedPresets  *EmbedPresets `json:"embed_presets,omitempty"`
	Upload        *Upload       `json:"upload,omitempty"`
}

Video represents a video.

func (Video) GetID

func (v Video) GetID() int

GetID returns the numeric identifier (ID) of the video.

type VideoRequest

type VideoRequest struct {
	Name          string             `json:"name,omitempty"`
	Description   string             `json:"description,omitempty"`
	License       string             `json:"license,omitempty"`
	Privacy       *Privacy           `json:"privacy,omitempty"`
	Password      string             `json:"password,omitempty"`
	Locale        string             `json:"locale,omitempty"`
	ContentRating []string           `json:"content_rating,omitempty"`
	Embed         *EmbedRequest      `json:"embed,omitempty"`
	ReviewPage    *ReviewPageRequest `json:"review_page,omitempty"`
}

VideoRequest represents a request to edit an video.

type VideosService

type VideosService service

VideosService handles communication with the videos related methods of the Vimeo API.

Vimeo API docs: https://developer.vimeo.com/api/endpoints/videos

func (*VideosService) AddComment

func (s *VideosService) AddComment(vid int, r *CommentRequest) (*Comment, *Response, error)

AddComment add comment.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments

func (*VideosService) AddCredit

func (s *VideosService) AddCredit(vid int, r *CreditRequest) (*Credit, *Response, error)

AddCredit add credit.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/credits

func (*VideosService) AddTextTrack

func (s *VideosService) AddTextTrack(vid int, r *TextTrackRequest) (*TextTrack, *Response, error)

AddTextTrack add text tracks.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/texttracks

func (*VideosService) AllowDomain

func (s *VideosService) AllowDomain(vid int, d string) (*Response, error)

AllowDomain embedding on a domain.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/domains/%7Bdomain%7D

func (*VideosService) AllowUser

func (s *VideosService) AllowUser(vid int, uid string) (*Response, error)

AllowUser allow users to view this video.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/users/%7Buser_id%7D

func (*VideosService) AllowUsers

func (s *VideosService) AllowUsers(vid int) (*Response, error)

AllowUsers allow users to view this video.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/users

func (*VideosService) AssignPreset

func (s *VideosService) AssignPreset(vid int, p int) (*Response, error)

AssignPreset embed preset by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/presets/%7Bpreset_id%7D

func (*VideosService) AssignTag

func (s *VideosService) AssignTag(vid int, t string) (*Response, error)

AssignTag specific tag by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/tags/%7Bword%7D

func (*VideosService) CreatePictures

func (s *VideosService) CreatePictures(vid int, r *PicturesRequest) (*Pictures, *Response, error)

CreatePictures create a thumbnail.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/pictures

func (*VideosService) Delete

func (s *VideosService) Delete(vid int) (*Response, error)

Delete specific video by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D

func (*VideosService) DeleteComment

func (s *VideosService) DeleteComment(vid int, cid int) (*Response, error)

DeleteComment delete specific comment by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments/%7Bcomment_id%7D

func (*VideosService) DeleteCredit

func (s *VideosService) DeleteCredit(vid int, cid int) (*Response, error)

DeleteCredit delete specific credit by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/credits/%7Bcredit_id%7D

func (*VideosService) DeletePictures

func (s *VideosService) DeletePictures(vid int, pid int) (*Response, error)

DeletePictures delete specific pictures by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/pictures/%7Bpicture_id%7D

func (*VideosService) DeleteTextTrack

func (s *VideosService) DeleteTextTrack(vid int, tid int) (*Response, error)

DeleteTextTrack delete specific text track by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/texttracks/%7Btexttrack_id%7D

func (*VideosService) DisallowDomain

func (s *VideosService) DisallowDomain(vid int, d string) (*Response, error)

DisallowDomain embedding on a domain.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/domains/%7Bdomain%7D

func (*VideosService) DisallowUser

func (s *VideosService) DisallowUser(vid int, uid string) (*Response, error)

DisallowUser disallow user from viewing this video.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/users/%7Buser_id%7D

func (*VideosService) Edit

func (s *VideosService) Edit(vid int, r *VideoRequest) (*Video, *Response, error)

Edit specific video by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D

func (*VideosService) EditComment

func (s *VideosService) EditComment(vid int, cid int, r *CommentRequest) (*Comment, *Response, error)

EditComment edit specific comment by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments/%7Bcomment_id%7D

func (*VideosService) EditCredit

func (s *VideosService) EditCredit(vid int, cid int, r *CreditRequest) (*Credit, *Response, error)

EditCredit edit specific credit by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/credits/%7Bcredit_id%7D

func (*VideosService) EditPictures

func (s *VideosService) EditPictures(vid int, pid int, r *PicturesRequest) (*Pictures, *Response, error)

EditPictures edit specific pictures by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/pictures/%7Bpicture_id%7D

func (*VideosService) EditTextTrack

func (s *VideosService) EditTextTrack(vid int, tid int, r *TextTrackRequest) (*TextTrack, *Response, error)

EditTextTrack edit specific text track by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/texttracks/%7Btexttrack_id%7D

func (*VideosService) Get

func (s *VideosService) Get(vid int, opt ...CallOption) (*Video, *Response, error)

Get specific video by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D

func (*VideosService) GetComment

func (s *VideosService) GetComment(vid int, cid int, opt ...CallOption) (*Comment, *Response, error)

GetComment get specific comment by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments/%7Bcomment_id%7D

func (*VideosService) GetCredit

func (s *VideosService) GetCredit(vid int, cid int, opt ...CallOption) (*Credit, *Response, error)

GetCredit get specific credit by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/credits/%7Bcredit_id%7D

func (*VideosService) GetPictures

func (s *VideosService) GetPictures(vid int, pid int, opt ...CallOption) (*Pictures, *Response, error)

GetPictures get one thumbnail.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/pictures

func (*VideosService) GetPreset

func (s *VideosService) GetPreset(vid int, p int) (*Preset, *Response, error)

GetPreset get preset by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/presets/%7Bpreset_id%7D

func (*VideosService) GetTag

func (s *VideosService) GetTag(vid int, t string, opt ...CallOption) (*Tag, *Response, error)

GetTag specific tag by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/tags/%7Bword%7D

func (*VideosService) GetTextTrack

func (s *VideosService) GetTextTrack(vid int, tid int, opt ...CallOption) (*TextTrack, *Response, error)

GetTextTrack get specific text track by ID.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/texttracks/%7Btexttrack_id%7D

func (*VideosService) LikeList

func (s *VideosService) LikeList(vid int, opt ...CallOption) ([]*User, *Response, error)

LikeList lists users who liked this video.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/likes

func (*VideosService) List

func (s *VideosService) List(opt ...CallOption) ([]*Video, *Response, error)

List lists the videos.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos

func (*VideosService) ListCategory

func (s *VideosService) ListCategory(vid int, opt ...CallOption) ([]*Category, *Response, error)

ListCategory lists the video category.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/categories

func (*VideosService) ListComment

func (s *VideosService) ListComment(vid int, opt ...CallOption) ([]*Comment, *Response, error)

ListComment lists the comments.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments

func (*VideosService) ListCredit

func (s *VideosService) ListCredit(vid int, opt ...CallOption) ([]*Credit, *Response, error)

ListCredit lists the credits.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/credits

func (*VideosService) ListDomain

func (s *VideosService) ListDomain(vid int, opt ...CallOption) ([]*Domain, *Response, error)

ListDomain lists the domains.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/domains

func (*VideosService) ListPictures

func (s *VideosService) ListPictures(vid int, opt ...CallOption) ([]*Pictures, *Response, error)

ListPictures lists thumbnails.

https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/pictures

func (*VideosService) ListRelatedVideo

func (s *VideosService) ListRelatedVideo(vid int, opt ...CallOption) ([]*Video, *Response, error)

ListRelatedVideo lists the related video.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/videos

func (*VideosService) ListReplies

func (s *VideosService) ListReplies(vid int, cid int, opt ...CallOption) ([]*Comment, *Response, error)

ListReplies lists the comment replies.

https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/comments/%7Bcomment_id%7D/replies

func (*VideosService) ListTag

func (s *VideosService) ListTag(vid int, opt ...CallOption) ([]*Tag, *Response, error)

ListTag list a video's tags

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/tags

func (*VideosService) ListTextTrack

func (s *VideosService) ListTextTrack(vid int, opt ...CallOption) ([]*TextTrack, *Response, error)

ListTextTrack lists the text tracks.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/texttracks

func (*VideosService) ListUser

func (s *VideosService) ListUser(vid int, opt ...CallOption) ([]*User, *Response, error)

ListUser list the all allowed users

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/privacy/users

func (*VideosService) ReplaceFile

func (s *VideosService) ReplaceFile(vid int, file *os.File) (*Video, *Response, error)

ReplaceFile upload video file/replace video file.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/files

func (*VideosService) UnassignPreset

func (s *VideosService) UnassignPreset(vid int, p int) (*Response, error)

UnassignPreset embed preset by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/presets/%7Bpreset_id%7D

func (*VideosService) UnassignTag

func (s *VideosService) UnassignTag(vid int, t string) (*Response, error)

UnassignTag specific tag by name.

Vimeo API docs: https://developer.vimeo.com/api/playground/videos/%7Bvideo_id%7D/tags/%7Bword%7D

func (*VideosService) UploadPicture

func (s *VideosService) UploadPicture(vid int, r *PicturesRequest, file *os.File) (*Pictures, *Response, error)

UploadPicture shortcut upload picture file.

type WebSite

type WebSite struct {
	Name        string `json:"name,omitempty"`
	Link        string `json:"link,omitempty"`
	Description string `json:"description,omitempty"`
}

WebSite represents a web site.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL