Skip to content

About

node.js API client for Teamleader

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

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.

About

node.js API client for Teamleader

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages