Result

Result

new Result(object) → {Result}

Creates an instance of `Result`.

An initializer is responsible for creating Result object.
Parameters:
Name Description
object API result object
Examples
blogEntry.then(function (result) {
     // sucess function
},function (error) {
     // error function
})
assetQuery.then(function (result) {
     // sucess function
},function (error) {
     // error function
})

Methods

toJSON() → {object}

Converts `Result` to plain javascript object.
Examples
blogEntry.then(function (result) {
     result = result[0][0].toJSON()
},function (error) {
     // error function
})
assetQuery.then(function (result) {
     result = result[0][0].toJSON()
},function (error) {
     // error function
})

get(field_uid) → {promise}

Retrieve details of a field based on the UID provided
Parameters:
Name Description
field_uid uid of the field
Examples
blogEntry.then(function (result) {
     let value = result[0][0].get(field_uid)
},function (error) {
     // error function
})
assetQuery.then(function (result) {
     let value = result[0][0].get(field_uid)
},function (error) {
     // error function
})

getDownloadUrl(string) → {Object}

Retrieves the download URL based on the disposition value.
Parameters:
Name Description
string disposition value
Example
assetQuery.then(function (result) {
     let value = result[0][0].getDownloadUrl(disposition_value)
},function (error) {
     // error function
})