Skip to content

A lightweight node library for Freshbooks that does not require libxmljs

Notifications You must be signed in to change notification settings

thallium205/freshbooks-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

freshbooks-node

A simple node library for Freshbooks that does not require libxmljs

Install

  npm install freshbooks-node

Usage

Request

var Freshbooks = require('freshbooks-node');
var freshbooks = new Freshbooks(APPLICATION_NAME, APPLICATION_TOKEN, USER_AGENT)
freshbooks.call('invoice.create',
    {
        invoice:
        {   client_id: 32,
            status: 'draft',
            lines: {
                line:
                {
                    name: 'Tulips',
                    description: 'A type of flower',
                    unit_cost: 10,
                    quantity: 2
                }
            }
        }
    }, function(err, json) {
        if (err) {
            console.error(err);
        }
        console.log(JSON.stringify(json, null, 4));
    });

Response

{
    "response": {
        "invoice_id": "73869"
    }
}

Docs

http://developers.freshbooks.com/

Enjoy! - thallium205 https://github.com/thallium205

About

A lightweight node library for Freshbooks that does not require libxmljs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published