jnonon/apigeenerator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jnonon/apigeenerator

Composer 安装命令:

composer require jnonon/apigeenerator

包简介

Apigee skeleton class generator

关键字:

README 文档

README

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

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. In your composer.json add the following lines:

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

    php composer.phar install

  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:

    require 'vendor/autoload.php';

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

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-24