Download the PHP package matheusmariano/tumblr without Composer

On this page you can find all versions of the php package matheusmariano/tumblr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tumblr

PHP Tumblr Client

Build Status

An unofficial PHP client for the Tumblr API

Installing

Through the Composer, you must require the package matheusmariano/tumblr.

Using

Authentication

Before request any method from API, it's necessary to authenticate our client. To do it, there are two authentication levels:

The API key level is the simplest one, because it just needs the consumer key given by the Tumblr when registering your application. To use this, you should import the ApiKey class

and then instantiate it with your consumer key.

You can use the OAuth level practically the same way, importing the OAuth class

and then instantiating with all the necessary keys.

OAuth tokens and Authorizer

Getting the tokens from users is a little bit different task, because they need to be notified and give authorization to your application. It's a proccess that involves a lot of steps, but the Authorizer class turns everything easier. For every used page, you should import the class this way.

The first step is to send your consumers to Tumblr with your callback URI. Let's consider it should be https://example.com/auth/tumblr/callback.

If consumers are accepted, you should receive temporary tokens.

Save these tokens, because they are necessary for the next session. Now you need to redirect your users to https://www.tumblr.com/oauth/authorize?oauth_token={$tokens['oauth_token']}. There, they are going to be able to authorize your application and then going to be redirected to the callback URI.

In the https://example.com/auth/tumblr/callback, the step is to send the consumers and the temporary tokens together with GET parameter oauth_verifier received from Tumblr.

If you prefer, you can use the global $_GET to get the oauth_verifier.

If everything runs as plained, you should receive the user definitive tokens.

Client

After configure one of those authenticators, you can import the Client class

and then instantiate it with the authenticator.

Methods

In the version 0.1 of this package, the Client has only 2 very basic methods

It's important to follow the Tumblr API to use these methods and your responses correctly.

Example: getting the text posts that has the fruit tag.

The response should be an stdClass object with all content of response, following the Tumblr API.

The post method works the same way.

Exceptions

Request methods may receive errors, generaly 401 not authorized and 404 not found, throwing exceptions like GuzzleHttp\Exception\ClientException, GuzzleHttp\Exception\ServerException etc., which should be treated with try...catch. See the Guzzle documentation for more information.

License

PHP Tumblr Client a is open-sourced software licensed under the MIT license.


All versions of tumblr with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
guzzlehttp/oauth-subscriber Version 0.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package matheusmariano/tumblr contains the following files

Loading the files please wait ....