Name: zencoder
Owner: Medium
Description: Go interface for Zencoder API
Forked from: go-zencoder/zencoder
Created: 2017-01-31 00:05:44.0
Updated: 2017-01-31 00:05:46.0
Pushed: 2017-01-31 03:04:53.0
Size: 38
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Go integration for Zencoder API video transcoding service.
Godoc documentation is available at http://godoc.org/github.com/go-zencoder/zencoder.
get github.com/go-zencoder/zencoder
Ensure you have imported the zencoder package at the top of your source file.
rt "github.com/go-zencoder/zencoder"
All Zencoder methods are on the Zencoder struct. Create a new one bound to your API key using `zencoder.NewZencoder
`.
ake sure you replace [YOUR API KEY HERE] with your API key
= zencoder.NewZencoder("[YOUR API KEY HERE]")
ings := &zencoder.EncodingSettings{
Input: "s3://zencodertesting/test.mov",
Test: true,
err := zc.CreateJob(settings)
, err := zc.ListJobs()
ils, err := zc.GetJobDetails(12345)
ress, err := zc.GetJobProgress(12345)
:= zc.ResubmitJob(12345)
:= zc.CancelJob(12345)
:= zc.FinishLiveJob(12345)
ils, err := zc.GetInputDetails(12345)
ress, err := zc.GetInputProgress(12345)
ils, err := zc.GetOutputDetails(12345)
ress, err := zc.GetOutputProgress(12345)
unt, err := zc.GetAccount()
:= zc.SetIntegrationMode()
:= zc.SetLiveMode()
All reporting interfaces take either `nil
or a ``
ReportSettings``` object.
Using `nil
denotes to use default settings. In this case, assume ``
settings``` in the examples below is defined as:
settings *zencoder.ReportSettings = nil
A `ReportSettings
` object can either be constructed manually as in:
start, end time.Date
ings := &zencoder.ReportSettings{
From: &start,
To: &end,
Grouping: "key",
Or, you can use a Fluent-style interface to build a `ReportSettings
` object, as in:
start, end time.Date
ings := zencoder.ReportFrom(start).To(time).Grouping("key")
e, err := zc.GetVodUsage(settings)
e, err := zc.GetLiveUsage(settings)
e, err := zc.GetUsage(settings)
See Zencoder API documentation for all encoding settings available in zencoder.EncodingSettings. All settings are currently supported, with the main difference being the casing of the options to fit with Go naming conventions.
Please see CONTRIBUTING.md. If you have a bugfix or new feature that you would like to contribute, please find or open an issue about it first.
Licensed under the MIT License.