Go SDK is now available!

Hi everyone!

A new SDK is out to help you integrate videos into your app or software! This client will help you with your Golang application.

  • You can use Go modules

  • The minimum version required of Golang is 1.12

  • You can find the documentation here

  • To get started :key::

//Connect to the API
client := apivideosdk.NewClient("YourApiKey")
//Upload a video
//First create a container
videoRequest := &apivideosdk.VideoRequest{
	Title: "My video title",
}
newVideo, err := client.Videos.Create(videoRequest)
if err != nil {
	fmt.Println(err)
}
//Then upload your video to the container with the videoID
uploadedVideo, err := client.Videos.Upload(newVideo.VideoID, "path/to/video.mp4")
if err != nil {
	fmt.Println(err)
}
//And get the assets
fmt.Printf("%s\n", uploadedVideo.Assets.Hls)
fmt.Printf("%s\n", uploadedVideo.Assets.Iframe)

This is an Alpha version so it can evolve. Any feedback to improve it is welcome!

4 Likes