The Asset class provides methods to fetch and interact with videos uploaded to your account.
Sorenson::ThreeSixty::Account.login("example@sorensonmedia.com", "sorensonExample")
# get number of assets given the specified count starting at the given offset
assets = Sorenson::ThreeSixty::Asset.all(0, 2)
acct.getAssets(offset, count)
// authenticate and get an account object
$account = S360_Account::login("username", "password");
$offset= 0;
$numberToGet = 5;
// get an array of asset objects
$asset_list = $account->getAssets($offset, $numberToGet);
try {
// authenticate over ssl connection
Account acct = Account.login("bob", "bob");
int offset = 0;
int numToRetrieve = 5;
List assetList = acct.getAssets(offset, numToRetrieve);
// use asset list
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
int offset = 0;
int numToRetrieve = 5;
ArrayList assetList = acct.getAssets(offset, numToRetrieve);
// use asset list
...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
// authenticate and get an account object
$account = S360_Account::login("username", "password");
$offset = 0;
$numToGet = 1;
// get first asset
$asset_list = $account->getAssets($offset, $numToGet);
$asset = $asset_list[0];
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@asset.preset_xml
// authenticate and get an account object
$account = S360_Account::login("username", "password");
$offset = 0;
$numToGet = 1;
// get first asset
$asset_list = $account->getAssets($offset, $numToGet);
$asset = $asset_list[0];
// print out the preset xml for the given asset
echo $asset->presetXml;
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// get the preset xml string
String assetPresetXml = theAsset.getPresetXML();
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// get the preset xml string
String assetPresetXml = theAsset.getPresetXML();
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Account.all.first)
@asset.deactivate
@asset.activate
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// deactivate the asset
theAsset.deavtivate();
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// deactivate the asset
theAsset.deavtivate();
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Account.all.first)
@asset.deactivate
@asset.activate
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// activate the asset
theAsset.avtivate();
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// activate the asset
theAsset.avtivate();
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Asset.all.first)
@asset.destroy
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// delete the asset
theAsset.deleteAsset();
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// delete the asset
theAsset.deleteAsset();
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
| Parameter | Data Type | Sample Value | Required | Description |
|---|---|---|---|---|
| id | Yes | |||
| asset[name] | No | |||
| asset[password] | No | |||
| asset[description] | No |
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@asset.description = "new description"
@asset.save
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// set the display name for the asset
theAsset.setDisplayName("new name");
//...
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// set the name
theAsset.setDisplayName("name");
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
@asset = Sorenson::Services::Asset.find(Sorenson::Services::Asset.all.first)
@asset.embed_codes
// authenticate and get an account object
$account = S360_Account::login("username", "password");
$offset = 0;
$numToGet = 1;
// get first asset
$asset_list = $account->getAssets($offset, $numToGet);
$asset = $asset_list[0];
// get the default embed code
echo $asset->defaultEmbed;
try {
// authenticate over ssl connection
Account acct = Account.login("user_name", "password");
// get asset given the asset id
Asset theAsset = acct.getAsset("assetID");
// get embed codes
List embedCodeList = theAsset.getDefaultEmbedCodes();
} catch (Exception ex) {
// handle excpetion
}
try {
// authenticates over ssl connection
Account acct = Account.login("user_name", "password");
String assetId = "an_asset_id";
// get asset given the asset id
Asset theAsset = acct.getAsset(assetId);
// get embed codes
ArrayList embedCodeList = theAsset.getDefaultEmbedCodes();
//...
} catch (ThreeSixtyException e1) {
e1.printStackTrace();
}
@account = Sorenson::Services::Account.login("example@sorensonmedia.com", "sorensonExample", "1234")
Sorenson::Services::Asset.count