2017 © Pedro Peláez
 

symfony-bundle tumblr-bundle

Symfony TumblrBundle

image

ushios/tumblr-bundle

Symfony TumblrBundle

  • Wednesday, October 30, 2013
  • by ushios
  • Repository
  • 1 Watchers
  • 0 Stars
  • 576 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

tumblr-bundle

Create tumblr client using 'config.yml', (*1)


Installation

composer.json

# composer.json

"require": {
    "ushios/tumblr-bundle": "0.0.*"
    ...
}

and run composer update command., (*2)

AppKernel.php

# app/AppKernel.php

public function registerBundles()
{
    bundles = array(
        // ...
        new Ushios\Bundle\TumblrBundle\UshiosTumblrBundle(),
    );

    retrun bundles();
}

Configuration

config.yml, (*3)

# app/config/config.php

ushios_tumblr:
client:
    default:
        consumerKey:    ${YOUR_CONSUMER_KEY}
        consumerSecret: ${YOUR_CONSUMER_SECRET}
    named:
        class:          Your\Tumblr|Client # default Tumblr\API\Client
        consumerKey:    ${YOUR_NAMED_CONSUMER_KEY}
        consumerSecret: ${YOUR_NAMED_CONSUMER_SECRET}
        token:          ${YOUR_NAMED_TOKEN} // optional
        tokenSecret:    ${YOUR_NAMED_TOKEN_SECRET} // optional

Usage

Get client from service.

Using default settings tumblr client., (*4)

# Bundle/Controller/Controller.php

public function fooAction()
{
    $tumblr = $this->container->get('ushios_tumblr_client');
    // or
    $tumblr = $this->container->get('ushios_tumblr_client.default');
}

Using named settings., (*5)

# Bundle/Controller/Controller.php

public function fooAction()
{
    $tumblr = $this->container->get('ushios_tumblr_client.named');
    get_class($aws); // Your\Tumblr\Client
}

Client

@see tumblr/tumblr web site, (*6)

The Versions

30/10 2013

dev-master

9999999-dev http://github.com/ushios/tumblr-bundle

Symfony TumblrBundle

  Sources   Download

MIT

The Requires

 

by Ushio Shugo

tumblr

26/10 2013

0.0.1

0.0.1.0 http://github.com/ushios/tumblr-bundle

Symfony TumblrBundle

  Sources   Download

MIT

The Requires

 

by Ushio Shugo

tumblr