
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This package contains the required native components to interact with the IBM Mobile Cloud Services for Bluemix. You can use the JavaScript SDK to build server-side applications Node.js
When you use Bluemix to create a Mobile Cloud application, BlueMix provisions multiple services under a single application context. Your mobile application is given access to the following mobile services: Mobile Data.
NPM is included in current Node.js distributions. To install Node.js, go to Download Node.js.
Use the following command to install the ibmdata package:
npm install gelato
##Get started
//
// edit config/default.json and enter your app info
//
// {
// "gelato" : {
// "agent" : <agent URL>
// "agentPort" : <agent port>,
// "appId" : <appid>,
// "appSecret" : <app secret>,
// "appKey" : <app key>
// }
// }
//
// initialize sdk
var gelato = require('gelato')
// issue a query
gelato.query( query, function(err, docs) {
...
})
// find all instances of a given type
gelato.ofType(className, function(err, docs) {
...
})
// find the object with the given id
gelato.forObjectId(id, function(err, obj) {
...
})
// create an object
gelato.create(className, { "name" : "bob", age : 30 }, function(err,obj) {
...
})
// delete by ID
gelato.deleteById(id, function(err, res) {
...
})
// find all class names
gelato.classNames(function(err, names) {
...
})
// save an object
gelato.save(obj, function(err,res) {
...
})
// The low-level query API
// limit might be lowered by implementation
gelato.query({ limit : 10, predicate : { x : 10 }}, function(err,res) {
if (err) throw ...
var bookmark = res.bookmark
var objects = res.objects
var n = objects.length
...
});
// The predicate API, you can't specify limit, bookmark, ...
gelato.perdicate({ x : 10}, function(err, res) {
...
});
// The batch API, we give you arrays of objects
// limit is per batch
// we'll keep feeding you objects until either:
// - no more objects or
// - you don't call next
gelato.batch({ limit : 10}, function(err, array, next) {
if (err) throw ...
if (array == null) {
// no more objects
} else {
// work with array of objects
if (needMore) {
next()
} else {
// don't call next
}
}
})
// The stream API, we give you one object at a time
// limit is a hint for how many to bring from server per request
// we'll keep feeding you objects until either:
// - no more objects or
// - you don't call next
gelato.batch({ limit : 10}, function(err, obj, next) {
if (err) throw ...
if (array == null) {
// no more objects
} else {
// work with array of objects
if (needMore) {
next()
} else {
// don't call next
}
}
})
// convenience predicate generator
var predicate = gelato.eq('x',10).eq('.className',"Person").gen();
var predicate = gelato.eq('x',10).or(gelato.eq('y',100)).gen();
// you can also generate complete queries
var query = gelato.eq('x',10).gt('y',200).limit(10).bookmark('ERFVs').gen();
// you can also issue a query directly
gelato.eq('x',10).eq('z','abc').stream(function(err,obj,next) {
....
})
// generic RPC
gelato.rpc('service','method',attributes,function(err, reply) {
...
})
##Learn More
Licensed Materials - Property of IBM (C) Copyright IBM Corp. 2013, 2014. All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
FAQs
Mobile Data service SDK for IBM Bluemix
We found that gelato demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.