Permalink
Browse files

posts: use shortcuts for get

  • Loading branch information...
1 parent c53f980 commit 37936559e011e99a76038a87aec875b633a98586 @bnjbvr committed Apr 7, 2013
Showing with 4 additions and 1 deletion.
  1. +1 −1 example/test-post.js
  2. +3 −0 lib/posts.coffee
View
@@ -15,7 +15,7 @@ fs.readFile( 'credentials.user.js', function(err, data) {
var client = new tent(config.entity);
client.setUserCredentials( mac_key, mac_key_id );
- client.posts.get( {limit:1}, function(err, posts) {
+ client.posts.get( {limit:1, type: "status"}, function(err, posts) {
if( err ) {
console.error(err);
return;
View
@@ -65,6 +65,9 @@ class Posts extends SubModule
get: ( params, cb ) =>
url = '/posts'
+ if params.type
+ params.type = params.type.split(',').map(@expand).join ','
+
req =
url: url
additional: params

0 comments on commit 3793655

Please sign in to comment.