darkdiesel/php-knack-rest-client

Knack REST API Client for PHP Users.

1.0.0a 2017-04-11 13:00 UTC

This package is not auto-updated.

Last update: 2024-04-14 03:23:10 UTC


README

Requirements

  • PHP >= 5.4.9

Installation

  1. Download and Install PHP Composer.

    curl -sS https://getcomposer.org/installer | php
  2. Next, run the Composer command to install the latest version of php knack rest client.

    php composer.phar require darkdiesel/php-knack-rest-client "^1.0.0a"

    or add the following to your composer.json file.

    {
        "require": {
            "darkdiesel/php-knack-rest-client": "^1.0.0a"
        }
    }

    Note: If you are using laravel 5.0 or 5.1(this version dependent on phpdotenv 1.x), then use "1.5.*" version instead.

  3. Then run Composer's install or update commands to complete installation.

    php composer.phar install
  4. After installing, you need to require Composer's autoloader:

    require 'vendor/autoload.php';

Configuration

use array

create Service class with ArrayConfiguration parameter.

use KnackRestApi\Record\RecordService;
use KnackRestApi\Configuration\ArrayConfiguration;

$rs = new RecordService(new ArrayConfiguration(
            array(
                'knackAppId' => 'application_id',
                'knackRestApiKey' => 'rest_api_key',
            )
        ));

Usage

TODO!