Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpvillaisaza/pocket-haskell
Haskell bindings for the Pocket API
https://github.com/jpvillaisaza/pocket-haskell
haskell pocket pocket-api
Last synced: 3 days ago
JSON representation
Haskell bindings for the Pocket API
- Host: GitHub
- URL: https://github.com/jpvillaisaza/pocket-haskell
- Owner: jpvillaisaza
- License: mit
- Created: 2016-08-29T19:30:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T20:02:39.000Z (over 4 years ago)
- Last Synced: 2024-03-21T17:46:50.469Z (8 months ago)
- Topics: haskell, pocket, pocket-api
- Language: Haskell
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Haskell bindings for the Pocket API
See [Pocket][pocket] and the [Pocket API][pocket-api].
## Usage
### Authentication
See [Pocket API: Authentication][pocket-api-auth].
#### Example
1. Go to your [Pocket applications][pocket-api-apps] and get a consumer key:
```haskell
let consumerKey = "1234-abcd1234abcd1234abcd1234"
```2. Obtain a request token from Pocket:
```haskell
let
authRequestReq =
AuthRequestReq "" "" Nothing
authRequest authRequestReq
```3. Redirect the user to Pocket:
```haskell
makeRedirect authRequestReq authRequestRsp
```4. Receive the callback from Pocket.
5. Convert the request token into an access token:
```haskell
let
authAuthorizeReq =
AuthAuthorizeReq "" ""
authAuthorize authAuthorizeReq
```### Add
See [Pocket API: Add][pocket-api-add].
#### Example
Use your application’s consumer key and a user’s access token to add items to
Pocket:```haskell
let
addReq =
makeAddReq "" "" ""
add addReq
```### Modify
See [Pocket API: Modify][pocket-api-send].
TODO
### Retrieve
See [Pocket API: Retrieve][pocket-api-get].
#### Example
Use your application’s consumer key and a user’s access token to retrieve data
from Pocket:```haskell
let
getReq =
(makeGetReq "" "")
{ getReqCount = Just 1
, getReqSort = Just "newest"
}
get getReq
```[pocket]: https://getpocket.com
[pocket-api]: https://getpocket.com/developer/
[pocket-api-apps]: https://getpocket.com/developer/apps/
[pocket-api-add]: https://getpocket.com/developer/docs/v3/add
[pocket-api-auth]: https://getpocket.com/developer/docs/authentication
[pocket-api-get]: https://getpocket.com/developer/docs/v3/retrieve
[pocket-api-send]: https://getpocket.com/developer/docs/v3/modify