Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fledgexu/trunk
A simple Swift Mastodon SDK.
https://github.com/fledgexu/trunk
mastodon swift
Last synced: 12 days ago
JSON representation
A simple Swift Mastodon SDK.
- Host: GitHub
- URL: https://github.com/fledgexu/trunk
- Owner: FledgeXu
- License: bsd-3-clause
- Created: 2021-07-17T07:34:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-31T11:52:20.000Z (over 3 years ago)
- Last Synced: 2024-11-12T07:40:05.820Z (2 months ago)
- Topics: mastodon, swift
- Language: Swift
- Homepage:
- Size: 219 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Trunk
A simple Swift Mastodon SDK.
# Usage
```swift
import Trunk// Initialized trunk instance.
let trunk = Trunk(instanceURL: "https://mastodon.online/", accessToken: "")// Fire API.
var cacellables = Set()
let publisher = try? trunk.run(request: TimelinesEndpoint.publicTimeline())
publisher?
.sink(receiveCompletion: { error in print(error)}) { value in
value.forEach { status in
print(status)
}
}
.store(in: &cacellables)
```
# Supported API List- [x] apps(Authorizing user needs the Webview.)
- [x] oauth
- [x] accounts(Doesn't support for registering yet.)
- [x] bookmarks
- [x] favourites
- [x] mutes
- [x] blocks
- [x] domain_blocks
- [x] filters
- [x] reports
- [x] follow_requests
- [x] endorsements
- [x] featured_tags
- [x] preferences
- [x] suggestions
- [x] statuses
- [x] media
- [x] polls
- [x] scheduled_statuses
- [x] timelines
- [x] conversations
- [x] lists
- [x] markers
- [ ] streaming
- [x] notifications
- [ ] push
- [x] search
- [x] instance
- [x] trends
- [x] directory
- [x] custom_emojis
- [ ] admin
- [x] announcements
- [ ] proofs
- [ ] oembed