dev-master
9999999-dev https://github.com/jnonon/apigeeneratorApigee skeleton class generator
MIT
The Requires
- php >=5.3.0
- ext-curl *
- twig/twig 1.*
by Jonathan Nonon
api tools
Apigee skeleton class generator
This tool generates Stub classes base on existing definitions in Apigee, for example tumblr console, (*1)
Requires composer, (*2)
In your composer.json
add the following lines:, (*3)
"require": { "jnonon/apigeenerator": "*" },
Install your dependencies:, (*4)
php composer.phar install, (*5)
Require Composer's autoloader. Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:, (*6)
require 'vendor/autoload.php';, (*7)
<?php /* redditApiGeenerator.php */ require __DIR__.'/vendor/autoload.php'; use Jnonon\Tools\ApiGeenerator\Client\ApiGeenerator; $apigee = new ApiGeenerator('reddit', 'RedditApi'); $apigee->setApigeeSourceUrl($url); $endpoints = $apigee->getEndpoints(); //Write to a path, overriding if exists //$apigee->generateClassForEndpoint($endpoints[0])->write('/desirable/filesystem/path', true); echo $apigee->generateClassForEndpoint($endpoints[0])->toString(); //See results //php redditApiGeenerator.php
Sample Output in Examples\RedditApi.php, (*8)
Apigee skeleton class generator
MIT
api tools