circlesio-sdk

Circles.io Node sdk

Circles.io SDK

===

start with setup with a require and your domain with the token

 
var  Circles = require('./lib')
  ,circles= new Circles("your-url.circles.io","yourToken");
 
  • read
  • create
  • update
  • delete

Just specify the collection your calling then the data your passing

circles.create(collection,model,options,function(err,result){
      console.log(err,result)
})
circles.read(collection,query,options,function(err,result){
      console.log(err,result)
})
circles.update(collection,query,options,model,function(err,result){
      console.log(err,result)
})
circles.delete(collection,query,options,function(err,result){
      console.log(err,result)
})

  • item
  • instance
  • client
  • profile
  • grid
  • blob
  • loader
  • level
  • role
  • event
  • report

Data that will be saved or updated The data being updated can be saved with deep model meaning if you have an object

{ name : {
   first :"john"
  ,last  :"smith"
  }
}

you can update just the first name with :

{ 'name.first':'jane'}

or with arrays you can :

{ toys : ['car','truck','drums'] }

you can update just truck with :

{ 'toys.1':'bus'}

where 1 is the index

Mongo Basic Queries Mongo Adv Queries just {} will return all and with the addtion of just

{ _id : ''}
  • skip (int)
  • limit (int)
  • sort (object)