Documentation ¶
Index ¶
- type Credentials
- type DownloadResponse
- type EndpointConfig
- type RequestParams
- type Storyblocks
- func (api *Storyblocks) Auth(endpoint string) map[string]string
- func (api *Storyblocks) DownloadVideo(params VideoDownloadParams) (DownloadResponse, error)
- func (api *Storyblocks) Request(endpointFn func(map[string]interface{}) (string, url.Values), method string, ...) (map[string]interface{}, error)
- func (api *Storyblocks) VideoSearch(params map[string]interface{}) (map[string]interface{}, error)
- type VideoDownloadParams
- type VideoSearchParams
- type VideoSearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type DownloadResponse ¶
type EndpointConfig ¶
type RequestParams ¶
type Storyblocks ¶
type Storyblocks struct { Prefix string Credentials Credentials User_ID string Project_ID string // contains filtered or unexported fields }
func NewStoryBlocks ¶
func NewStoryBlocks(credentials Credentials, endpoints []EndpointConfig) *Storyblocks
func (*Storyblocks) DownloadVideo ¶
func (api *Storyblocks) DownloadVideo(params VideoDownloadParams) (DownloadResponse, error)
func (*Storyblocks) VideoSearch ¶
func (api *Storyblocks) VideoSearch(params map[string]interface{}) (map[string]interface{}, error)
type VideoDownloadParams ¶
type VideoDownloadParams struct { APIKey string `validate:"required"` Expires string `validate:"required"` HMAC string `validate:"required"` ProjectID string `validate:"required"` UserID string `validate:"required"` StockItemID int `validate:"required"` }
func (VideoDownloadParams) VideoDownloadToMap ¶
func (params VideoDownloadParams) VideoDownloadToMap() map[string]interface{}
type VideoSearchParams ¶
type VideoSearchParams struct { APIKey string `json:"APIKEY" validate:"required"` Expires string `json:"EXPIRES" validate:"required"` HMAC string `json:"HMAC" validate:"required"` ProjectID string `json:"project_id" validate:"required"` UserID string `json:"user_id" validate:"required"` Keywords *string `json:"keywords"` // Optional fields can be pointers ContentType *string `json:"content_type"` Quality *string `json:"quality"` MinDuration *int `json:"min_duration"` MaxDuration *int `json:"max_duration"` HasTalentReleased *bool `json:"has_talent_released"` HasPropertyReleased *bool `json:"has_property_released"` HasAlpha *bool `json:"has_alpha"` IsEditorial *bool `json:"is_editorial"` Categories *string `json:"categories"` Page *int `json:"page"` ResultsPerPage *int `json:"results_per_page"` SortBy *string `json:"sort_by"` SortOrder *string `json:"sort_order"` RequiredKeywords *string `json:"required_keywords"` FilteredKeywords *string `json:"filtered_keywords"` Translate *bool `json:"translate"` SourceLanguage *string `json:"source_language"` SafeSearch *bool `json:"safe_search"` LibraryIDs *string `json:"library_ids"` ExcludeLibraryIDs *string `json:"exclude_library_ids"` ContentScores *bool `json:"content_scores"` FrameRates *string `json:"frame_rates"` Extended *string `json:"extended"` IsVR360 *bool `json:"is_vr_360"` }
func (VideoSearchParams) VideoSearchToMap ¶
func (params VideoSearchParams) VideoSearchToMap() map[string]interface{}
type VideoSearchResponse ¶
type VideoSearchResponse struct { Status string Message string TotalResults int `json:"total_results"` Results []struct { ID int `json:"id"` Title string `json:"title"` Type string `json:"type"` ThumbnailURL string `json:"thumbnail_url"` PreviewUrls struct { Ten80P string `json:"_180p"` Three60P string `json:"_360p"` Four80P string `json:"_480p"` Seven20P string `json:"_720p"` } `json:"preview_urls"` Duration int `json:"duration"` IsNew bool `json:"is_new"` } `json:"results"` }
Click to show internal directories.
Click to hide internal directories.