https://github.com/zunda-pixel/Sweet
Twitter API v2 Swift Library
https://github.com/zunda-pixel/Sweet
swift swift-package-manager twitter
Last synced: about 1 year ago
JSON representation
Twitter API v2 Swift Library
- Host: GitHub
- URL: https://github.com/zunda-pixel/Sweet
- Owner: zunda-pixel
- License: apache-2.0
- Created: 2022-01-15T11:31:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T15:48:16.000Z (over 2 years ago)
- Last Synced: 2025-05-07T22:47:59.903Z (about 1 year ago)
- Topics: swift, swift-package-manager, twitter
- Language: Swift
- Homepage:
- Size: 1.56 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Sweet
Twitter API v2 for Swift

~%20%7C%20watchOS%2013~%20%7C%20tvOS%206~%20%7C%20Linux%20%7C%20Windows-lightgrey)
## Getting Started
Add the following dependency clause to your Package.swift:
```swift
dependencies: [
.package(url: "https://github.com/zunda-pixel/Sweet", .upToNextMajor(from: "2.3.10")),
],
```
```swift
.target(
name: "PenguinKit",
dependencies: [
.product(name: "Sweet", package: "Sweet"),
]
)
````
## Usage
```swift
let sweet = Sweet(token: .oAuth2user(token: "token"), config: .default)
let response = try await sweet.me()
print(response.user)
```