storify

0.0.35 • Public • Published

node-storify

Usage

var Storify = require('storify');
 
var s = new Storify({ api_key: 'fd5dfs54f6d54sf' });
 
// should we implement this using callbacks ...
 
s.authenticate('cpetzold', 'test', function(user) {
  // user is a lib/User objects (with a _token property set for authorized calls)
});
 
s.getUser('cpetzold', function(user) {
  user.getStories(function(stories) {
    // stories is a lib/Collection of lib/Story objects
  });
});
 
 
// ... or promises?
 
var user = s.getUser('cpetzold'); // lib/User
 
var story = user.getStory('some-story'); // would be deferred until the user promise was fulfilled

Readme

Keywords

none

Package Sidebar

Install

npm i storify

Weekly Downloads

0

Version

0.0.35

License

none

Last publish

Collaborators

  • storify
  • philmod