2017 © Pedro Peláez
 

project acidrest

image

acidclick/acidrest

  • Wednesday, November 2, 2016
  • by acidclick
  • Repository
  • 1 Watchers
  • 0 Stars
  • 85 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

AcidRest

Simple REST API fluent PHP library, (*1)

Basic usage

    $f = new Acidclick\Rest\Fluent('http://url/api');

    // retrieve product with id = 1 -> http://url/api/product/1?token=123456
    $f->query('token', '123456')->get()->product(1)->execute();

    // insert product
    $f->query('token', '123456')->post()->product()->body(['name' => 'Test'])->execute();

    // update product
    $f->query('token', '123456')->put()->product(1)->body(['name' => 'Test1'])->execute();
    $f->query('token', '123456')->post()->product(1)->body(['name' => 'Test1'])->execute(); 

    // delete product
    $f->query('token', '123456')->delete()->product(1)->execute();

    // get product reviews -> http://url/api/product/1/review?token=123456
    $f->query('token', '123456')->get()->product(1)->review()->execute();

    // add product review
    $f->query('token', '123456')->post()->product(1)->review()->body(['from' => 'Thomas', 'text' => 'Great product'])->execute();

Instalation

The best way to install acidclick/acidrest is using Composer:, (*2)

$ composer require acidclick/acidrest:dev-master

The Versions

02/11 2016

dev-master

9999999-dev http://www.acidclick.cz

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

02/11 2016

1.1

1.1.0.0 http://www.acidclick.cz

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

16/12 2015

v1.0

1.0.0.0 http://www.acidclick.cz

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

16/12 2015

dev-nette-2.2

dev-nette-2.2 http://www.acidclick.cz

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires