Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.
/ pocketapi Public archive

A PHP client for the Pocket API

License

Notifications You must be signed in to change notification settings

arianrashidi/pocketapi

Repository files navigation

PHP Pocket API

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

A PHP client for the Pocket API.

Install

Via Composer

$ composer require arianrashidi/pocketapi

Usage

$pocket = new ArianRashidi\PocketApi\Pocket($consumerKey);

Helpers

$pocket->setConsumerKey($consumerKey);
$pocket->getConsumerKey();
$pocket->setAccessToken($accessToken); // Required for addApi(), modifyApi() and retrieveApi().
$pocket->getAccessToken();
$pocket->setHttpClient(new GuzzleHttp\Client());
$pocket->getHttpClient();

Authentication API

Documentation

$pocket->authenticationApi()->obtainRequestToken($redirectUrl);
$pocket->authenticationApi()->authorizationUrl($requestToken, $redirectUrl);
$pocket->authenticationApi()->obtainAccess($requestToken);

Add API

Documentation

$pocket->addApi()->single($url);

Modify API

Documentation

$pocket->modifyApi()->send($actions);

Retrieve API

Documentation

$pocket->retrieveApi()->get();

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

License

The MIT License (MIT). Please see License File for more information.