2017 © Pedro PelĂĄez
 

symfony-bundle marvel-api-bundle

A Symfony bundle that provides a Marvel API client service.

image

ikoene/marvel-api-bundle

A Symfony bundle that provides a Marvel API client service.

  • Monday, March 5, 2018
  • by ikoene
  • Repository
  • 0 Watchers
  • 3 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Packagist Installs license, (*1)

Marvel API bundle

The Marvel Comics API allows developers everywhere to access information about Marvel's vast library of comics—from what's coming up, to 70 years ago. This Marvel API bundle helps you explore the Marvel universe with great ease., (*2)

Requirements

Installation

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:, (*3)

$ composer require ikoene/marvel-api-bundle

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*4)

$ composer require ikoene/marvel-api-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*5)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*6)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Ikoene\MarvelApiBundle\IkoeneMarvelApiBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Configure the Bundle

``` yaml, (*7)

You will need a public and private api key from https://developers.marvel.com.

Set the keys as environment variables in the .env file.

ikoene_marvel_api: public_api_key: "%env(MARVEL_PUBLIC_API_KEY)%" private_api_key: "%env(MARVEL_PRIVATE_API_KEY)%", (*8)


## Usage

<?php, (*9)

$client = $this->get('ikoene_marvel_api_client');, (*10)

$response = $client->getCharacter(1009610);, (*11)

var_dump($response);, (*12)


### Endpoints You can call every endpoint with an explicitly defined method. So if you, for example, want a list of comics containing a specific character, you can call `getComicsForCharacter()`.

$response = $client->getComicsForCharacter(1009610);, (*13)


### Optional filters It's also possible to add optional filters to the calls. Let's get all comics for 'Spider-Man' which title starts with 'Age of Ultron' and order the results by 'title'.

$comicFilter = new Ikoene\MarvelApiBundle\Entity\ComicFilter(); $comicFilter->setTitleStartsWith('Age of Ultron'); $comicFilter->setOrderBy('title');, (*14)

$response = $client->getComicsForCharacter(1009610, $comicFilter); ```, (*15)

Pretty easy, right?, (*16)

Additional info

The Versions

05/03 2018

dev-master

9999999-dev

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

05/03 2018

0.6.0

0.6.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

04/03 2018

dev-feature/tests

dev-feature/tests

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

04/03 2018

dev-fix/service-definition-parameters

dev-fix/service-definition-parameters

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

22/02 2018

0.5.0

0.5.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

22/02 2018

0.4.0

0.4.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

22/02 2018

0.3.0

0.3.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

17/02 2018

0.1.3

0.1.3.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

17/02 2018

0.2.0

0.2.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

17/02 2018

0.1.2

0.1.2.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

17/02 2018

0.1.1

0.1.1.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

17/02 2018

0.1.0

0.1.0.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken

16/02 2018

0.0.1

0.0.1.0

A Symfony bundle that provides a Marvel API client service.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Koen Vinken