seregazhuk/tumblr-downloader

PHP library to grab images from Tumblr blogs

0.0.1 2016-10-10 18:48 UTC

This package is auto-updated.

Last update: 2024-10-16 04:04:57 UTC


README

Installation

The recommended way to install this library is via Composer. New to Composer?

composer require seregazhuk/tumblr-downloader

Quick Start

Script

require "vendor/autoload.php";

use Tumblr\API\Client;
use seregazhuk\TumblrDownloader\Downloader;

$client = new Client(
    'YourConsumerKey', 
    'YourConsumerSecret', 
    'YourToken', 
    'YourSecret'
);

$downloader = new Downloader($client);
$downloader->save('some_blog.tumblr.com');

Console command

You can also use console command tumblr-downloader in your terminal. Setup your API credentials in config.php file, and you are ready to go:

return [
    'consumer_key'    => 'YourConsumerKey',
    'consumer_secret' => 'YourConsumerSecret',
    'token'           => 'YourToken',
    'token_secret'    => 'YourSecret',
];

This command will start downloading images from catsof.tumblr.com blog:

$ ./tumblr-downloader save catsof.tumblr.com