2017 © Pedro Peláez
 

library php-json-api

Simple JSON API Builder for PHP

image

fordnox/php-json-api

Simple JSON API Builder for PHP

  • Saturday, August 30, 2014
  • by fordnox
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

php-json-api

Most simple JSON API builder class for PHP. One file only. Accepting a JSON request body and returning JSON as a result., (*2)

Example Server

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

$server = new Fordnox\JsonApiServer();
$server->register('ping', function($params){
    return $params;
});
$server->handle();

Example Invoke

curl http://api.com -d '{"method":"ping","params":"pong!"}'

{"result":"pong!", "error":null}

The Versions

30/08 2014

dev-master

9999999-dev http://github.com/fordnox/php-json-api

Simple JSON API Builder for PHP

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

The Development Requires

api json