定制 ypho/scryfall 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ypho/scryfall

最新稳定版本:2.0

Composer 安装命令:

composer require ypho/scryfall

包简介

A wrapper around the API from Scryfall (scryfall.com)

README 文档

README

This wrapper connects with the Scryfall API.

Installation

You can use composer to require the package, it will automatically install the latest version.

composer require ypho/scryfall

Testing the package

In this package there are several tests. The responses are mocked, so it won't actually spam the Scryfall API.

vendor/bin/phpunit

How to use the package

In the examples folder, there are some example scripts you can use. Otherwise, you can use the snippets below.

Initialize new client

require 'vendor/autoload.php';
$client = new Ypho\Scryfall\Client();

Sets

// Get the Endpoint
$setEndpoint = $client->sets();

$setEndpoint->all(); // Returns an array with Set-objects
$setEndpoint->get('mmq'); // Returns a single Set-object of the Mercadian Masques set 

Cards

$cardEndpoint = $client->cards();

$cardEndpoint->get('0038ea4d-d0a6-44a4-bee6-24c03313d2bc'); // Returns a Card-object of Sphinx's Revelation (MM3 version)
$cardEndpoint->allCardsInSet('mm3'); // Returns an array with Card-objects for all cards in MM3

Symbols

$symbologyEndpoint = $client->symbology();

$symbologyEndpoint->all(); // Returns an array with all Symbol-objects
$symbologyEndpoint->parseMana('RG'); // Returns a ManaCost-object

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2018-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固