https://github.com/zunda-pixel/cloudflare-swift
Cloudflare API Client for Swift
https://github.com/zunda-pixel/cloudflare-swift
cloudflare swift
Last synced: about 13 hours ago
JSON representation
Cloudflare API Client for Swift
- Host: GitHub
- URL: https://github.com/zunda-pixel/cloudflare-swift
- Owner: zunda-pixel
- License: apache-2.0
- Created: 2024-04-25T14:27:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-14T15:10:13.000Z (about 2 months ago)
- Last Synced: 2026-04-14T17:11:09.758Z (about 2 months ago)
- Topics: cloudflare, swift
- Language: Swift
- Homepage:
- Size: 114 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## CloudflareKit
[](https://swiftpackageindex.com/zunda-pixel/cloudflare-swift)
[](https://swiftpackageindex.com/zunda-pixel/cloudflare-swift)
https://developers.cloudflare.com/api
## API List
- [x] Cloudflare Images
- [x] Cloudflare Email Service
### Cloudflare Images
```swift
import ImagesClient
let client = ImagesClient(apiToken: "1234567890", accountId: "1234567890")
let uploadedImage = try await client.upload(
imageURL: URL(string: "https://path/to/image")!,
)
print(uploadedImage)
```
### Cloudflare Email Service
```swift
import EmailServiceClient
let client = EmailServiceClient(
apiToken: "1234567890",
accountId: "1234567890",
httpClient: .urlSession(.shared)
)
let result = try await client.send(
EmailMessage(
to: "recipient@example.com",
from: "welcome@example.com",
subject: "Welcome!",
html: "
Hello!
",
text: "Hello!"
)
)
print(result.delivered)
```