johnshopkins / instahook
Simple wrapper for the Instagram API
Installs: 2 380
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.7
- johnshopkins/cache-exchange: 1.*
- johnshopkins/http-exchange: 0.*
Suggests
- guzzle/guzzle: Another example of an HTTP library that can be passed into this wrapper. Or you can pass in another that satisfies the requirements of having a get() method
- resty/resty: An example of an HTTP library that can be passed into this wrapper. Or you can pass in another that satisfies the requirements of having a get() method
This package is not auto-updated.
Last update: 2017-02-01 20:34:38 UTC
README
PHP wrapper for the Instagram API
Example
HttpExchange, CacheExchange, and Resty components autoloaded with Composer.
<?php include "path/to/vendor/autoload.php"; $httpEngine = new \HttpExchange\Adapters\Resty(new \Resty()); $datastore = new \CacheExchange\Adapters\APC(); $cache = new \CacheExchange\Cache($datastore); $insta = new \InstaHook\Client($httpEngine, $cache, "yourClientID"); $media = $insta->getPopularMedia(); foreach ($media->data as $media) { echo "<img src=\"" . $media->images->low_resolution->url . "\" />"; }