<commit_before>var sys = require('sys'),
    hyperpublic = require('./lib/hyperpublic');

var callback = function (msg) {
  return function (data, code) {
    console.log(msg);
    console.log('------------------------');
    console.log(sys.inspect(data));
    console.log('------------------------\n');
  };
}

var client_id = '3RiGGtdIlJbVZhlqUvdGg47mwSegIYYHkfsWi0IT';
var client_secret = '<KEY>';

var api = new hyperpublic.API(client_id, client_secret);


// show takes only one id. find. takes an object

console.log(api.people);

api.people.show(4, callback('/people/{id}'));

api.people.find({
        'zipcode': '11211',
        'limit': '2'
        }, callback('/people/{query}'));

api.things.show(722, callback('/things/{id}'));

api.things.find({
        'zipcode': '11211',
        'limit': '2'
        }, callback('/things/{query}'));
<commit_msg>demonstrating all endpoints in example.js<commit_after>var sys = require('sys'),
    hyperpublic = require('./lib/hyperpublic');

var callback = function (msg) {
  return function (data, code) {
    console.log(msg);
    console.log('------------------------');
    console.log(sys.inspect(data));
    console.log('------------------------\n');
  };
}

var client_id = '';
var client_secret = '';

var api = new hyperpublic.API(client_id, client_secret);

api.people.create({
    "email":"<EMAIL>",
    "name":"Jonathan",
    "password": "<PASSWORD>",
    "tags": "test"
}, callback('/people/{query}'));

api.things.create({
    "display_name": "macbook",
    "tags": "sup",
    "image_url": "http://developers.hyperpublic.com/images/logo.png",
}, callback('/things/{create}'));

api.people.create({
    "display_name": "mcdonalods",
    "tags": "fries",
    "image_url": "http://developers.hyperpublic.com/images/logo.png",
}, callback('/people/{create}'));

api.people.show(4, callback('/people/{id}'));

api.people.find({
        'zipcode': '11211',
        'limit': '2'
        }, callback('/people/{query}'));

api.things.show(722, callback('/things/{id}'));

api.things.find({
        'zipcode': '11211',
        'limit': '2'
        }, callback('/things/{query}'));

{'fraction_non_alphanumeric': 0.2495318352059925, 'fraction_numerical': 0.016853932584269662, 'mean_word_length': 2.9574074074074073, 'pattern_counts': {'":': 10, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '40981', 'n_tokens_mistral': 733, 'n_tokens_neox': 697, 'n_words': 124}