Skip to content

Commit 57aba1d

Browse files
committed
Improving README
1 parent 1b5409f commit 57aba1d

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
11
# Lemmy-Swift-Client
22

3-
A Swift client for Lemmy.
3+
A Swift client for [Lemmy](https://join-lemmy.org).
4+
5+
## Features
6+
7+
- Fully Swift type safe
8+
- `async`/`await` compatible
9+
- Supports [all Lemmy API endpoints](https://join-lemmy.org/api/classes/LemmyHttp.html)
10+
- Uses Codable for easy JSON serialization/deserialization
11+
12+
## Installation
13+
14+
We use Swift Package Manager to make it easy to install and use the Lemmy Swift Client in your project.
15+
16+
```swift
17+
dependencies: [
18+
.package(url: "https://github.com/rrainn/Lemmy-Swift-Client.git", .upToNextMajor(from: "1.0.0"))
19+
]
20+
```
21+
22+
## Usage
23+
24+
Below is an example of a basic usage example of how to use the Lemmy Swift Client.
25+
26+
```swift
27+
import Lemmy_Swift_Client
28+
29+
if let url = URL(string: "https://eventfrontier.com/api/v3") {
30+
// Create an instance of the Lemmy API with the base URL of your Lemmy instance
31+
let api = LemmyAPI(baseUrl: url)
32+
33+
// Create a SearchRequest object with the `q` parameter
34+
let request = SearchRequest(q: "Lemmy-Swift-Client")
35+
// Send the request to the Lemmy API
36+
if let response = try? await api.request(request) {
37+
print(response)
38+
} else {
39+
print("Error")
40+
}
41+
}
42+
```
43+
44+
Luckily this just scratches the surface of what you can do with the Lemmy Swift Client. For more information checkout our [documentation](https://rrainn.github.io/Lemmy-Swift-Client/documentation/lemmy_swift_client/).
45+
46+
## Resources
47+
48+
- [Documentation](https://rrainn.github.io/Lemmy-Swift-Client/documentation/lemmy_swift_client/)
49+
- [Repository](https://github.com/rrainn/Lemmy-Swift-Client)
50+
- [License](https://github.com/rrainn/Lemmy-Swift-Client/blob/main/LICENSE)
51+
52+
## License
53+
54+
Lemmy Swift Client is available under the MIT license. See the [LICENSE](https://github.com/rrainn/Lemmy-Swift-Client/blob/main/LICENSE).
55+
56+
## Maintainers
57+
58+
- [Charlie Fish](https://charlie.fish) ([Contact](https://charlie.fish/contact))

0 commit comments

Comments
 (0)