Skip to content

Instantly share code, notes, and snippets.

@MotiurRahman
Last active May 6, 2019 18:40
Show Gist options
  • Select an option

  • Save MotiurRahman/1910b03d7023437f961fa5030ef05c3e to your computer and use it in GitHub Desktop.

Select an option

Save MotiurRahman/1910b03d7023437f961fa5030ef05c3e to your computer and use it in GitHub Desktop.
Count Test
var ArrowDB = require('arrowdb'),
arrowDBApp = new ArrowDB('zMQgYUudYAS1eJhjvS5nv8GhpN5aGs4E');
arrowDBApp.usersLogin({
login: '[email protected]',
password: '1234'
}, function(err, result) {
if (err) {
console.error(err.message);
} else {
console.log(result.body.response.users[0]);
// If you are manually managing user sessions or cookies,
// the method returns both a cookie and session ID.
arrowDBApp.sessionCookieString = result.cookieString;
sessionID = result.body.meta.session_id;
arrowDBApp.placesQuery({
count: true,
where: {
updated_at: {
"$gt": "2019-04-10T17:36:56+0000"
}
}
}, function(err, result) {
if (err) {
console.error(err.message);
} else {
console.log(result.body.meta.count);
}
});
}
});
users-MacBook-Pro-3:Desktop user$ node app.js
{ id: '5cd07bbd22462d02199c5904',
created_at: '2019-05-06T18:23:57+0000',
updated_at: '2019-05-06T18:32:21+0000',
external_accounts: [],
confirmed_at: '2019-05-06T18:23:57+0000',
username: 'test',
email: '[email protected]',
admin: 'true',
stats: { photos: { total_count: 0 }, storage: { used: 0 } },
friend_counts: { requests: 0, friends: 0 } }
1199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment