https://github.com/chadicus/marvel-api-client
A PHP Client for use with the Marvel API
https://github.com/chadicus/marvel-api-client
Last synced: about 1 year ago
JSON representation
A PHP Client for use with the Marvel API
- Host: GitHub
- URL: https://github.com/chadicus/marvel-api-client
- Owner: chadicus
- License: mit
- Created: 2014-02-01T19:14:44.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T18:37:21.000Z (about 3 years ago)
- Last Synced: 2025-04-03T02:12:08.385Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 2.43 MB
- Stars: 18
- Watchers: 3
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Marvel API Client
[](https://travis-ci.org/chadicus/marvel-api-client)
[](https://scrutinizer-ci.com/g/chadicus/marvel-api-client/?branch=v3.x)
[](https://coveralls.io/github/chadicus/marvel-api-client?branch=v3.x)
[](https://packagist.org/packages/chadicus/marvel-api-client)
[](https://packagist.org/packages/chadicus/marvel-api-client)
[](https://packagist.org/packages/chadicus/marvel-api-client)
[](https://packagist.org/packages/chadicus/marvel-api-client)
[](https://packagist.org/packages/chadicus/marvel-api-client)
[](https://packagist.org/packages/chadicus/marvel-api-client)
A PHP client for use with the [Marvel API](http://developer.marvel.com/docs).
## Requirements
The Marvel API Client requires PHP 7.0 (or later).
## Composer
To add the library as a local, per-project dependency use [Composer](http://getcomposer.org)! Simply add a dependency on `chadicus/marvel-api-client` to your project's `composer.json` file such as:
```sh
composer require chadicus/marvel-api-client
```
## Examples
Examples of use can be found [here](/examples)
### Basic Usage
```php
get('characters', 1009351);
//Text to display for attribution requirements
$attributionText = $dataWrapper->getAttributionText();
$character = $dataWrapper->getData()->getResults()[0];
echo "{$character->getName()}\n";
echo "{$character->getDescription()}\n";
foreach ($character->getEvents()->getItems() as $event) {
echo "\t{$event->getName()}\n";
}
```
## Community
[](https://gitter.im/marvel-api-client/Lobby#)
## Contact
Developers may be contacted at:
* [Pull Requests](https://github.com/chadicus/marvel-api-client/pulls)
* [Issues](https://github.com/chadicus/marvel-api-client/issues)
## Project Build
With a checkout of the code get [Composer](http://getcomposer.org) in your PATH and run:
```sh
composer install
./vendor/bin/phpunit
```
## With Great Power Comes Great Responsibility.
When using the `marvel-api-client` you must follow [Marvel's Rules of Attribution](http://developer.marvel.com/documentation/attribution)