storify

Storify API client for node.js

Usage no npm install needed!

<script type="module">
  import storify from 'https://cdn.skypack.dev/storify';
</script>

README

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