mmd/github-api-cache

无限量API请求

安装: 11

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2015-06-02 12:04 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:25:52 UTC


README

“无限”API请求。

而不是

https://api.github.com/repos/twbs/bootstrap/releases

使用

https://your-domain.com/repos/twbs/bootstrap/releases

目前仅支持简单的GET请求。

安装

  1. 使用composer安装bundle

    $ php composer.phar require "mmd/github-api-cache":"dev-master" "sensio/buzz-bundle":"dev-master" "predis/predis":"dev-master"
  2. app/AppKernel.php 中包含bundle

    $bundles = array(
        ...
        new Mmd\Bundle\GithubApiCacheBundle\MmdGithubApiCacheBundle(),
        new Sensio\Bundle\BuzzBundle\SensioBuzzBundle(),
    );
  3. app/config/routing.yml 中包含bundle的路由

    mmd_mc_monitor:
        resource: "@MmdGithubApiCacheBundle/Resources/config/routing.yml"
        prefix:   /
  4. 安装 Redis

    您可以使用此 dockerfile

  5. app/config/parameters.yml 中配置参数

    mmd_github_api_cache.token: '189...b51'
    
    mmd_github_api_cache.redis.scheme: 'tcp'
    mmd_github_api_cache.redis.host: '127.0.0.1'
    mmd_github_api_cache.redis.port: 6379
    mmd_github_api_cache.redis.options: {} # https://github.com/nrk/predis#client-configuration