dimuska139/rawg-sdk-php 问题修复 & 功能扩展

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

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

dimuska139/rawg-sdk-php

最新稳定版本:1.2.0

Composer 安装命令:

composer require dimuska139/rawg-sdk-php

包简介

README 文档

README

Build Status codecov License

This is unofficial RAWG PHP SDK. This library contains methods for interacting with RAWG API.

Installation

composer require dimuska139/rawg-sdk-php

Usage

require 'vendor/autoload.php';
use Rawg\ApiClient;
use Rawg\Config;
use Rawg\DateRange;
use Rawg\Filters\GamesFilter;
use Rawg\Filters\PaginationFilter;

$cfg = new Config('api-key', 'en');
$client = new ApiClient($cfg);

$additionsFilter = (new PaginationFilter())->setPage(1)->setPageSize(5);
print_r($client->games()->getAdditions(47, $additionsFilter)->getData());

$gamesFilter = (new GamesFilter())
    ->setPage(1)
    ->setPageSize(20)
    ->setDates([
        DateRange::create(new DateTime( '2012-02-01' ), new DateTime( '2015-06-25' ))
    ])
    ->setOrdering('-name')
    ->setTags([1,2,3]);

print_r($client->games()->getGames($gamesFilter)->getData());

The tests should be considered a part of the documentation. Also you can read official docs.

API limitations

Only 5 requests per second allowed from one IP.

License

RAWG PHP SDK is released under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-04