Skip to content

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudflareKit

https://developers.cloudflare.com/api

API List

  • Cloudflare Images
  • Cloudflare Email Service

Cloudflare Images

import CloudflareImages

let client = CloudflareImages.Client(apiToken: "1234567890", accountId: "1234567890")

let uploadedImage = try await client.upload(
  imageURL: URL(string: "https://path/to/image")!,
)

print(uploadedImage)

Cloudflare Email Service

import CloudflareEmailService

let client = CloudflareEmailService.Client(
  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: "<h1>Hello!</h1>",
    text: "Hello!"
  )
)

print(result.delivered)

About

Cloudflare API Client for Swift

Topics

Resources

Stars

15 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages