Skip to content

christopheredrian/trenchdevs-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trenchdevs-php-client

A simple PHP client for the trenchdevs.org API

Installation

Package can be installed via composer

composer require trenchdevs/trenchdevs-php-client

Basic Usage

use TrenchDevs\TrenchDevsClient\TrenchDevsClient;

require __DIR__.'/vendor/autoload.php';

// Initiate client
$trenchDevsClient = new TrenchDevsClient('http://trenchdevs.test');

// By default - all responses are in object format (stdClass), set to true if you preferred using array
// $trenchDevsClient->setAssociateArrayResponse(true);

// Send a test route
var_dump($trenchDevsClient->test());

// Authenticate
var_dump($trenchDevsClient->login('...', '...'));
var_dump($trenchDevsClient->me());

// Products api
var_dump($trenchDevsClient->products());
var_dump($trenchDevsClient->productOne(6));

// Logout client
var_dump($trenchDevsClient->logout());

Docs

todo

Contributors

License

The MIT License (MIT)

About

A simple PHP client and wrapper for the trenchdevs.org API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages