Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 2 months 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 (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T15:48:16.000Z (about 1 year ago)
- Last Synced: 2024-11-09T10:52:22.261Z (2 months ago)
- Topics: swift, swift-package-manager, twitter
- Language: Swift
- Homepage:
- Size: 1.56 MB
- Stars: 7
- Watchers: 3
- 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
## 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)
```