hounddog / hd-instagram
ZF2 module for Instagram API.
dev-master
2014-06-19 11:54 UTC
Requires
- php: >=5.4
- hounddog/hd-api-client: dev-master
Requires (Dev)
- phpunit/phpunit: 3.7.*
- squizlabs/php_codesniffer: 1.4.*
This package is not auto-updated.
Last update: 2024-11-05 02:49:27 UTC
README
Version 0.0.1 Created by Martin Shwalbe
Introduction
HdClientApi is a connector for variuous Api based Modules (e.g. Github, Twitter, Instagramm etc) based on Zend Framework 2 .
Installation
Main Setup
- Clone this project into your
./vendor/
directory and enable it in yourapplication.config.php
file.
Usage
Basic Usage
Here is short example on how to use
$client = $serviceManager->get('EdpGithub\Client');
$repos = $client->api('user')->repos('hounddog');
This would fetch all the Repositories for the user Hounddog
Authentication
To use functionality which needs Authentication you have to first authenticate
$client = $serviceManager->get('EdpGithub\Client');
$client->authenticate('url_token', 'access_token');
$repos = $client->api('current_user')->repos();
You can also listen to the Event 'EdpGithub\Client', 'api'
$em->attach('EdpGithub\Client', 'api', function($e) use ($sm) {
$client = $e->getTarget();
$client->authenticate('url_token', $token /* your access_token here */);
} );
Documentation
Please refer to the Wiki for a more detailed Documentation