https://github.com/petitstrawberry/misskeyapikit
Misskey API client for Swift
https://github.com/petitstrawberry/misskeyapikit
misskey swift
Last synced: 5 months ago
JSON representation
Misskey API client for Swift
- Host: GitHub
- URL: https://github.com/petitstrawberry/misskeyapikit
- Owner: petitstrawberry
- License: mit
- Created: 2023-07-11T06:13:13.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2024-11-25T16:20:12.000Z (over 1 year ago)
- Last Synced: 2024-11-25T17:27:20.389Z (over 1 year ago)
- Topics: misskey, swift
- Language: Swift
- Homepage:
- Size: 123 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MisskeyAPIKit
Misskey API client for Swift
## Installation
```swift
dependencies: [
.package(url: "https://github.com/petitstrawberry/MisskeyAPIKit", from: "0.1.0")
],
```
## Usage
### Initialize
```swift
let misskey = MisskeyAPI(
baseURL: "https://mi.example.com",
credentials: .init(accessToken: "access_token")
)
```
### Create a note
```swift
let createdNote = try await misskey.notes.create(.init(text: "Hello, world!"))
```
### Get timeline
```swift
let notes: [Note] = try await misskey.notes.getTimeline(.init(limit: 10))
```