To use the sdk in your application, you need to include the package: "github.com/broadpeak-io/go-sdk"
The main object of the SDK is broadpeakio. The Broadpeak object can be initialized using the below code:
broadpeak := broadpeakio.MakeClient(apiKey)
API key: You can get the API key from account settings > API keys.
Once you add the broadpeakio package and instantiate the broadpeak object you can call the methods of your choice by referencing those methods using the broadpeak object. For example:
response, error := broadpeak.GetAllSources(0,0)
Following are the methods defined in the SDK with their required parameters and the expected response from the API call.
response, err := broadpeak.GetAllSources(offset, limit)
Parameters | Type | Definition |
---|---|---|
Offset | uint | Offset of the first result to return |
Limit | uint | Maximum number of results to return |
The response will be of the type []SourceOutput
Type SourceOutput
is defined as:
{
Id uint `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Type string `json:"type"`
Format string `json:"format"`
}
response, err = broadpeak.CheckSourceStatus(sourceType, sourceUrl)
Parameters | Type | Definition |
---|---|---|
sourceType | string | Type of the source to be checked (live, asset...) |
sourceUrl | string | URL of the source to be checked |
The response will be of the type SourceStatusOutput
Type SourceStatusOutput
is defined as:
{
MessageText string `json:"messageText"`
SeverityLEvel string `json:"severityLevel"`
}
response, err := broadpeak.CreateLiveSource(options)
Parameters | Type | Definition |
options | LiveSource |
|
The response will be of the type LiveOutput
Type LiveOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.GetLiveSource(Id)
Parameters | Type | Definition |
id | uint | Id of the live source assigned by broadpeak.io |
The response will be of the type LiveOutput
Type LiveOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateLiveSource(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the live source assigned by broadpeak.io |
updateOptions | LiveSource |
|
The response will be of the type LiveOutput
Type LiveOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteLiveSource(Id)
Parameters | Type | Definition |
id | uint | Id of the live source assigned by broadpeak.io |
The response will be of the type LiveOutput
Type LiveOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err := broadpeak.CreateAsset(options)
Parameters | Type | Definition |
options | Asset |
|
The response will be of the type AssetOutput
Type AssetOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.GetAsset(Id)
Parameters | Type | Definition |
id | uint | Id of the asset source assigned by broadpeak.io |
The response will be of the type AssetOutput
Type AssetOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateAsset(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the asset source assigned by broadpeak.io |
updateOptions | Asset |
|
The response will be of the type AssetOutput
Type AssetOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteAsset(Id)
Parameters | Type | Definition |
id | uint | Id of the asset source assigned by broadpeak.io |
The response will be of the type AssetOutput
Type AssetOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
Format string `json:"format"`
Id uint `json:"id"`
}
response, err := broadpeak.CreateAssetCatalog(options)
Parameters | Type | Definition |
options | AssetCatalog |
|
The response will be of the type AssetCatalogOutput
Type AssetCatalogOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
AssetSample string `json:"assetSample"`
Id uint `json:"id"`
}
response, err = broadpeak.GetAssetCatalog(Id)
Parameters | Type | Definition |
id | uint | Id of the asset catalog source assigned by broadpeak.io |
The response will be of the type AssetCatalogOutput
Type AssetCatalogOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
AssetSample string `json:"assetSample"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateAssetCatalog(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the asset catalog source assigned by broadpeak.io |
updateOptions | AssetCatalog |
|
The response will be of the type AssetCatalogOutput
Type AssetCatalogOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
AssetSample string `json:"assetSample"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteAssetCatalog(Id)
Parameters | Type | Definition |
id | uint | Id of the asset catalog source assigned by broadpeak.io |
The response will be of the type AssetCatalogOutput
Type AssetCatalogOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
BackupIp string `json:"backupIp"`
AssetSample string `json:"assetSample"`
Id uint `json:"id"`
}
response, err := broadpeak.CreateSlate(options)
Parameters | Type | Definition |
options | Slate |
|
The response will be of the type SlateOutput
Type SlateOutput
is defined as:
{
Id uint `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Description string `json:"description"`
Format string `json:"format"`
}
response, err = broadpeak.GetSlate(Id)
Parameters | Type | Definition |
id | uint | Id of the slate source assigned by broadpeak.io |
The response will be of the type SlateOutput
Type SlateOutput
is defined as:
{
Id uint `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Description string `json:"description"`
Format string `json:"format"`
}
response, err = broadpeak.UpdateSlate(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the slate source assigned by broadpeak.io |
updateOptions | Slate |
|
The response will be of the type SlateOutput
Type SlateOutput
is defined as:
{
Id uint `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Description string `json:"description"`
Format string `json:"format"`
}
response, err = broadpeak.DeleteSlate(Id)
Parameters | Type | Definition |
id | uint | Id of the slate source assigned by broadpeak.io |
The response will be of the type SlateOutput
Type SlateOutput
is defined as:
{
Id uint `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Description string `json:"description"`
Format string `json:"format"`
}
response, err := broadpeak.CreateAdServer(options)
Parameters | Type | Definition |
options | AdServer |
|
The response will be of the type AdServerOutput
Type AdServerOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
Queries string `json:"queries"`
Template string `json:"template"`
Id uint `json:"id"`
}
response, err = broadpeak.GetAdServer(Id)
Parameters | Type | Definition |
id | uint | Id of the ad server source assigned by broadpeak.io |
The response will be of the type AdServerOutput
Type AdServerOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
Queries string `json:"queries"`
Template string `json:"template"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateAdServer(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the ad server source assigned by broadpeak.io |
updateOptions | AdServer |
|
The response will be of the type AdServerOutput
Type AdServerOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
Queries string `json:"queries"`
Template string `json:"template"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteAdServer(Id)
Parameters | Type | Definition |
id | uint | Id of the ad server source assigned by broadpeak.io |
The response will be of the type AdServerOutput
Type AdServerOutput
is defined as:
{
Name string `json:"name"`
Description string `json:"description"`
Url string `json:"url"`
Queries string `json:"queries"`
Template string `json:"template"`
Id uint `json:"id"`
}
response, err := broadpeak.GetAllServices(offset, limit)
Parameters | Type | Definition |
Offset | uint | Offset of the first result to return. |
Limit | uint | Maximum number of results to return |
The response will be of the type []ServiceOutput
Type ServiceOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
Id uint `json:"id"`
Type []string `json:"type"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err := broadpeak.CreateContentReplacement(options)
Parameters | Type | Definition |
options | CreateContentReplacement |
|
The response will be of the type ContentReplacementOutput
Type ContentReplacementOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
Replacement IdNameUrlType `json:"replacement"`
Source IdNameUrlType `json:"source"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.GetContentReplacement(Id)
Parameters | Type | Definition |
id | uint | Id of the service |
The response will be of the type ContentReplacementOutput
Type ContentReplacementOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
Replacement IdNameUrlType `json:"replacement"`
Source IdNameUrlType `json:"source"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.UpdateContentReplacement(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the service |
updateOptions | UpdateContentReplacement |
|
The response will be of the type ContentReplacementOutput
Type ContentReplacementOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
Replacement IdNameUrlType `json:"replacement"`
Source IdNameUrlType `json:"source"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.DeleteContentReplacement(Id)
Parameters | Type | Definition |
id | uint | Id of the service |
The response will be of the type ContentReplacementOutput
Type ContentReplacementOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
Replacement IdNameUrlType `json:"replacement"`
Source IdNameUrlType `json:"source"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err := broadpeak.CreateContentReplacementSlot(serviceId, options)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
options | CreateContentReplacementSlot |
|
The response will be of the type ContentReplacementSlotOutput
Type ContentReplacementSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category CategoryOutput `json:"category"`
Id uint `json:"id"`
}
response, err = broadpeak.GetContentReplacementSlot(serviceId, Id)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the content replacement slot |
The response will be of the type ContentReplacementSlotOutput
Type ContentReplacementSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category CategoryOutput `json:"category"`
Id uint `json:"id"`
}
response, err = broadpeak.GetAllContentReplacementSlots(serviceId, getAllSlotsOptions)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
getAllSlotsOptions | GetAllSlots |
|
The response will be of the type []ContentReplacementSlotOutput
Type ContentReplacementSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category CategoryOutput `json:"category"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateContentReplacementSlot(serviceId, Id, updateOptions)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the content replacement slot |
updateOptions | UpdateContentReplacementSlot |
|
The response will be of the type ContentReplacementSlotOutput
Type ContentReplacementSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category CategoryOutput `json:"category"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteContentReplacementSlot(serviceId, Id)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the content replacement slot |
The response will be of the type ContentReplacementSlotOutput
Type ContentReplacementSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category CategoryOutput `json:"category"`
Id uint `json:"id"`
}
response, err := broadpeak.CreateVirtualChannel(options)
Parameters | Type | Definition |
options | CreateVirtualChannel |
|
The response will be of the type VirtualChannelOutput
Type VirtualChannelOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
AdBreakInsertion AdBreakInsertionOutput `json:"adBreakInsertion"`
TranscodingProfiles TranscodingProfileOutput `json:"transcodingProfile"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
BaseLive IdNameUrlType `json:"baseLive"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.GetVirtualChannel(Id)
Parameters | Type | Definition |
id | uint | Id of the virtual channel |
The response will be of the type VirtualChannelOutput
Type VirtualChannelOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
AdBreakInsertion AdBreakInsertionOutput `json:"adBreakInsertion"`
TranscodingProfiles TranscodingProfileOutput `json:"transcodingProfile"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
BaseLive IdNameUrlType `json:"baseLive"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.UpdateVirtualChannel(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the virtual channel |
updateOptions | UpdateVirtualChannel |
|
The response will be of the type VirtualChannelOutput
Type VirtualChannelOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
AdBreakInsertion AdBreakInsertionOutput `json:"adBreakInsertion"`
TranscodingProfiles TranscodingProfileOutput `json:"transcodingProfile"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
BaseLive IdNameUrlType `json:"baseLive"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err = broadpeak.DeleteVirtualChannel(Id)
Parameters | Type | Definition |
id | uint | Id of the virtual channel |
The response will be of the type VirtualChannelOutput
Type VirtualChannelOutput
is defined as:
{
Name string `json:"name"`
EnvironmentTags []string `json:"environmentTags"`
AdBreakInsertion AdBreakInsertionOutput `json:"adBreakInsertion"`
TranscodingProfiles TranscodingProfileOutput `json:"transcodingProfile"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
BaseLive IdNameUrlType `json:"baseLive"`
Id uint `json:"id"`
Url string `json:"url"`
UpdateDate string `json:"updateDate"`
CreationDate string `json:"creationDate"`
}
response, err := broadpeak.CreateVirtualChannelSlot(serviceId, options)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
options | CreateVirtualChannelSlot |
|
The response will be of the type VirtualChannelSlotOutput
Type VirtualChannelSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category Identifiable `json:"category"`
Type string `json:"type"`
}
response, err = broadpeak.GetVirtualChannelSlot(serviceId, Id)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the virtual channel slot |
The response will be of the type VirtualChannelSlotOutput
Type VirtualChannelSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category Identifiable `json:"category"`
Type string `json:"type"`
}
response, err = broadpeak.GetAllVirtualChannelSlots(serviceId, getAllSlotsOptions)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
getAllSlotsOptions | GetAllSlots |
|
The response will be of the type []VirtualChannelSlotOutput
Type VirtualChannelSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category Identifiable `json:"category"`
Type string `json:"type"`
}
response, err = broadpeak.UpdateVirtualChannelSlot(serviceId, Id, updateOptions)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the virtual channel slot |
updateOptions | UpdateVirtualChannelSlot |
|
The response will be of the type VirtualChannelSlotOutput
Type VirtualChannelSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category Identifiable `json:"category"`
Type string `json:"type"`
}
response, err = broadpeak.DeleteVirtualChannelSlot(serviceId, Id)
Parameters | Type | Definition |
serviceId | uint | Id of the service |
id | uint | Id of the virtual channel slot |
The response will be of the type VirtualChannelSlotOutput
Type VirtualChannelSlotOutput
is defined as:
{
Name string `json:"name"`
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
Duration uint `json:"duration"`
Replacement IdNameUrlType `json:"replacement"`
Category Identifiable `json:"category"`
Type string `json:"type"`
}
response, err := broadpeak.CreateAdInsertion(options)
Parameters | Type | Definition |
options | CreateAdInsertion |
|
The response will be of the type AdInsertionOutput
Type AdInsertionOutput
is defined as:
{
Name string `json:"name,omitempty"`
EnvironmentTags []string `json:"environmentTags,omitempty"`
LiveAdPreRoll LiveAdPreRollOutput `json:"liveAdPreRoll"`
LiveAdReplacement LiveAdReplacementOutput `json:"liveAdReplacement"`
VodAdInsertion VodAdInsertionOutput `json:"vodAdInsertion"`
TranscodingProfile NameContentId `json:"transcodingProfile"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
Source IdNameUrlQueries `json:"source"`
Id uint `json:"id"`
CreationDate string `json:"creationDate"`
UpdateDate string `json:"updateDate"`
Url string `json:"url"`
}
response, err = broadpeak.GetAdInsertion(Id)
Parameters | Type | Definition |
id | uint | Id of the ad-insertion service |
The response will be of the type AdInsertionOutput
Type AdInsertionOutput
is defined as:
{
Name string `json:"name,omitempty"`
EnvironmentTags []string `json:"environmentTags,omitempty"`
LiveAdPreRoll LiveAdPreRollOutput `json:"liveAdPreRoll"`
LiveAdReplacement LiveAdReplacementOutput `json:"liveAdReplacement"`
VodAdInsertion VodAdInsertionOutput `json:"vodAdInsertion"`
TranscodingProfile NameContentId `json:"transcodingProfile"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
Source IdNameUrlQueries `json:"source"`
Id uint `json:"id"`
CreationDate string `json:"creationDate"`
UpdateDate string `json:"updateDate"`
Url string `json:"url"`
}
response, err = broadpeak.UpdateAdInsertion(Id, updateOptions)
Parameters | Type | Definition |
id | uint | Id of the ad-insertion service |
updateOptions | updateAdInsertion |
|
The response will be of the type AdInsertionOutput
Type AdInsertionOutput
is defined as:
{
Name string `json:"name,omitempty"`
EnvironmentTags []string `json:"environmentTags,omitempty"`
LiveAdPreRoll LiveAdPreRollOutput `json:"liveAdPreRoll"`
LiveAdReplacement LiveAdReplacementOutput `json:"liveAdReplacement"`
VodAdInsertion VodAdInsertionOutput `json:"vodAdInsertion"`
TranscodingProfile NameContentId `json:"transcodingProfile"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
Source IdNameUrlQueries `json:"source"`
Id uint `json:"id"`
CreationDate string `json:"creationDate"`
UpdateDate string `json:"updateDate"`
Url string `json:"url"`
}
response, err = broadpeak.DeleteAdInsertion(Id)
Parameters | Type | Definition |
id | uint | Id of the ad-insertion service |
The response will be of the type AdInsertionOutput
Type AdInsertionOutput
is defined as:
{
Name string `json:"name,omitempty"`
EnvironmentTags []string `json:"environmentTags,omitempty"`
LiveAdPreRoll LiveAdPreRollOutput `json:"liveAdPreRoll"`
LiveAdReplacement LiveAdReplacementOutput `json:"liveAdReplacement"`
VodAdInsertion VodAdInsertionOutput `json:"vodAdInsertion"`
TranscodingProfile NameContentId `json:"transcodingProfile"`
EnableAdTranscoding bool `json:"enableAdTranscoding"`
ServerSideAdTracking ServerSideAdTracking `json:"serverSideAdTracking"`
Source IdNameUrlQueries `json:"source"`
Id uint `json:"id"`
CreationDate string `json:"creationDate"`
UpdateDate string `json:"updateDate"`
Url string `json:"url"`
}
response, err := broadpeak.GetAllTranscodingProfiles(offset, limit)
Parameters | Type | Definition |
Offset | uint | Offset of the first result to return. |
Limit | uint | Maximum number of results to return |
The response will be of the type []TranscodingProfileOutput
Type TranscodingProfileOutput
is defined as:
{
Name string `json:"name"`
Content string `json:"content"`
Id uint `json:"id"`
}
response, err = broadpeak.GetTranscodingProfile(Id)
Parameters | Type | Definition |
id | uint | Id of the transcoding profile |
The response will be of the type TranscodingProfileOutput
Type TranscodingProfileOutput
is defined as:
{
Name string `json:"name"`
Content string `json:"content"`
Id uint `json:"id"`
}
response, err := broadpeak.CreateUpdateMediaPoint(id)
Parameters | Type | Definition |
id | string | Media point id |
The response will be of the type string
response, err = broadpeak.GetMediaPoint(Id)
Parameters | Type | Definition |
id | string | id of an existing MediaPoint |
response, err := broadpeak.CreateCategory(name, subcategories)
Parameters | Type | Definition |
name | string | Name of the Category |
subcategories | []Subcategory |
Array of type SubCategory:
|
The response will be of the type []CategoryOutput
Type CategoryOutput
is defined as:
{
Name string `json:"name"`
Subcategory []Subcategory `json:"subcategories"`
Id uint `json:"id"`
}
response, err = broadpeak.GetCategory(Id)
Parameters | Type | Definition |
id | uint | Id of the category |
The response will be of the type CategoryOutput
Type CategoryOutput
is defined as:
{
Name string `json:"name"`
Subcategory []Subcategory `json:"subcategories"`
Id uint `json:"id"`
}
response, err := broadpeak.GetAllCategories(offset, limit)
Parameters | Type | Definition |
Offset | uint | Offset of the first result to return. |
Limit | uint | Maximum number of results to return |
The response will be of the type []CategoryOutput
Type CategoryOutput
is defined as:
{
Name string `json:"name"`
Subcategory []Subcategory `json:"subcategories"`
Id uint `json:"id"`
}
response, err = broadpeak.UpdateCategory(id, name, subcategories)
Parameters | Type | Definition |
id | uint | Category id |
name | string | Category Name |
SubCategories | []Subcategory |
Array of type SubCategory:
|
The response will be of the type CategoryOutput
Type CategoryOutput
is defined as:
{
Name string `json:"name"`
Subcategory []Subcategory `json:"subcategories"`
Id uint `json:"id"`
}
response, err = broadpeak.DeleteCategory(Id)
Parameters | Type | Definition |
id | uint | Category id |
The response will be of the type string
response, err = broadpeak.GetUser(Id)
Parameters | Type | Definition |
id | uint | Id of the user |
The response will be of the type UserOutput
Type UserOutput
is defined as:
{
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
TenantId string `json:"tenantId"`
}
response, err := broadpeak.GetAllUsers(offset, limit, withEmailStatus)
Parameters | Type | Definition |
Offset | uint | Offset of the first result to return. |
Limit | uint | Maximum number of results to return |
withEmailStatus | bool | Get email status flag |
The response will be of the type []UserOutput
Type UserOutput
is defined as:
{
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
TenantId string `json:"tenantId"`
}
response, err = broadpeak.UpdateUser(Id, updateOptions)
Parameters | Type | Definition |
id | uint | User id |
updateOptions | User |
|
The response will be of the type UserOutput
Type UserOutput
is defined as:
{
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
TenantId string `json:"tenantId"`
}
response, err = broadpeak.DeleteUser(Id)
Parameters | Type | Definition |
id | uint | User id |
The response will be of the type string
response, err = broadpeak.ApplicationStatus()
The method call requires no parameters
The response will be of the type string