Skip to content
A PHP client for accessing the Dozuki Technical Documentation API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
README.md
composer.json
license.txt

README.md

Dozuki API PHP Client

Description

This is a PHP client library for accessing the Dozuki V2.0 API (https://www.dozuki.com/api/2.0/doc/)

Requirements

PHP 5.3 or higher

Guzzle (https://github.com/guzzle/guzzle)

Tests depend on PHPUnit (http://www.phpunit.de/manual/current/en/installation.html)

Usage

require_once 'vendor/autoload.php';

use WhyteSpyder\DozukiPHPClient\DozukiClient;

$client = DozukiClient::factory(
	array(
    	'dozuki_domain'     => 'example.dozuki.com'    // required
	)
);

// Authorization required for some API functionality
// Get Auth Token
$authRequest = $client->getCommand(
    'user/token',
    array(
        'X-App-Id' => 'YOUR APP ID',
        'email' => 'admin@example.com',
        'password' => 'PASSWORD'
    )
);
$response = $authRequest->execute();

// Add Auth Token to client method headers
$client->addAuthToken($response['authToken']);

$command = $client->getCommand(
	'category',
	array(
    	'categoryname' => 'Test'
	)
);
$results = $command->execute(); // returns an array of results

You can find a list of the client's available commands in the bundle's dozuki_config.json but basically they should be the same as the api endpoints listed in the docs.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.