npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fancyhands-node

v0.1.3

Published

A Fancy Hands API wrapper for Node JS

Downloads

565

Readme

Node wrapper for Fancyhands' API

For more information visit the Fancyhands API Docs

##Installation If you don't have node installed, get it at nodejs.org

Then run:

npm install fancyhands-node --save

##Getting your Key and Secret Go to the Fancy Hands API site to get your OAuth credentials.

##Example

var FH = require('fancyhands-node').fancyhands;

// Configuration
FH.config('YOUR_API_KEY', 'YOUR_API_SECRET');

// Create a Standard Request
var request = {
	title: 'Test Request, do not claim!',
	description: 'Do not send to support',
	bid: 3
};

// Send the request.
// The method returns a promise. Use the 'then' method to pass in response and error handlers.
FH.standard_request_create(request)
	.then(function(request) {
	
		// print out what we got
		console.log("Success! Request created");		
		console.log(request);
		
		// send a message to this request...
		FH.message_send({ key: request.key, message: "And one more thing..." })
			.then(function(data) {
				console.log("Success! Message sent");
				console.log(data);
			});
});


FH.standard_request_get().then(function(data) {
	var requests = data.requests;
	for(var i = 0; i < requests.length; ++i) {
		console.log(requests[i].title);
	}
});

Methods

All methods return a promise. We use the Q Promise Library, read more about it here.

Utility

FH.post( url, params (Object) )
Manual POST to Fancyhands. Can use any API method.

FH.get( url, params (Object) )
Manual GET from Fancyhands. Can use any API method.

FH.put( url, params (Object) )
Manual PUT to Fancyhands. Can use any API method.

FH.delete( url, params (Object) )
Manual DELETE from Fancyhands. Can use any API method.

FH.echo( <params Function|Object|number|string> )
We'll echo back whatever params you send. Use to test your API key and secret.

Incoming Calls

FH.incoming_call_create( params (Object) )
Allows you to create a new Incoming Call Object, with custom built script for our assistants to read.

FH.incoming_call_get( params (Object) )
Retrieves a list or specific Incoming call objects

FH.incoming_call_update( params (Object) )
Updates an Incoming call object

FH.incoming_call_delete( params (Object) )
Deletes an Incoming call object

FH.incoming_call_history( params (Object) )
Gets a list of all calls made on an Incoming call object

FH.number_search( params (Object) )
Search for an available phone number to buy and returns a list of them

FH.number_buy( params (Object) )
This method allows you to purchase a phone number that will be used as your incoming call display number.

FH.number_delete( params (Object) )
his method allows you to delete a previously purchased number, you will no longer be billed for it.

Outgoing Calls

FH.outgoing_call_create( params (Object) )
Specifically for making phone calls and getting structured data back. Super fast!

FH.outgoing_call_get( params (Object) )
Returns list of created calls

Custom Requests

FH.custom_request_create( params (Object) )
Make a request and get customized structured data back.

FH.custom_request_get( params (Object) )
Returns list of created custom requests

FH.custom_request_cancel( params (Object) )
Cancel a request before you get billed for it.

Standard Requests

FH.standard_request_create( params (Object) )
Make a request and get freeform data back.

FH.standard_request_get( params (Object) )
Return list of created standard requests.

Messages

FH.message_send( params (Object) )
Send a message to the assistant working on a task