The Category class provides methods to group your videos together into categories.
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@category = Sorenson::Services::Category.create('test')
@categories = Sorenson::Services::Category.all
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@parent = Sorenson::Services::Category.create('parent')
@child = Sorenson::Services::Category.create('child')
@child.parent_id = @parent.id
@child.save
@categories = Sorenson::Services::Category.all_roots
@account = Sorenson::Services::Account.login("integrum@integrumtech.com", "integrum", "1234")
@category = Sorenson::Services::Category.create('new name')
@category = Sorenson::Services::Category.find_by_name('new name')
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@category = Sorenson::Services::Category.create('test category')
@category = Sorenson::Services::Category.find(@category.id)
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@category = Sorenson::Services::Category.create('new')
| Parameter | Data Type | Sample Value | Required | Description |
|---|---|---|---|---|
| id | Yes | |||
| category[name] | string | No | ||
| category[parent_name] | string | No | ||
| category[description] | string | No |
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@category = Sorenson::Services::Category.create('a site')
@category.description = 'new description'
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@category = Sorenson::Services::Category.create(name)
@category.destroy
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@category = @asset.add_category('cat_name')
@category = @asset.category
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@category = @asset.add_category('a category')
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@category = @asset.add_category('new category')
@category = Sorenson::Services::Category.find_by_name('new category')
@assets = @category.assets