https://github.com/mcmatters/pocket-api
https://github.com/mcmatters/pocket-api
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcmatters/pocket-api
- Owner: MCMatters
- Created: 2022-07-07T11:12:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T16:35:02.000Z (over 2 years ago)
- Last Synced: 2025-01-31T13:43:48.636Z (over 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## PHP library for Pocket API
### Installation
```shell
composer require mcmatters/pocket-api
```
### Usage
#### Authentication
```php
request($redirectUri);
$url = $authClient->getAuthorizeUrl($token['code'], $redirectUri);
// Redirect user to the url
// After that obtain access_token
$response = $authClient->authorize($token['code']);
$accessToken = $response['access_token'];
```
#### API usage
```php
add('https://example.com');
$articles = $client->retrieve();
```