{"_id":"usergrid","_rev":"104-0b147e40bfd47a648a887ec94e8be9d6","name":"usergrid","dist-tags":{"latest":"2.0.0-rc.2"},"versions":{"0.9.1":{"name":"usergrid","version":"0.9.1","keywords":["Node","Usergrid","Apigee","API"],"author":{"name":"Rod Simpson"},"license":"Apache 2.0","_id":"usergrid@0.9.1","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"dist":{"shasum":"a4cc144c748ba88a6eb6f61749237bddcc8f51d3","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.9.1.tgz","integrity":"sha512-6FDcLkXJhpElXFG38YiqF79kYEqtmUwHqNe6AzCeT/23S5oNsobLnRSZrMIvEuPwsD8zyJV3QkNOBDF9UwJVLw==","signatures":[{"sig":"MEUCIE3NKlo/1vDx40jI9gKzdD5I9ceAqkhf1yiDYF3TEYw0AiEAh9bTicMQimffOaDWHFWqKb2IsNOsMX/wxuJx8Ex5EZ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node test/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.2":{"name":"usergrid","version":"0.9.2","keywords":["Node","Usergrid","Apigee","API"],"author":{"name":"Rod Simpson"},"license":"Apache 2.0","_id":"usergrid@0.9.2","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"dist":{"shasum":"48ac64008610e05e8c3cd8c180ed200c017f989b","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.9.2.tgz","integrity":"sha512-/uGoVDCiCKt8NI/XVehskqHwaDW+nVfZo3j9IZRs+nkGv5eei0+jKWlWfx0SITOzYvVvQ8mEjGRFTeuo/IX6qg==","signatures":[{"sig":"MEUCICYu+VI3EHwzPRWGrkTWIkqXd1KEHvs6sUMRR44qoIfaAiEAweClGnGCc/GdNXnwVMPFhtUR4K0diI8Rdpfsai6rkd8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node test/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0":{"name":"usergrid","version":"0.10.0","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.0","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"90e3f459e7efaa04b9577f4ff59928abc7df0f5f","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.0.tgz","integrity":"sha512-pHPKcC+aM/gKapwaDDp2m4wJh56F54F+Np1W42wWrfIbGwG5BDz2+RUxojmsvrzV8YPWCuedUheUdW3UT4lUtA==","signatures":[{"sig":"MEYCIQDKD7FdrZ90cJTHfbLcQa0k3s+K3UHMt/tzsIvgwilWRQIhAMd5WT7c/Wu471Cg4vra0ynEQdRQ8o3Wn4Q4WbP4BC+P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.1":{"name":"usergrid","version":"0.10.1","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.1","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"7dfce2e822e14eebe52251168eca5531f1751aa7","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.1.tgz","integrity":"sha512-fhJwWGo/Iaxj1TYGc3UFkYwbPQqPC0H9mksFIKPKiDFfzStYEEXux1bdj6RthTAyyT6qJr/92hnkCwUrkuvYNA==","signatures":[{"sig":"MEUCIQCN3CGZmRRm7vhBi0kSZuqxtR/wBIZwLjwXNwxUme9FPwIgCK5hXReyCfBlJlevdEjNMfnP4ldehfDH5J2Vl9p51yI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.2":{"name":"usergrid","version":"0.10.2","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.2","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"8474825ef2812263158a80ae926afb253ddf79f9","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.2.tgz","integrity":"sha512-aV/Yr/NdknPMQqzuyemYFqHZnWfqPImZFYz73tsvFSTVLOu5SnuGKqCvZ4tqLMTK5Wh1QIjUeSpERNyAiT546w==","signatures":[{"sig":"MEUCIF/Yd0DzNjxaiHLGFG9BZXq5ug/qRM+4j/tV8rJgsjB6AiEAv26dGtDLT2+bqHHI2C4JleHZuW/U8XqQUQoALqfHk14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.3":{"name":"usergrid","version":"0.10.3","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.3","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"dc9205d15545bb9e9cab521a1627f69c3679ea16","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.3.tgz","integrity":"sha512-Pk5eMbRDKxqcu8UeSZUNBrQa7t01qPAhw4P8C9bdIgguYZA5Rn45JIFIr0gYlY3qllRmpVrTTxUYiJhPwgU24w==","signatures":[{"sig":"MEQCIDtZF+9PR56xYpLwNvksHbMCFbNyR1hker32fCqZR3dLAiBAJEGEh0u+lNvsH2SarfulipD1Vps0sy8b3olQAKhgtg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.4":{"name":"usergrid","version":"0.10.4","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.4","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"31f700ec3fe575694ac827934a6b74032f41aca2","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.4.tgz","integrity":"sha512-mwxpREVlGl2yyrzyrLNkVORbDc73LNiriAmQAsFwrbm2dCtlNZxHShvjqZBKl3f8yR3OkNdtZ4iKasCWjiSqJw==","signatures":[{"sig":"MEUCIQC6KY6eVw/+yi9+x228oUZePpUW6xTDAwhcbKwZbcJYdwIgE/GZ7QEM2L3UAjkXYrBjMMpwrmAvVisYPgsuD68JpZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.5":{"name":"usergrid","version":"0.10.5","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.5","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"4345c69b30d39d5133d94847f1264d65a82094ed","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.5.tgz","integrity":"sha512-oKGQmmVTyfR70gBw9gmgKvcZIKGmy1qxcr2n/Wmuz2le8BxQ3W7YVKsjzHpmvyES3m589Wsn/EhBRo3iGtiotg==","signatures":[{"sig":"MEUCIFYm3RDxWHo8NL9gWaaVNyMb8PUix05H8pEFZdpkuvPPAiEAzWxpPoL6/nNx/ZuHqxO+fSQ8xFoAJF/575BfDsNFSkg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.1.61","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.6":{"name":"usergrid","version":"0.10.6","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.6","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"},{"name":"mdobs","email":"mdobson4@gmail.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"6898e283b2994bd47b3f6cce30f3e02beb3dfd17","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.6.tgz","integrity":"sha512-LXc1UEULbv5NY9LSRp3CHn4k9xq/6yagMYfIAS9qlCFEPrkwEEH08ShBghYm3uoNXM8MsI17Dr8vYVYjSoYhPg==","signatures":[{"sig":"MEQCIBU0z2N98Yz4RZq9rUPlhaXeZsqc51EoRuvWmQfyZnp6AiAD9v5jyNZ/XkWcwoZ0yh7b0U+9LHMPa4V13Swy6iutqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"_from":".","scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"mdobs","email":"mdobson4@gmail.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.3.5","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","directories":{},"dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.7":{"name":"usergrid","version":"0.10.7","keywords":["Node","Usergrid","Apigee","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.7","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"},{"name":"mdobs","email":"mdobson4@gmail.com"}],"bugs":{"url":"http://github.com/apigee/usergrid-node-module.git/issues"},"dist":{"shasum":"b70bf32742ce9e23cb7ec8e4c2d102cf2ddc004f","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.7.tgz","integrity":"sha512-4tqdNmyVgWKAlGnqNiR+y/EMr/P603+lrKs8j1JK9UlaiYAnoD4/FUUTHvEYVr13i6VcadZzbCxseCUVXfwA/A==","signatures":[{"sig":"MEQCID4lKhGNMLzAF3y0g+n3oTCv8Q2BkHkR0+uXkqMwGZWUAiBKkpK6TW6XrK3sNSc3CIkIyyB2RepipSR7i5AVWuO6aw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API","Apigee"],"_from":".","scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/apigee/usergrid-node-module.git","type":"git"},"_npmVersion":"1.2.32","description":"A Node.js module for making API calls to App Services (Usergrid) from within Node.js","dependencies":{"request":"2.12.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.8":{"name":"usergrid","version":"0.10.8","keywords":["Node","Usergrid","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.8","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"},{"name":"mdobs","email":"mdobson4@gmail.com"}],"homepage":"https://github.com/rodsimpson/usergrid-node-module","bugs":{"url":"http://usergrid.incubator.apache.org/"},"dist":{"shasum":"cf9665faad632f82de2e45ee94dffc30490888cd","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.8.tgz","integrity":"sha512-5Or0szJ2qYaks14+T8So4k4toAH1bTz8lar1TMhQhhOcFkC1nebxj/GlBNKLG5cOY8ag1XNkEcbTFLGN0RrQ+Q==","signatures":[{"sig":"MEUCICcp/e4sAGnbXg7d05qRSjPu0uOaWxoFln7t/A3RRNOWAiEA71+yVprHl+Z9naGcF4hQPwRXOZfXK1cyI/sdd7clRvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API"],"_from":".","_shasum":"cf9665faad632f82de2e45ee94dffc30490888cd","gitHead":"dff81711eb680f231f0a186b08ab6723737752da","scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/rodsimpson/usergrid-node-module.git","type":"git"},"_npmVersion":"2.1.7","description":"A Node.js module for making API calls to Usergrid from within Node.js","directories":{"test":"test"},"_nodeVersion":"0.10.29","dependencies":{"request":"2.12.x","inflection":"1.3.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.9":{"name":"usergrid","version":"0.10.9","keywords":["Node","Usergrid","API"],"author":{"url":"http://rodsimpson.com","name":"Rod Simpson","email":"rod@rodsimpson.com"},"license":"Apache 2.0","_id":"usergrid@0.10.9","maintainers":[{"name":"rockerston","email":"rod@rodsimpson.com"},{"name":"mdobs","email":"mdobson4@gmail.com"}],"homepage":"https://github.com/rodsimpson/usergrid-node-module","bugs":{"url":"http://usergrid.incubator.apache.org/"},"dist":{"shasum":"43879b28a0c3a81448a0d0fad8762c2436d1ebef","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.9.tgz","integrity":"sha512-uA/V/ymZiuye5rgzuny6G6719LDQytSDdVBt5i6M9vkETCrEGfdYgFHrz9oYMbtmXcn2DmcCKT2sVA73cknW3g==","signatures":[{"sig":"MEUCIEqGR0UgpZxDgAk3D9XeCTmeCWx7zZPFWswrraNMhPPAAiEAxrj8tt0UyUVHygm2ChbUzzO5LTQ1lcB9Nvtq5BQVQMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API"],"_from":".","_shasum":"43879b28a0c3a81448a0d0fad8762c2436d1ebef","gitHead":"b3bcd0a255de516ddb440c75ab0408fc362289b2","scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"rockerston","email":"rod@rodsimpson.com"},"repository":{"url":"git://github.com/rodsimpson/usergrid-node-module.git","type":"git"},"_npmVersion":"2.1.7","description":"A Node.js module for making API calls to Usergrid from within Node.js","directories":{"test":"test"},"_nodeVersion":"0.10.29","dependencies":{"request":"2.12.x","inflection":"1.3.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.11":{"name":"usergrid","version":"0.10.11","keywords":["Node","Usergrid","API"],"author":{"name":"Rod Simpson","email":"rsimpson@apigee.com"},"license":"Apache 2.0","_id":"usergrid@0.10.11","maintainers":[{"name":"jeffreyawest","email":"jwest@apigee.com"},{"name":"mdobs","email":"mdobson4@gmail.com"},{"name":"remus","email":"i.am@r3m.us"},{"name":"rockerston","email":"rod@rodsimpson.com"}],"contributors":[{"name":"Brandon Shelley","email":"brandon@apige.ecom"}],"homepage":"https://github.com/r3mus/usergrid-nodejs-module","bugs":{"url":"http://usergrid.incubator.apache.org/"},"dist":{"shasum":"47a1fc1f26344f47a301123a84310eba1bcd68db","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-0.10.11.tgz","integrity":"sha512-8LB0cL1Oeutg0ixat6UV/v6v7QsMk+MYva6oxuWjFVf564vnEhCH3OChNQvsfp6IqoNnWiLsScDf9mpvh27N1w==","signatures":[{"sig":"MEUCIQCA0yzDxQoH1KAXdYSGetgnGSY/R5ZJOG58qBoae/EOygIgSNpTbse0Z3ctN2A2QN8NpwVoY2ZEycF3uv16j8tBPow=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/usergrid.js","tags":["usergrid","API"],"_from":".","_shasum":"47a1fc1f26344f47a301123a84310eba1bcd68db","gitHead":"1bcc795ec86db878e541f10c277c01227133d9c2","scripts":{"test":"mocha","start":"node example/server.js"},"_npmUser":{"name":"remus","email":"i.am@r3m.us"},"repository":{"url":"git://github.com/r3mus/usergrid-nodejs-module.git","type":"git"},"_npmVersion":"3.3.12","description":"A Node.js module for making API calls to Usergrid from within Node.js. This is an alternate location to retrieve the package.","directories":{"test":"test"},"_nodeVersion":"5.1.0","dependencies":{"request":"2.12.x","inflection":"1.3.x"},"devDependencies":{"mocha":"1.7.x","should":"1.2.1"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-rc.0":{"name":"usergrid","version":"2.0.0-rc.0","keywords":[],"author":{"name":"Brandon Shelley"},"license":"MIT","_id":"usergrid@2.0.0-rc.0","maintainers":[{"name":"jeffreyawest","email":"jwest@apigee.com"},{"name":"mdobs","email":"mdobson4@gmail.com"},{"name":"remus","email":"i.am@r3m.us"},{"name":"rockerston","email":"rod@rodsimpson.com"}],"homepage":"https://github.com/r3mus/usergrid-nodejs#readme","bugs":{"url":"https://github.com/r3mus/usergrid-nodejs/issues"},"dist":{"shasum":"a9524a1cb2c0d242b4f91deb8cc34bc0d7538397","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-2.0.0-rc.0.tgz","integrity":"sha512-rBENrnbkmeHdGDDG3UNOipJb+FfvdKNMzBLZ33qnkFtykg1kb/lT5bD3Kmxa1coP08afFMxc3dX7A03V2v1Tpw==","signatures":[{"sig":"MEUCICIDz7lQgDIIPnM2r2HurGoSAYK7sprv0G7rL4e/08vaAiEAq+3kPUwz9PHxJeRkjgzrKG40QY37pNlXvUtaC7Cb9KY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"app.js","_from":".","_shasum":"a9524a1cb2c0d242b4f91deb8cc34bc0d7538397","gitHead":"8f2bbd974e4c6e511f332309180ae65f5651ddbc","private":false,"scripts":{"test":"mocha tests","start":"node app.js"},"_npmUser":{"name":"remus","email":"i.am@r3m.us"},"repository":{"url":"git://github.com/r3mus/usergrid-nodejs.git","type":"git"},"_npmVersion":"3.3.12","description":"The official Node.js SDK for Usergrid","_nodeVersion":"5.1.0","dependencies":{"async":"latest","lodash":"latest","request":"latest","url-join":"latest","objectkit":"latest","lodash-uuid":"latest","lodash-inflection":"latest"},"devDependencies":{"mocha":"latest","chance":"^0.8.0","should":"latest"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-rc.2":{"name":"usergrid","version":"2.0.0-rc.2","keywords":[],"author":{"name":"Brandon Shelley"},"license":"Apache 2.0","_id":"usergrid@2.0.0-rc.2","maintainers":[{"name":"brandonscript","email":"i.am@r3m.us"},{"name":"jeffreyawest","email":"jwest@apigee.com"},{"name":"mdobs","email":"mdobson4@gmail.com"},{"name":"remus","email":"i.am@r3m.us"},{"name":"rockerston","email":"rod@rodsimpson.com"}],"contributors":[{"name":"Brandon Shelley","email":"brandon@codeblooded.io"},{"name":"Robert Walsh","email":"rjwalsh1985@gmail.com"}],"homepage":"https://github.com/brandonscript/usergrid-nodejs#readme","bugs":{"url":"https://github.com/brandonscript/usergrid-nodejs/issues"},"dist":{"shasum":"682e69d2abcae9f73f573f49c143a0710804d432","tarball":"https://registry.npmjs.org/usergrid/-/usergrid-2.0.0-rc.2.tgz","integrity":"sha512-AdJVeTSifZdxDvtUFv8nlZD7imJe+cNqYXR4nx61JuCZWzGNeXeR/lgYlvGEOp+bGCloCbpoJhw6sddHxia7Iw==","signatures":[{"sig":"MEUCIDuCTjqgKdJn/8ZbLRqKeoI/f2WbFKwaqmKMNbcA5AMYAiEAxAbOHcHWpIZwFNjmKId8i2m06T8Ea38jhXQfIj/OGL4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"usergrid.js","_from":".","_shasum":"682e69d2abcae9f73f573f49c143a0710804d432","gitHead":"aa7d1073e7a2d92f4b149ff2d3f6423d651d1234","private":false,"scripts":{"test":"mocha tests","start":"node usergrid.js"},"_npmUser":{"name":"brandonscript","email":"i.am@r3m.us"},"repository":{"url":"git://github.com/brandonscript/usergrid-nodejs.git","type":"git"},"_npmVersion":"3.10.8","description":"The official Node.js SDK for Usergrid","_nodeVersion":"7.0.0","dependencies":{"file":"latest","async":"latest","lodash":"~4.0","request":"latest","url-join":"latest","file-type":"^3.4.0","validator":"^4.5.0","read-chunk":"^1.0.1","lodash-uuid":"latest","lodash-inflection":"latest"},"devDependencies":{"mocha":"latest","chance":"^0.8.0","should":"latest"},"_npmOperationalInternal":{"tmp":"tmp/usergrid-2.0.0-rc.2.tgz_1478809554022_0.8668471919372678","host":"packages-18-east.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2012-11-15T04:53:55.979Z","modified":"2025-10-12T18:44:59.205Z","0.9.1":"2012-11-15T04:53:56.672Z","0.9.2":"2012-11-24T00:37:58.197Z","0.10.0":"2012-12-17T02:17:01.391Z","0.10.1":"2012-12-25T02:34:26.100Z","0.10.2":"2012-12-25T05:18:00.649Z","0.10.3":"2013-01-16T17:21:34.614Z","0.10.4":"2013-02-21T22:28:36.000Z","0.10.5":"2013-05-02T23:24:54.602Z","0.10.6":"2013-10-18T17:50:05.709Z","0.10.7":"2013-12-18T20:39:56.036Z","0.10.8":"2014-11-11T22:10:58.204Z","0.10.9":"2014-12-16T01:27:51.550Z","0.10.11":"2015-12-14T16:51:24.636Z","2.0.0-rc.0":"2016-01-11T21:53:46.281Z","2.0.0-rc.2":"2016-11-10T20:25:56.349Z"},"bugs":{"url":"https://github.com/brandonscript/usergrid-nodejs/issues"},"author":{"name":"Brandon Shelley"},"license":"Apache 2.0","homepage":"https://github.com/brandonscript/usergrid-nodejs#readme","keywords":[],"repository":{"url":"git://github.com/brandonscript/usergrid-nodejs.git","type":"git"},"description":"The official Node.js SDK for Usergrid","contributors":[{"name":"Brandon Shelley","email":"brandon@codeblooded.io"},{"name":"Robert Walsh","email":"rjwalsh1985@gmail.com"}],"maintainers":[{"name":"brandonscript","email":"brandon@codeblooded.io"},{"name":"jeffreyawest","email":"jwest@apigee.com"},{"name":"mdobs","email":"mdobson4@gmail.com"},{"name":"rjwalsh","email":"rjwalsh1985@gmail.com"},{"name":"rockerston","email":"rod@rodsimpson.com"}],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/grade/034bc34302b646bf932c7c0307e0e313)](https://www.codacy.com/app/brandonscript/usergrid-nodejs)\n[![Travis CI Badge](https://travis-ci.org/brandonscript/usergrid-nodejs.svg?branch=master)](https://travis-ci.org/brandonscript/usergrid-nodejs)\n[![npm version](https://badge.fury.io/js/usergrid.svg)](https://badge.fury.io/js/usergrid)\n\n# usergrid-nodejs\nNode.js SDK 2.0 for Usergrid \n\nVersion 2.0 of this SDK is currently a work in progress; documentation and implementation are subject to change.\n\n_**Note:** This Node.js SDK 2.0 for Usergrid is **not** backwards compatible with 0.1X versions of the SDK. If your application is dependent on the 0.1X set of Node.js APIs, you will need to continue using the 0.1X version (see below for installation instructions)._\n\n## Current Release\n\n- Pre-release: [2.0 Release Candidate 2](https://github.com/brandonscript/usergrid-nodejs/releases), available here or on npm\n- Stable: [0.10.11](https://github.com/apache/usergrid/tree/master/sdks/nodejs)\n \n## 2.X Bugs\n\nPlease open an [issue](https://github.com/brandonscript/usergrid-nodejs/issues/new)\n\n## Known Issues\n\n- Native support for push notifications is slated for RC3. Workaround is to send a regular POST request to `'devices/<device_ID>/notifications'`\n- There is no clean way to require submodules (e.g. `UsergridClient` or `UsergridEntity`) modules without referencing the full path to `../lib/<class>`.\n- Any other functionality that is missing or expected, please open an issue.\n\n## Installation\n\nTo install the latest **stable** 0.1X build:\n\n    npm install usergrid\n\n(Or add `\"usergrid\": \"~0.10.11\"` to your package.json)\n\nTo install the 2.0 release candidates, install from [npm](https://www.npmjs.com/package/usergrid), specifying the version `~2.0.0-rc`:\n\n    npm install usergrid@~2.0.0-rc\n\n(Or add `\"usergrid\": \"~2.0.0-rc\"` to your package.json)\n\nIf you want access to the latest development build (you will need to run `npm install` to keep it up to date):\n\n    npm install brandonscript/usergrid-nodejs\n\n## Usage\n\n_**Note:** This section is a work in progress. In its current release candidate state, this SDK is only recommended for developers familiar with Usergrid, Node.js, and ideally Mocha tests. It is not recommended for production applications. For additional advanced/comprehensive usage, see `/tests`._\n\nThe Usergrid Node.js SDK is built on top of [request](https://github.com/request/request). As such, it behaves almost as a drop-in replacement. Where you would expect a standard error-first callback from request, the same is true of the Usergrid SDK methods. Where you would expect a response object as the second parameter in the callback, the same is true for the Usergrid SDK.\n\n\n### Initialization\n\nThere are two different ways of initializing the Usergrid Node.js SDK: \n\n1. The singleton pattern is both convenient and enables the developer to use a globally available and always-initialized shared instance of Usergrid. \n\n\t```js\n\tvar Usergrid = require('usergrid')\n\tUsergrid.init({\n\t    orgId: '<org-id>',\n\t    appId: '<app-id>'\n\t})\n\t    \n\t// or you can load from a config file; see config.sample.json\n\t    \n\tvar Usergrid = require('usergrid')\n\tUsergrid.init() // defaults to use config.json\n\t```\n**Config File:**  Optionally, you can use a config file to provide the usergrid credentials for your app.  The usergrid module crawls your App file structure to find files named `usergrid.json` or a `config.json`.  If there are multiple files with one of these names present at different locations under the app, only one of them will be used and the others are ignored.  This may cause use of an unintended backend.  Please make sure you have only one of these files present in the root and subdirectories of your app.\n\n2. The instance pattern enables the developer to manage instances of the Usergrid client independently and in an isolated fashion. The primary use-case for this is when an application connects to multiple Usergrid targets.\n\n\t```js\n\tvar UsergridClient = require('./node_modules/usergrid/lib/client')\n\tvar client = new UsergridClient(config)\n\t```\n\n_**Note:** Examples in this readme assume you are using the `Usergrid` shared instance. If you've implemented the instance pattern instead, simply replace `Usergrid` with your client instance variable. See `/tests` for additional examples._\n\n## RESTful operations\n\nWhen making any RESTful call, a `type` parameter (or `path`) is always required. Whether you specify this as an argument, in an object as a parameter, or as part of a `UsergridQuery` object is up to you.\n\n### GET()\n\nTo get entities in a collection:\n\n```js\nUsergrid.GET('collection', function(error, usergridResponse, entities) {\n    // entities is an array of UsergridEntity objects\n})\n```\n    \nTo get a specific entity in a collection by uuid or name:\n\n```js\nUsergrid.GET('collection', '<uuid-or-name>', function(error, usergridResponse, entity) {\n    // entity, if found, is a UsergridEntity object\n})\n```\n    \nTo get specific entities in a collection by passing a UsergridQuery object:\n\n```js\nvar query = new UsergridQuery('cats')\n                             .gt('weight', 2.4)\n                             .contains('color', 'bl*')\n                             .not\n                             .eq('color', 'blue')\n                             .or\n                             .eq('color', 'orange')\n                             \n// this will build out the following query:\n// select * where weight > 2.4 and color contains 'bl*' and not color = 'blue' or color = 'orange'\n    \nUsergrid.GET(query, function(error, usergridResponse) {\n    // entities is an array of UsergridEntity objects matching the specified query\n})\n```\n    \n### POST() and PUT()\n\nPOST and PUT requests both require a JSON body payload. You can pass either a standard JavaScript object or a `UsergridEntity` instance. While the former works in principle, best practise is to use a `UsergridEntity` wherever practical. When an entity has a uuid or name property and already exists on the server, use a PUT request to update it. If it does not, use POST to create it.\n\nTo create a new entity in a collection (POST):\n\n```js\nvar entity = new UsergridEntity({\n    type: 'restaurant',\n    restaurant: 'Dino's Deep Dish,\n    cuisine: 'pizza'\n})\n    \n// or\n    \nvar entity = {\n    type: 'restaurant',\n    restaurant: 'Dino's Deep Dish,\n    cuisine: 'pizza'\n}\n    \nUsergrid.POST(entity, function(error, usergridResponse, entity) {\n    // entity should now have a uuid property and be created\n})\n    \n// you can also POST an array of entities:\n\nvar entities = [\n    new UsergridEntity({\n        type: 'restaurant',\n        restaurant: 'Dino's Deep Dish,\n        cuisine: 'pizza'\n    }), \n    new UsergridEntity({\n        type: 'restaurant',\n        restaurant: 'Pizza da Napoli',\n        cuisine: 'pizza'\n    })\n]\n    \nUsergrid.POST(entities, function(error, usergridResponse, entities) {\n    //\n})\n```\n    \nTo update an entity in a collection (PUT request):\n\n```js\nvar entity = new UsergridEntity({\n    type: 'restaurant',\n    restaurant: 'Pizza da Napoli',\n    cuisine: 'pizza'\n})\n    \nUsergrid.POST(entity, function(error, usergridResponse, entity) {\n    entity.owner = 'Mia Carrara'\n    Usergrid.PUT(entity, function(error, usergridResponse, entity) {\n        // entity now has the property 'owner'\n    })\n})\n    \n// or update a set of entities by passing a UsergridQuery object\n    \nvar query = new UsergridQuery('restaurants')\n                             .eq('cuisine', 'italian')\n                             \n// this will build out the following query:\n// select * where cuisine = 'italian'\n    \nUsergrid.PUT(query, { keywords: ['pasta'] }, function(error, usergridResponse) {\n    /* the first 10 entities matching this query criteria will be updated:\n       e.g.:\n       [\n           {\n               \"type\": \"restaurant\",\n               \"restaurant\": \"Il Tarazzo\",\n               \"cuisine\": \"italian\",\n               \"keywords\": [\n                   \"pasta\"\n               ]\n           },\n           {\n               \"type\": \"restaurant\",\n               \"restaurant\": \"Cono Sur Pizza & Pasta\",\n               \"cuisine\": \"italian\",\n               \"keywords\": [\n                   \"pasta\"\n               ]\n           }\n        ]\n    */\n})\n```\n    \n### DELETE()\n\nDELETE requests require either a specific entity or a `UsergridQuery` object to be passed as an argument.\n    \nTo delete a specific entity in a collection by uuid or name:\n\n```js\nUsergrid.DELETE('collection', '<uuid-or-name>', function(error, usergridResponse) {\n    // if successful, entity will now be deleted\n})\n```\n    \nTo specific entities in a collection by passing a `UsergridQuery` object:\n\n```js\nvar query = new UsergridQuery('cats')\n                             .eq('color', 'black')\n                             .or\n                             .eq('color', 'white')\n                             \n// this will build out the following query:\n// select * where color = 'black' or color = 'white'\n    \nUsergrid.DELETE(query, function(error, usergridResponse) {\n    // the first 10 entities matching this query criteria will be deleted\n})\n```\n\n## Entity operations and convenience methods\n\n`UsergridEntity` has a number of helper/convenience methods to make working with entities more convenient. If you are _not_ utilizing the `Usergrid` shared instance, you must pass an instance of `UsergridClient` as the first argument to any of these helper methods.\n\n### reload()\n\nReloads the entity from the server\n\n```js\nentity.reload(function(error, usergridResponse) {\n    // entity is now reloaded from the server\n})\n```\n    \n### save()\n\nSaves (or creates) the entity on the server\n\n```js\nentity.aNewProperty = 'A new value'\nentity.save(function(error, usergridResponse) {\n    // entity is now updated on the server\n})\n```\n    \n### remove()\n\nDeletes the entity from the server\n\n```js\nentity.remove(function(error, usergridResponse) {\n    // entity is now deleted on the server and the local instance should be destroyed\n})\n```\n    \n## Authentication, current user, and authMode\n\n### appAuth and authenticateApp()\n\n`Usergrid` can use the app client ID and secret that were passed upon initialization and automatically retrieve an app-level token for these credentials.\n\n```js\nUsergrid.setAppAuth('<client-id>', '<client-secret>')\nUsergrid.authenticateApp(function(error, usergridResponse, token) {\n    // Usergrid.appAuth is created automatically when this call is successful\n})\n```\n\n### currentUser and authenticateUser()\n\n`Usergrid` has a special `currentUser` property. By default, when calling `authenticateUser()`, `.currentUser` will be set to this user if the authentication flow is successful.\n\n```js\nUsergrid.authenticateUser({\n    username: '<username>',\n    password: '<password>'\n}, function(error, usergridResponse, token) {\n    // Usergrid.currentUser is set to the authenticated user and the token is stored within that context\n})\n```\n    \nIf you want to utilize authenticateUser without setting as the current user, simply pass a `false` boolean value as the second parameter:\n\n```js\nUsergrid.authenticateUser({\n    username: '<username>',\n    password: '<password>'\n}, false, function(error, usergridResponse, token) {\n    \n})\n```\n\n### authMode\n\nAuth-mode is used to determine what the `UsergridClient` will use for authorization.\n\nBy default, `Usergrid.authMode` is set to `UsergridAuth.AUTH_MODE_USER`, whereby if a non-expired `UsergridUserAuth` exists in `UsergridClient.currentUser`, this token is used to authenticate all API calls.\n\nIf instead `Usergrid.authMode` is set to `UsergridAuth.AUTH_MODE_NONE`, all API calls will be performed unauthenticated. \n\nIf instead `Usergrid.authMode` is set to `UsergridAuth.AUTH_MODE_APP`, all API calls will be performed using the client credentials token, _if_ they're available (i.e. `authenticateApp()` was performed at some point). \n\n### usingAuth()\n\nAt times it is desireable to have complete, granular control over the authentication context of an API call. To facilitate this, the passthrough function `.usingAuth()` allows you to pre-define the auth context of the next API call.\n\n```js\n// assume Usergrid.authMode = UsergridAuth.AUTH_MODE_NONE\n    \nUsergrid.usingAuth(Usergrid.appAuth).POST('roles/guest/permissions', {\n    permission: \"get,post,put,delete:/**\"\n}, function(error, usergridResponse) {\n    // here we've temporarily used the client credentials to modify permissions\n    // subsequent calls will not use this auth context\n})\n```\n    \n## User operations and convenience methods\n\n`UsergridUser` has a number of helper/convenience methods to make working with user entities more convenient. If you are _not_ utilizing the `Usergrid` shared instance, you must pass an instance of `UsergridClient` as the first argument to any of these helper methods.\n    \n### create()\n\nCreating a new user:\n\n```js\nvar user = new UsergridUser({\n    username: 'username',\n    password: 'password'\n})\n    \nuser.create(function(error, usergridResponse, user) {\n    // user has now been created and should have a valid uuid\n})\n```\n    \n### login()\n\nA simpler means of retrieving a user-level token:\n\n```js\nvar user = new UsergridUser({\n    username: 'username',\n    password: 'password'\n})\n    \nuser.login(function(error, usergridResponse, token) {\n    // user is now logged in\n})\n```\n\n### logout()\n\nLogs out the selected user. You can also use this convenience method on `Usergrid.currentUser`.\n\n```js\nuser.logout(function(error, usergridResponse) {\n    // user is now logged out\n})\n```\n    \n### logoutAllSessions()\n\nLogs out all sessions for the selected user and destroys all active tokens. You can also use this convenience method on `Usergrid.currentUser`.\n\n```js\nuser.logoutAllSessions(function(error, usergridResponse) {\n    // user is now logged out from everywhere\n})\n```\n    \n### resetPassword()\n\nResets the password for the selected user.\n\n```js\nuser.resetPassword({\n    oldPassword: '2cool4u',\n    newPassword: 'correct-horse-battery-staple',\n}, function(error, response, success) {\n    // if it was done correctly, the new password will be changed\n    // 'success' is a boolean value that indicates whether it was changed successfully\n})\n```\n    \n### UsergridUser.CheckAvailable()\n\nThis is a class (static) method that allows you to check whether a username or email address is available or not.\n\n```js\nUsergridUser.CheckAvailable(client, {\n    email: 'email'\n}, function(err, response, exists) {\n   // 'exists' is a boolean value that indicates whether a user already exists\n})\n    \nUsergridUser.CheckAvailable(client, {\n    username: 'username'\n}, function(err, response, exists) {\n   \n})\n    \nUsergridUser.CheckAvailable(client, {\n    email: 'email',\n    username: 'username', // checks both email and username\n}, function(err, response, exists) {\n    // 'exists' returns true if either username or email exist\n})\n```\n    \n## Querying and filtering data\n\n### UsergridQuery initialization\n\nThe `UsergridQuery` class allows you to build out complex query filters using the Usergrid [query syntax](http://docs.apigee.com/app-services/content/querying-your-data).\n\nThe first parameter of the `UsergridQuery` builder pattern should be the collection (or type) you intend to query. You can either pass this as an argument, or as the first builder object:\n\n```js\nvar query = new UsergridQuery('cats')\n// or\nvar query = new UsergridQuery().type('cats')\nvar query = new UsergridQuery().collection('cats')\n```\n\nYou then can layer on additional queries:\n\n```js\nvar query = new UsergridQuery('cats')\n            .gt('weight', 2.4)\n            .contains('color', 'bl*')\n            .not\n            .eq('color', 'white')\n            .or\n            .eq('color', 'orange') \n```\n            \nYou can also adjust the number of results returned:\n\n```js\nvar query = new UsergridQuery('cats').eq('color', 'black').limit(100)\n// returns a maximum of 100 entiteis\n```\n    \nAnd sort the results:\n\n```js\nvar query = new UsergridQuery('cats').eq('color', 'black').asc('name')\n// sorts by 'name', ascending\n```\n    \nAnd you can do geo-location queries:\n\n```js\nvar query = new UsergridQuery('devices').locationWithin(<distanceInMeters>, <latitude>, <longitude>)\n```\n    \n### Using a query in a request\n\nQueries can be passed as parameters to GET, PUT, and DELETE requests:\n\n```js\nUsergrid.GET(query, function(error, usergridResponse, entities) {\n    //\n})\n    \nUsergrid.PUT(query, { aNewProperty: \"A new value\" }, function(error, usergridResponse, entities) {\n    //\n})\n    \nUsergrid.DELETE(query, function(error, usergridResponse, entities) {\n    //\n})\n```\n    \nWhile not a typical use case, sometimes it is useful to be able to create a query that works on multiple collections. Therefore, in each one of these RESTful calls, you can optionally pass a 'type' string as the first argument:\n\n```js\nUsergrid.GET('cats', query, function(error, usergridResponse, entities) {\n    //\n})\n```\n    \n### List of query builder objects\n\n`type('string')`\n\n> The collection name to query\n\n`collection('string')`\n\n> An alias for `type`\n\n`eq('key', 'value')` or `equal('key', 'value')`\n\n> Equal to (e.g. `where color = 'black'`)\n\n`contains('key', 'value')`\n\n> Contains a string (e.g.` where color contains 'bl*'`)\n\n`gt('key', 'value')` or `greaterThan('key', 'value')`\n\n> Greater than (e.g. `where weight > 2.4`)\n\n`gte('key', 'value')` or `greaterThanOrEqual('key', 'value')`\n\n> Greater than or equal to (e.g. `where weight >= 2.4`)\n\n`lt('key', 'value')` or `lessThan('key', 'value')`\n\n> Less than (e.g. `where weight < 2.4`)\n\n`lte('key', 'value')` or `lessThanOrEqual('key', 'value')`\n\n> Less than or equal to (e.g. `where weight <= 2.4`)\n\n`not`\n\n> Negates the next block in the builder pattern, e.g.:\n\n```js\nvar query = new UsergridQuery('cats').not.eq('color', 'black')\n// select * from cats where not color = 'black'\n```\n\n`and`\n\n> Joins two queries by requiring both of them. `and` is also implied when joining two queries _without_ an operator. E.g.:\n\n```js\nvar query = new UsergridQuery('cats').eq('color', 'black').eq('fur', 'longHair')\n// is identical to:\nvar query = new UsergridQuery('cats').eq('color', 'black').and.eq('fur', 'longHair')  \n```\n\n`or`\n\n> Joins two queries by requiring only one of them. `or` is never implied. E.g.:\n\n```js\nvar query = new UsergridQuery('cats').eq('color', 'black').or.eq('color', 'white')\n```\n    \n> When using `or` and `and` operators, `and` joins will take precedence over `or` joins. You can read more about query operators and precedence [here](http://docs.apigee.com/api-baas/content/supported-query-operators-data-types).\n\n`locationWithin(distanceInMeters, latitude, longitude)`\n\n> Returns entities which have a location within the specified radius. Arguments can be `float` or `int`.\n\n`asc('key')`\n\n> Sorts the results by the specified property, ascending\n\n`desc('key')`\n\n> Sorts the results by the specified property, descending\n\n`sort('key', 'order')`\n\n> Sorts the results by the specified property, in the specified order (`asc` or `desc`).\n \n`limit(int)`\n\n> The maximum number of entities to return\n\n`cursor('string')`\n\n> A pagination cursor string\n\n`fromString('query string')`\n\n> A special builder property that allows you to input a pre-defined query string. All other builder properties will be ignored when this property is defined. For example:\n    \n```js\nvar query = new UsergridQuery().fromString(\"select * where color = 'black' order by name asc\")\n```\n\n## UsergridResponse object\n\n`UsergridResponse` implements several Usergrid-specific enhancements to [request](https://github.com/request/request). Notably:\n\n### ok\n\nYou can check `usergridResponse.ok`, a `bool` value, to see if the response was successful. Any status code < 400 returns true.\n\n```js\nUsergrid.GET('collection', function(error, usergridResponse, entities) {\n    if (usergridResponse.ok) {\n        // woo!\n    }\n})\n```\n    \n### entity, entities, user, users, first, last\n\nDepending on the call you make, you will receive either an array of UsergridEntity objects, or a single entity as the third parameter in the callback. If you're querying the `users` collection, these will also be `UsergridUser` objects, a subclass of `UsergridEntity`.\n\n- `.first` returns the first entity in an array of entities; `.entity` is an alias to `.first`. If there are no entities, both of these will be undefined.\n- `.last` returns the last entity in an array of entities; if there is only one entity in the array, this will be the same as `.first` _and_ `.entity`, and will be undefined if there are no entities in the response.\n- `.entities` will either be an array of entities in the response, or an empty array.\n- `.user` is a special alias for `.entity` for when querying the `users` collection. Instead of being a `UsergridEntity`, it will be its subclass, `UsergridUser`.\n- `.users` is the same as `.user`, though behaves as `.entities` does by returning either an array of UsergridUser objects or an empty array.\n\nExamples:\n\n```js\nUsergrid.GET('collection', function(error, usergridResponse, entities) {\n    // third param is an array of entities because no specific entity was referenced\n    // you can also access:\n    //     usergridResponse.entities\n    //     usergridResponse.first    \n    //     usergridResponse.entity (the first entity)      \n    //     usergridResponse.last\t\t \n})\n    \nUsergrid.GET('collection', '<uuid or name>', function(error, usergridResponse, entity) {\n    // third param is a single entity object\n    // you can also access:\n    //     usergridResponse.entity\n    //     usergridResponse.first  \n    //     usergridResponse.last                \n})\n    \nUsergrid.GET('users', function(error, usergridResponse, users) {\n    // third param is an array of users because no specific user was referenced\n    // you can also access:\n    //     usergridResponse.users\n    //     usergridResponse.user (the first user)          \n    //     usergridResponse.last \n})\n    \nUsergrid.GET('users', '<uuid, username, or email>', function(error, usergridResponse, user) {\n    // third param is a single user object\n    // you can also access:\n    //     usergridResponse.user\n})\n```\n    \n## Connections\n\nConnections can be managed using `Usergrid.connect()`, `Usergrid.disconnect()`, and `Usergrid.getConnections()`, or entity convenience methods of the same name.\n\n### connect\n\nCreate a connection between two entities:\n\n```js\nUsergrid.connect(entity1, 'relationship', entity2, function(error, usergridResponse) {\n    // entity1 now has an outbound connection to entity2\n})\n```\n    \n### getConnections\n\nRetrieve outbound connections:\n\n```js\nclient.getConnections(UsergridClient.Connections.DIRECTION_OUT, entity1, 'relationship', function(error, usergridResponse, entities) {\n    // entities is an array of entities that entity1 is connected to via 'relationship'\n    // in this case, we'll see entity2 in the array\n})\n```\n    \nRetrieve inbound connections:\n\n```js\nclient.getConnections(UsergridClient.Connections.DIRECTION_IN, entity2, 'relationship', function(error, usergridResponse, entities) {\n    // entities is an array of entities that connect to entity2 via 'relationship'\n    // in this case, we'll see entity1 in the array\n})```\n    \n### disconnect\n\nDelete a connection between two entities:\n\n```js\nUsergrid.disconnect(entity1, 'relationship', entity2, function(error, usergridResponse) {\n    // entity1's outbound connection to entity2 has been destroyed\n})\n```\n    \n## Assets\n\nAssets can be uploaded and downloaded either directly using `Usergrid.POST` or `Usergrid.PUT`, or via `UsergridEntity` convenience methods. Before uploading an asset, you will need to initialize a `UsergridAsset` instance.\n\n### UsergridAsset init\n\nLoading a file system image via `fs.readFile()`:\n\n```js\nvar asset = new UsergridAsset('myImage')\nfs.readFile(_dirname + '/image.jpg', function(error, data) {\n    asset.data = data\n})\n```\n    \nLoading a file system image from a read stream (`fs.createReadStream()`):\n\n```js\nvar asset = new UsergridAsset('myImage')\nfs.createReadStream(_dirname + '/image.jpg').pipe(asset).on('finish', function() {\n    // now contains Buffer stream at asset.data\n})\n```\n    \nYou can also access `asset.contentType` and `asset.contentLength` once data has been loaded into a `UsergridAsset`.\n\n### .POST and .PUT\n\nPOST binary data to a collection by creating a new entity:\n\n```js\nvar asset = new UsergridAsset('myImage')\nfs.createReadStream(_dirname + '/image.jpg').pipe(asset).on('finish', function() {\n    client.POST('collection', asset, function(error, assetResponse, entityWithAsset) {\n        // asset is now uploaded to Usergrid\n    })\n})\n```\n\nPUT binary data to an existing entity via attachAsset():\n    \n```js\nvar asset = new UsergridAsset('myImage')\nfs.createReadStream(_dirname + '/image.jpg').pipe(asset).on('finish', function() {\n    // assume entity already exists; attach it to the entity:\n    entity.attachAsset(asset)\n    client.PUT(entity, asset, function(error, assetResponse, entityWithAsset) {\n        // asset is now uploaded to Usergrid\n    })\n})\n```\n    \n### UsergridEntity convenience methods\n\n`entity.uploadAsset()` is a convenient way to upload an asset that is attached to an entity:\n\n```js\nvar asset = new UsergridAsset('myImage')\nfs.createReadStream(_dirname + '/image.jpg').pipe(asset).on('finish', function() {\n    // assume entity already exists; attach it to the entity:\n    entity.attachAsset(asset)\n    entity.uploadAsset(function(error, assetResponse, entityWithAsset) {\n        // asset is now uploaded to Usergrid\n    })\n})\n```\n    \n`entity.downloadAsset()` allows you to download a binary asset:\n\n```js\nentity.uploadAsset(function(error, assetResponse, entityWithAsset) {\n    // access the asset via entityWithAsset.asset\n})```\n","readmeFilename":"README.md","users":{"stany":true,"riceaguilar":true}}