All URIs are relative to https://ws.api.video
Method | HTTP request | Description |
---|---|---|
Upload | Post /watermarks | Upload a watermark |
Delete | Delete /watermarks/{watermarkId} | Delete a watermark |
List | Get /watermarks | List all watermarks |
UploadFile(file *os.File) (*Watermark, error) Upload(fileName string, fileReader io.Reader) UploadFileWithContext(ctx context.Context, file *os.File) (*Watermark, error) UploadWithContext(ctx context.Context, fileName string, fileReader io.Reader)
Upload a watermark
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build()
file := os.NewFile(1234, "some_file") // *os.File | The `.jpg` or `.png` image to be added as a watermark.
res, err := client.Watermarks.UploadFile(file)
// you can also use a Reader instead of a File:
// client.Watermarks.Upload(fileName, fileReader)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Watermarks.Upload``: %v\n", err)
}
// response from `Upload`: Watermark
fmt.Fprintf(os.Stdout, "Response from `Watermarks.Upload`: %v\n", res)
}
Name | Type | Description | Notes |
---|---|---|---|
file | *os.File | The `.jpg` or `.png` image to be added as a watermark. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delete(watermarkId string) (error)
DeleteWithContext(ctx context.Context, watermarkId string) (error)
Delete a watermark
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build()
watermarkId := "watermark_1BWr2L5MTQwxGkuxKjzh6i" // string | The watermark ID for the watermark you want to delete.
err := client.Watermarks.Delete(watermarkId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Watermarks.Delete``: %v\n", err)
}
}
Name | Type | Description | Notes |
---|---|---|---|
watermarkId | string | The watermark ID for the watermark you want to delete. |
Name | Type | Description | Notes |
---|
(empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List(r WatermarksApiListRequest) (*WatermarksListResponse, error)
ListWithContext(ctx context.Context, r WatermarksApiListRequest) (*WatermarksListResponse, error)
List all watermarks
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build()
req := apivideosdk.WatermarksApiListRequest{}
req.SortBy("createdAt") // string | Allowed: createdAt. You can search by the time watermark were created at.
req.SortOrder("asc") // string | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)
res, err := client.Watermarks.List(req)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Watermarks.List``: %v\n", err)
}
// response from `List`: WatermarksListResponse
fmt.Fprintf(os.Stdout, "Response from `Watermarks.List`: %v\n", res)
}
Name | Type | Description | Notes |
---|---|---|---|
sortBy | string | Allowed: createdAt. You can search by the time watermark were created at. | |
sortOrder | string | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. | |
currentPage | int32 | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] |
pageSize | int32 | Results per page. Allowed values 1-100, default is 25. | [default to 25] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]