punchfork

0.0.2 • Public • Published

node-punchfork

Node.js library to access Punchfork's API.

Quick start

npm install punchfork

Example Usage

 
// your-app-name is used as the request's User-Agent header
var punchfork = require('punchfork')('your-api-key', 'your-app-name');
 
// search for all recipes with lettuce
punchfork.recipeSearch({
  q: 'lettuce'
}, function(err, recipes) {
  if (err) return console.log(err);
  console.log('recipes:', recipes);
  return;
});
 

API

All methods take a callback as their last parameter.

The callback is called with an error code if needed, and then the repsonse.

  • punchfork.recipeSearch(options) - same as what you'd type into search box at http://punchfork.com
  • punchfork.randomRecipe - a recipe selected at random from database
  • punchfork.listOfPublishers - lists all recipe publishers on Punchfork
  • punchfork.generateSearchIndex(options) (Ultra API only) - list of generated search index terms for the input recipe
  • punchfork.rateLimitStatus - the number of remaining API calls allowed today for the given API key

More information on the API is available at http://punchfork.com/api.

Tests

To run tests, install vows:

npm install vows

Then run:

PUNCHFORK_API=your-api vows test/*

Contributors

License

MIT Licensed

Readme

Keywords

none

Package Sidebar

Install

npm i punchfork

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • niftylettuce
  • titanism