ralph / marvel
Marvel PHP API
v0.0.2
2019-03-28 11:11 UTC
Requires
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- phpunit/phpunit: ^5.2
This package is auto-updated.
Last update: 2024-09-29 05:21:40 UTC
README
Marvel Composer 包
介绍
欢迎来到世界上最伟大的漫威漫画API世界!
漫威漫画API是一个工具,帮助全世界的开发者利用70多年漫威漫画时代的数据,创建出令人惊叹、神奇和不凡的网站和应用。
准备好开始了吗?太棒了!
以下是您需要做的简短步骤:
- 注册: 获取API密钥
- 成为良好的API用户:阅读、理解并遵守漫威漫画API的使用条款
- 链接回来源:在显示API数据时遵守归属和链接指南
- 构建酷炫的东西:使用Ralph/Marvel Composer 包
参考:https://developer.marvel.com/documentation/getting_started
要求
- Guzzlehttp/guzzle
- Composer
安装
$ composer require "ralph/marvel:~0.0.2" -vvv
使用
<?php use Ralph\Marvel; $config = [ 'publicKey' => '***', 'privateKey' => '*******', ]; $marvel = new Marvel($config); $options = [ 'limit' => 10, ]; // Fetches lists of comic characters with optional filters. $characters = $marvel->characters($options); // Fetches lists of comics with optional filters. $comics = $marvel->comics($options); // Fetches lists of comic creators with optional filters. $creators = $marvel->creators($options); // Fetches lists of events with optional filters. $events = $marvel->events($options); // Fetches lists of comic series with optional filters. $series = $marvel->series($options); // Fetches lists of comic stories with optional filters. $stories = $marvel->stories($options);
文档
更多详细文档,我们可以访问Maravel的开发者网站,https://developer.marvel.com/docs#!/public/getCreatorCollection_get_0。
许可证
MIT