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