• Stars
    star
    407
  • Rank 106,183 (Top 3 %)
  • Language
    PHP
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tumblr API v2 PHP Client

tumblr.php

CI

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 Packagist

  • guzzle/guzzle 6.x or 7.x
  • eher/oauth 1.0.x

If you're using Composer (you should!) you can just run composer require tumblr/tumblr 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:

php vendor/bin/phpunit

This will also generate a coverage report into ./build/coverage:

XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-html=build/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.

More Repositories

1

Backboard

A motion-driven animation framework for Android.
Java
1,694
star
2

Graywater

An Android library for decomposing RecyclerView layouts to improve scroll performance.
Java
1,209
star
3

colossus

I/O and Microservice library for Scala
Scala
1,144
star
4

jetpants

MySQL toolkit for managing billions of rows and hundreds of database machines
Ruby
1,136
star
5

pytumblr

A Python Tumblr API v2 Client
Python
723
star
6

tumblr.js

JavaScript client for the Tumblr API
JavaScript
645
star
7

collins

groovy kind of love
Scala
572
star
8

Bookends

A UI widget for adding headers and footers to RecyclerView
Java
539
star
9

Remember

A preferences-backed key-value store
Java
523
star
10

policy

Tumblr policies and guidelines
453
star
11

laphs

Apple Live Photo support on the web, courtesy of Tumblr
JavaScript
447
star
12

TMTumblrSDK

Unopinionated and flexible library for easily integrating Tumblr data into your iOS or OS X application.
Objective-C
432
star
13

k8s-sidecar-injector

Kubernetes sidecar injection service
Go
343
star
14

kanvas-ios

Kanvas: a creation tool for iOS
Swift
315
star
15

jumblr

Tumblr API v2 Java Client
Java
277
star
16

gocircuit

Go
237
star
17

genesis

A tool for data center automation
Ruby
156
star
18

docker-registry-pruner

Tool to apply retention logic to docker images in a Docker Registry
Go
127
star
19

data-lasso

JavaScript
119
star
20

docs

Tumblr's public platform documentation.
107
star
21

XExtensionItem

Easier sharing of structured data between iOS applications and share extensions
Objective-C
88
star
22

PermissMe

Java
75
star
23

webpack-web-app-manifest-plugin

A webpack plugin that generates a PWA manifest and integrates with the assets JSON.
JavaScript
75
star
24

k8s-secret-projector

Kubernetes Secret generation from secure credential repos
Go
72
star
25

k8s-config-projector

Create Kubernetes ConfigMaps from configuration files
Go
65
star
26

tumblrclient.go

This is a concrete implementation of the ClientInterface with additional convenience methods defined right on the client object
Go
42
star
27

go-collins

Collins API Client in Go - https://tumblr.github.io/collins
Go
41
star
28

tumblr.go

This is a library which provides structs and functions for accessing the Tumblr API
Go
37
star
29

JXHTTP

you know, for networking
Objective-C
25
star
30

Spectacles

A tiny library for parsing JSON podspecs.
Objective-C
23
star
31

gulp-css-hashes

JavaScript
18
star
32

tsd_proxy

Clojure
15
star
33

tumblr-repl

REPL for the Tumblr API, built on tumblr.js
JavaScript
12
star
34

collins_shell

Ruby
3
star
35

consolr

Ruby
1
star
36

chorus-timekeeper

DI with timekeeping.
PHP
1
star
37

collins_notify

Ruby
1
star
38

collins_client

Ruby
1
star
39

collins_auth

Ruby
1
star
40

slackr_archiver

Ruby
1
star