Twitter API v2 for Swift
Add the following dependency clause to your Package.swift:
dependencies: [
.package(url: "https://github.com/zunda-pixel/Sweet", .upToNextMajor(from: "2.3.10")),
],
.target(
name: "PenguinKit",
dependencies: [
.product(name: "Sweet", package: "Sweet"),
]
)
let sweet = Sweet(token: .oAuth2user(token: "token"), config: .default)
let response = try await sweet.me()
print(response.user)