Giter VIP home page Giter VIP logo

teamleader's Introduction

Teamleader class

Oauth2

This package uses an old api version of Teamleader. To use the new version with oauth2, have a look at sumocoders/teamleader-oauth2

Installation

composer require sumocoders/teamleader

Usage

$teamleader = new Teamleader('myApiGroup', 'myApiSecret');

// do one of the calls on the teamleader object, see inline docs for more info
$teamleader->getDepartments();

About

PHP Teamleader is a (wrapper)class to communicate with your Teamleader-instance.

Documentation

The class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.

teamleader's People

Contributors

carakas avatar doodhout avatar geertclerx avatar guuslangelaar0 avatar hannenijhuis avatar jnstr avatar jonasdekeukelaere avatar jslegers avatar ricardogarciakoukio avatar ricardogarfe avatar rostyslav11 avatar sebastiandedeyne avatar thomasmarcelis avatar tijsverkoyen avatar timdegroote avatar wdeeke avatar wesleylancel avatar wiwi-websolutions avatar woutersioen avatar yorickh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teamleader's Issues

The API key was not valid or the Teamleader account is no longer active.

image

I get the message The API key was not valid or the Teamleader account is no longer active.

Anyone can help me with this?

If I use the example as shown in this repo is says;

A department should have an id", exception: "InvalidArgumentException

Same as I request the contacts I get an error with a switch statement like below;

continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?"

Whatsup with this?

[V1] Create an invoice as draft

Currently is is not possible to create an invoice as draft. Teamleader API states that draft_invoice can be 1 or 0. Default is 0

Could this be added to the api?

Construct?

Hi

Thanks for the wonderfull wrapper. Is it possible to create a deal using a constructor?

$deal = new Deal($company,$title, ... )

Or do we always need to use the setters.
Thanks!

Feature synchronization between API and API wrapper

I'm currently working on a project intended to synchronize data between Drupal and Teamleader.

The main goal of this project is to provide live 2-way-synchronization between Drupal and Teamleader for company data and contact data. So any changes to company data or contact data in Drupal would automatically be imported into Teamleader and vice versa.

While I have considered writing my own library to communicate with the Teamleader API, I've decided to use this library instead for the time being, as this library seems to be have the official support of the Teamleader development team and I want to to ensure future compatibility with the Teamleader API.

My initial implementation allows me to create a contact in Teamleader whenever a user is added in Drupal and change a contact in Teamleader whenever a user is changed in Drupal.

Deletion of contacts was going to be the next feature to implement, but it appears that neither https://www.teamleader.be/api/deleteCompany.php nor https://www.teamleader.be/api/deleteContact.php have been implemented by this library (see also #22).

  • Does either the SumoCoders dev team or Teamleader dev team have any plans to add these and/or other missing features to this wrapper library?
    • If yes, can you give an indication on when these features can be expected?
    • If not, would you accept any pull requests I make that contain missing features? And if you allow the addition of 3rd party code, do you have any coding standards I need to consider when adding the missing features to the library?

Finally, could you give me any idea on what I can expect regarding feature synchronization between this library and the Teamleader API in the future? Are features implemented by this library intended to stay synchronized with future versions of the Teamleader API whenever changes to the API are made?

fetch extended contact details

Hi,

I don't know what i am doin wrong, but if i fetch the contacts, i get a minimum on contact details.
How do i retrieve extended details like, tags, description etc?
I only get this>>

