| find: function( | query, | | callback | ) |
|
Example
var service = new EMS.Service.Details();
service.find("suburb-12345", function(response, status) {
if (status == EMS.Status.OK) {
// Success, do something constructive with the response
} else if (status == EMS.Status.NOT_FOUND) {
// Not found, possibly removed
alert("Item was not found");
} else {
// Failure, some other error
alert(response.message);
}
});
Parameters
| query | {Mixed} is either a {String} id of the item to find or an {Object} wrapping the id. |
| callback | {Function} is the callback function in the form function(result, status). |