diff --git a/compress/api_category.go b/compress/api_category.go index f547ee9..af26fc9 100644 --- a/compress/api_category.go +++ b/compress/api_category.go @@ -41,7 +41,11 @@ func (o *compress) GetCategories() ([]Category, error) { * @param {string} customer * @returns list of categories of the customer */ -func (o *compress) CreateCategory( requestBody createCategoryRequest ) (*Category, error) { +func (o *compress) CreateCategory( name string ) (*Category, error) { + requestBody := &createCategoryRequest{ + BaseModel: BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey}, + CategoryName: name, + } if errs := validator.Validate(requestBody); errs != nil { // values not valid, deal with errors here return nil, errs diff --git a/compress/api_upload.go b/compress/api_upload.go index 235630e..84b4937 100644 --- a/compress/api_upload.go +++ b/compress/api_upload.go @@ -118,7 +118,7 @@ func (o *compress) SetPublishedUpload( jobid, published int ) (*VideoUploadInfo requestBody := &publishedUploadRequest{ BaseModel: BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey}, JobId: jobid, - Published: published + Published: published, } // if errs := validator.Validate(requestBody); errs != nil { diff --git a/compress/compress.go b/compress/compress.go index 08a3829..1573942 100644 --- a/compress/compress.go +++ b/compress/compress.go @@ -17,7 +17,7 @@ type ICompress interface { SetPublishedUpload( jobid, published int ) (*VideoUploadInfo, error) UploadS3(destinationFolder string, filename string) error GetCategories() ([]Category, error) - CreateCategory(requestBody createCategoryRequest) (*Category, error) + CreateCategory( name string ) (*Category, error) GetRestreamers( startFrom, amount int ) ([]Restreamer, error) GetSingleRestreamer( instanceName string ) (*Restreamer, error) //