$response = $teamleader->crmGetContacts();
array(12) {
  ["forename"]=>
  string(4) "Mark"
  ["surname"]=>
  string(7) "Summers"
  ["email"]=>
  string(22) "[email protected]"
  ["country"]=>
  string(2) "GB"
  ["zipcode"]=>
  string(3) "B31"
  ["city"]=>
  string(10) "Birmingham"
  ["street"]=>
  string(17) "Westminster Road "
  ["number"]=>
  string(2) "20"
  ["language"]=>
  string(2) "EN"
  ["gender"]=>
  string(1) "M"
  ["dob"]=>
  int(348710400)
  ["gsm"]=>
  string(15) "+1 404-555-0137"

Cant add company with KVK number (local business number)

Hoi!

Wij proberen middels jullie code een API koppeling op te bouwen tussen Copernica en Teamleader. We krijgen een vreemde foutmelding zodra we een bedrijf proberen toe te voegen in teamleader wanneer we het veld "local business number" proberen te vullen. Zie onderstaande error (geedit om de klant anoniem te houden in deze);

Fatal error: Uncaught exception 'SumoCoders\Teamleader\Exception' with message 'Unknown method (setKvkNummer)' in //Teamleader/Crm/Company.php:639 Stack trace: #0 //Teamleader/Teamleader.php(684): SumoCoders\Teamleader\Crm\Company::initializeWithRawData(Array) #1 //sync/teamleaderlive.php(36): SumoCoders\Teamleader\Teamleader->crmGetCompany(5849706) #2 {main} thrown in //Teamleader/Crm/Company.php on line 639

Dingen die we reeds gedaan hebben:

  • methode opgezocht waar die volgens de error zou moeten staan (is niet zo)
  • de data die we versturen is daadwerkelijk een kvk nummer
  • het bedrijf heeft ook een kvk nummer, en zo niet is dit geen probleem

De code lijkt hier onderuit te gaan: (lijn 36)
$id = 5849706;//$data['object_id']; $companydata = $teamleader->crmGetCompany($id);

Any clue? :-)

CURLOPT_FOLLOWLOCATION triggers error in case of open_basedir restriction

Line 223 of file Teamleader.php contains the following cURL setting :

$options[CURLOPT_FOLLOWLOCATION] = true;

In Belgium, Combell is a popular webhosting company for shared hosting environments and they have the open_basedir restriction enabled.

With the open_basedir restriction enabled, this setting generates a fatal error. That means, your library cannot be used on Combell servers or similar environments.

Removing or commenting this setting solves the error.

crmGetContactsByCompany return type

Hi,

It seems like crmGetContactsByCompany should return an array with Contact objects, but it simply returns an array with some data instead.

Deleting CRM data

It appears that neither https://www.teamleader.be/api/deleteCompany.php nor https://www.teamleader.be/api/deleteContact.php have been implemented by this library.

Do you have any plans to add these in the foreseeable future?
If not, would you accept pull requests with these missing features and which coding standards would I need to follow in that case?

For more details, see also #21.

gettype in invoicesGetInvoices method

Hi,

I want to retrieve all the invoices from a Company

$teamLeaderCompany = $this->teamLeader->crmGetCompany($company->teamleader_id); $invoices = $this->teamLeader->invoicesGetInvoices(1491247449, 1498747449, $teamLeaderCompany);

This returns the following error:

Variable $contactOrComany must be an instance of either a Contact or a Company

In the function there's a check if $teamLeaderCompany is a Company or Contact object.
The check happens with the gettype-method, which always return "object" in stead of Company or Contact...

Can i get any help with this?

Thanks

Ticket feature

When the ticket CRUD functionality will be implemented?

Unhandled exception causes fatal error when API secret isn't set

Because I had a typo in the field name referencing my API secret, I get the following fatal error:

Additional uncaught exception thrown while handling exception.

Original

SumoCoders\Teamleader\Exception: api-error on group 6151 in SumoCoders\Teamleader\Teamleader->doCall() (line 272 of /Users/inxco/Documents/www/drupalteamleader4/sites/all/vendor/SumoCoders/Teamleader/Teamleader.php).

Additional

Exception: theme() may not be called until all modules are loaded. in theme() (line 1017 of /Users/inxco/Documents/www/drupalteamleader4/includes/theme.inc).

It would be nice to trigger a more user friendly error message when an API secret or API group has not been defined instead of this error.

Teamleader API v2

Hi there!

First and foremost, thank you for building and maintaining this API wrapper!
Second, are there any plans to start/release a version of the PHP wrapper compatible with the v2 of Temleader's API?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.