A php composer plugin for communication with sketches api



Documentation

quintype-api-php

A php composer plugin for communication with sketches api

##How to use To use this package in your project, follow the steps below.

In composer.json, require this package.

"require": {
        ...
        ...
        "quintype/api":"1.0.0",
    },

Install or update the composer packages.

$ composer install
or
$ composer update

In the Laravel config/app.php file, give an alias to the API class for convenience.

'aliases' => [
        ...
        ...
        'Api' => Quintype\Api\Api::class
    ],

Include the API class in necessary controllers.

use Api;

Create an instance(Pass api-host to it).

$this->client = new Api(config("quintype.api-host"));

Use the above created instance to call required functions. For example,

$this->client->config();
$this->client->storyBySlug(["slug"=> $slug]);