-
Notifications
You must be signed in to change notification settings - Fork 32
SDB Client
SaltwaterC edited this page Jan 19, 2012
·
1 revision
aws.load('sdb', [accessKeyId], [secretAccessKey])
sdb.request(action, [query], callback)
The 'action' argument is the operation required by the SDB query API itself.
Although into the SimpleDB documentation this API is regarded as a "REST API", technically it is a "query API". The AWS chops like to call most of their creations by the latter name.
The 'operation' is actually the 'Action' argument into the HTTPS request itself, therefore the usage from this library point of view is the same as for the rest of the supported query APIs. You just need to be careful regarding the Amazon SDB docs in order to avoid confusion.
- sdb.setCredentials(accessKeyId, secretAccessKey)
- sdb.setRegion(region)
- sdb.setMaxSockets(numberOfSockets)
- sdb.getEndPoint()
- sdb.getApiVersion()
- sdb.setApiVersion(apiVersion)
// init the client
var sdb = require('aws2js').load('sdb', accessKeyId, secretAccessKey);
// call something of the SDB query API
sdb.request('action', {foo: 'bar'}, function (error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});