Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

tumblr.php

Tumblr API v2 PHP Client

Subscribe to updates I use tumblr.php


Statistics on tumblr.php

Number of watchers on Github 347
Number of open issues 19
Average time to close an issue about 2 months
Main language PHP
Average time to merge a PR 18 days
Open pull requests 8+
Closed pull requests 6+
Last commit about 3 years ago
Repo Created over 7 years ago
Repo Last Updated over 2 years ago
Size 67 KB
Organization / Authortumblr
Latest Releasev0.4.0
Contributors14
Page Updated
Do you use tumblr.php? Leave a review!
View open issues (19)
View tumblr.php activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating tumblr.php for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

tumblr.php

Build Status

The official PHP client for the Tumblr API.

Usage

Basic Usage

The first step is setting up a Client:

$client = new Tumblr\API\Client($consumerKey, $consumerSecret);
$client->setToken($token, $tokenSecret);

And then you can do anything you'd like:

foreach ($client->getUserInfo()->user->blogs as $blog) {
    echo $blog->name . "\n";
}

User Methods

$client->getUserInfo();

$client->getDashboardPosts($options = null);
$client->getLikedPosts($options = null);
$client->getFollowedBlogs($options = null);

$client->follow($blogName);
$client->unfollow($blogName);

$client->like($postId, $reblogKey);
$client->unlike($postId, $reblogKey);

Blog Methods

$client->getBlogInfo($blogName);

$client->getBlogAvatar($blogName, $size = null);

$client->getBlogPosts($blogName, $options = null);
$client->getBlogLikes($blogName, $options = null);
$client->getBlogFollowers($blogName, $options = null);

$client->getQueuedPosts($blogName, $options = null);
$client->getDraftPosts($blogName, $options = null);
$client->getSubmissionPosts($blogName, $options = null);

Post Methods

$client->createPost($blogName, $data);
$client->editPost($blogName, $id, $data);
$client->deletePost($blogName, $id, $reblogKey);
$client->reblogPost($blogName, $id, $reblogKey, $options = null);

Tagged Methods

$client->getTaggedPosts($tag, $options = null);

Dependencies

tumblr.php is available on composer

  • guzzle/guzzle 6.*
  • eher/oauth 1.0.x

If you're using composer (you should!) you can just run php composer.phar install and you'll be good to go. More details on getcomposer.org.

Running tests

tumblr.php has full unit tests that can be run with PHPUnit like this:

$ phpunit

That will also generate a coverage report into ./coverage

Copyright and license

Copyright 2013 Tumblr, Inc.

Licensed under the Apache License, Version 2.0 (the License); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.

tumblr.php open issues Ask a question     (View All Issues)
  • about 4 years Error Class not found
  • about 4 years How to set this up on web hosting without composer
  • about 4 years PHP Fatal error: Uncaught Tumblr\\API\\RequestException: [401]: Unauthorized\n\n
  • over 4 years Instruction for Oauth integration
  • over 4 years 'type' parameter doens't work
  • over 4 years Not able to post video to blog
  • over 4 years Remove "reblog" comment on reblog action
  • almost 5 years pagination example
  • over 5 years Updating to Guzzle 5 >
  • over 5 years Basic setup
  • about 6 years Reblog with custom slug
tumblr.php open pull requests (View All Pulls)
  • Update to Guzzle 6
  • Explaining the "basic usage" a little bit more.
  • RequestException tried to access an undefined array index.
  • Updated Travis badge to svg for waaay better quality
  • ..
  • Fixed PHPUnit suite and removed deprecated calls.
  • Update RequestException.php to better handle non-array error responses
  • fixing video uploads
tumblr.php list of languages used
tumblr.php latest release notes
v0.4.0 v0.4.0

Fixes problem with redirects that broke some functionality

v0.2.0 v0.2.0
  • Photoset support
  • SSL for all requests
  • Better test coverage
Other projects in PHP
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark