forked from simplesurance/bunny-go
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideolibrary_add.go
23 lines (19 loc) · 928 Bytes
/
videolibrary_add.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package bunny
import "context"
// VideoLibraryAddOptions are the request parameters for the Get Video Library API endpoint.
//
// Bunny.net API docs: https://docs.bunny.net/reference/videolibrarypublic_add
type VideoLibraryAddOptions struct {
// The name of the Video Library.
Name *string `json:"Name,omitempty"`
// The geo-replication regions of the underlying storage zone (Optional)
ReplicationRegions []string `json:"ReplicationRegions,omitempty"`
}
// Add creates a new Video Library.
// opts and the non-optional parameters in the struct must be specified for a successful request.
// On success the created VideoLibrary is returned.
//
// Bunny.net API docs: https://docs.bunny.net/reference/videolibrarypublic_add
func (s *VideoLibraryService) Add(ctx context.Context, opts *VideoLibraryAddOptions) (*VideoLibrary, error) {
return resourcePostWithResponse[VideoLibrary](ctx, s.client, "/videolibrary", opts)
}