1.0.5 • Published 8 years ago

teamleader-api v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Teamleader for Node.js

An client library for the Teamleader API.

Based on tijsverkoyen - Teamleader API

Added Promise support. Added direct API calls. Hide default request method.

var Teamleader = require('teamleader-api');

var client = new Teamleader({
  group: '',
  api_secret: '',
});

client.post(
  'getContacts', 
  {
    amount: 100,
    pageno: 0
  },
  function(error, contacts, response){
    if (!error) {
      console.log(contacts);
    }
  }
);

client.getContacts({
    amount: 100,
    pageno: 0
  },
  function(error, contacts, response){
    if (!error) {
      console.log(contacts);
    }
  }
);

client.getContacts({
    amount: 100,
    pageno: 0
  }).then(function(contacts){
      console.log(contacts);
  }, function(error){
      console.log(error);
  }
);

Installation

npm install teamleader-api

Usage

You need to pass the page for the endpoint and the parameters. The endpoint can be found in the documentation and you can remove the url and the /api/, and .php part.

So if the endpoint is https://www.teamleader.be/api/helloWorld.php you should pass helloWorld.

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago