2017 © Pedro Peláez
 

application apigeenerator

Apigee skeleton class generator

image

jnonon/apigeenerator

Apigee skeleton class generator

  • Sunday, February 24, 2013
  • by jnonon
  • Repository
  • 3 Watchers
  • 2 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Apigee Skeleton class generator

This tool generates Stub classes base on existing definitions in Apigee, for example tumblr console, (*1)

Features

  • Generates class files from Api definitions, minimizing the ammount of code to type
  • Creates properties based on how often they are used across the API definition
  • Adds phpDoc entries on each api method, if documentation exists

TODO

  • Support other programming languages templates

Installing via Composer

  1. Requires composer, (*2)

  2. In your composer.json add the following lines:, (*3)

    "require": {
        "jnonon/apigeenerator": "*"
    },
  1. Install your dependencies:, (*4)

    php composer.phar install, (*5)

  2. 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)

Usage Example

    <?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)

The Versions

24/02 2013

dev-master

9999999-dev https://github.com/jnonon/apigeenerator

Apigee skeleton class generator

  Sources   Download

MIT

The Requires

 

by Jonathan Nonon

api tools