2017 © Pedro Peláez
 

library spore

Spore client for PHP5.3+

image

euskadi31/spore

Spore client for PHP5.3+

  • Monday, November 26, 2012
  • by euskadi31
  • Repository
  • 1 Watchers
  • 3 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Spore

Build Status, (*1)

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP., (*2)

SPORE is a way to describe public services HTTP APIs such as twitter or applications with an HTTP interface such as Apache CouchDB using a simple language-agnostic JSON document that can be used by various language-specific implementations to dynamically or statically generate high level client objects., (*3)

The goal of this git repository is to host:, (*4)

Applications and services API descriptions

Install

Use Composer.phar, (*5)

cd Spore/
curl -s https://getcomposer.org/installer | php
php composer.phar install

Usage

The examples are a good place to start. The minimal you'll need to have is:, (*6)

``` php loadSpec(__DIR__ . '/spec/github.json'); $response = $client->call('GET', 'get_user', array( 'user' => 'euskadi31' )); print_r($response->getContent()); ?>, (*7)


Output stdClass Object ( [type] => User [company] => Audiofanzine [public_gists] => 6 [followers] => 12 [created_at] => 2010-02-03T10:25:00Z [blog] => [following] => 42 [email] => [public_repos] => 14 [location] => Toulouse, France [html_url] => https://github.com/euskadi31 [name] => Axel Etcheverry [hireable] => [url] => https://api.github.com/users/euskadi31 [gravatar_id] => 6171ad2ceddde3288b87c546e92f2909 [avatar_url] => https://secure.gravatar.com/avatar/6171ad2ceddde3288b87c546e92f2909?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png [id] => 195383 [bio] => PHP & Zend Framework developer [login] => euskadi31 ) ### Generated client cd Spore/ bin/spore generate:client demo/spec/github.json ``` php getUser(array( 'user' => 'euskadi31' )); print_r($response->getContent()); ?>

Output, (*8)

stdClass Object
(
    [type] => User
    [company] => Audiofanzine
    [public_gists] => 6
    [followers] => 12
    [created_at] => 2010-02-03T10:25:00Z
    [blog] => 
    [following] => 42
    [email] => 
    [public_repos] => 14
    [location] => Toulouse, France
    [html_url] => https://github.com/euskadi31
    [name] => Axel Etcheverry
    [hireable] => 
    [url] => https://api.github.com/users/euskadi31
    [gravatar_id] => 6171ad2ceddde3288b87c546e92f2909
    [avatar_url] => https://secure.gravatar.com/avatar/6171ad2ceddde3288b87c546e92f2909?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png
    [id] => 195383
    [bio] => PHP & Zend Framework developer
    [login] => euskadi31
)

Test with Atoum

The tests can be executed by using this command from the base directory:, (*9)

./vendor/mageekguy/atoum/bin/atoum --glob Tests/Units/

Report Issues/Bugs

Bugs, (*10)

The Versions

26/11 2012

dev-master

9999999-dev

Spore client for PHP5.3+

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest http client spore