Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
/ gomnia Public archive

Makeshift API Client for 3q's nexxOmnia. Work in progress, only partial implementation.

License

Notifications You must be signed in to change notification settings

alex-berlin-tv/gomnia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go nexxOMNIA API

Link to documentation

Partial API Implementation for nexxOMNIA. This library is published as it is with no guarantee for support and/or bugfixes.

go get github.com/alex-berlin-tv/nexx_omnia_go

Creating a client

In Omnia go to »Domains« and open the info panel of your Domain. There you will find the information as follows:

Name in Frontend Field in Code
ID <DOMAIN_ID>
API Secret <API_SECRET>
Management API Session <DOMAIN_ID>

Location of the fields in the domain information, see table above

client := omnia.NewClient("<DOMAIN_ID>", "<API_SECRET>", "<SESSION_ID>")

Get an audio file by id

// Get Audio file with ID 2342
rsl, err := client.ById(enum.AudioStreamType, 2342, nil)
if err != nil {
    log.Error(err)
}
fmt.Printf("%+v", rsl.Result)

The structure of rsl.Result depends on the method used. In this instance a omnia.MediaResultItem will be returned.

Change the metadata of a media item

Example for calling the update method:

_, err := client.update(enum.AudioStreamType, 2342, params.Custom{
    "title": "Fnord!",
})
if err != nil {
    log.Error(err)
}

There is currently no hard coded parameter implementation for all available attributes you can change with the update method. The API provides a list with all available fields:

rsl, _ := client.EditableAttributes(enum.VideoStreamType)
fmt.Printf("%+v", rsl.Result)

About

Makeshift API Client for 3q's nexxOmnia. Work in progress, only partial implementation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published