https://github.com/kiliankoe/corkboard
📌 pinboard.in API wrapper
https://github.com/kiliankoe/corkboard
pinboard
Last synced: about 2 months ago
JSON representation
📌 pinboard.in API wrapper
- Host: GitHub
- URL: https://github.com/kiliankoe/corkboard
- Owner: kiliankoe
- Created: 2019-01-30T04:32:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-25T14:39:42.000Z (about 6 years ago)
- Last Synced: 2025-03-08T13:03:32.963Z (2 months ago)
- Topics: pinboard
- Language: Swift
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📌 Corkboard
*This project is still very much a work in progress and will likely go through some change before it's in a presentable state.*
This is a simple client for the pinboard.in API. Use it to fetch and update your bookmarks from within your app or service.
Corkboard respects the rate limits imposed by Pinboard and will wait if a request has been sent within the last three seconds. It will also retry up to 4 times if it receives a `429 Too Many Requests` status code.
The `posts/recent` and `posts/all` endpoints have their own limits of three and five minutes respectively. These are not retried automatically, you will receive an error with the waiting time remaining.
### Quick Start
```swift
import Corkboardlet client = PinboardClient(auth: .token("<#your token#>"))
client.postsRecent { result in
guard let bookmarks = try? result.get() else { return }
for bookmark in bookmarks {
print(bookmark)
}
}
```Instantiate a client with either token (recommended) or username/password based auth. The client has methods for interacting with the API.
### Installation
Add the following to your package manifest.
```swift
.package(url: "https://github.com/kiliankoe/Corkboard", from: "<#latest#>")
```