Skip to content

Commit

Permalink
Release candidate 4 for 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Feb 21, 2024
1 parent 9c484cb commit adbb8c1
Show file tree
Hide file tree
Showing 39 changed files with 330 additions and 81 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-apple.svg?color=green&style=flat-square)
![License](https://img.shields.io/github/license/appwrite/sdk-for-apple.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.13-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down Expand Up @@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:

```swift
dependencies: [
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "5.0.0-rc.3"),
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "5.0.0-rc.4"),
],
```

Expand Down
2 changes: 1 addition & 1 deletion Sources/Appwrite/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open class Client {
"x-sdk-name": "Apple",
"x-sdk-platform": "client",
"x-sdk-language": "apple",
"x-sdk-version": "5.0.0-rc.3",
"x-sdk-version": "5.0.0-rc.4",
"x-appwrite-response-format": "1.5.0"
]

Expand Down
8 changes: 6 additions & 2 deletions Sources/Appwrite/Services/Messaging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import AppwriteModels
open class Messaging: Service {

///
/// Create a subscriber.
/// Create a subscriber
///
/// Create a new subscriber.
///
/// @param String topicId
/// @param String subscriberId
Expand Down Expand Up @@ -48,7 +50,9 @@ open class Messaging: Service {
}

///
/// Delete a subscriber.
/// Delete a subscriber
///
/// Delete a subscriber by its unique ID.
///
/// @param String topicId
/// @param String subscriberId
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let account = Account(client)

let token = try await account.createEmailToken(
userId: "[USER_ID]",
email: "[email protected]"
email: "[email protected]",
phrase: false // optional
)

4 changes: 3 additions & 1 deletion docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ let account = Account(client)

let token = try await account.createMagicURLToken(
userId: "[USER_ID]",
email: "[email protected]"
email: "[email protected]",
url: "https://example.com", // optional
phrase: false // optional
)

6 changes: 5 additions & 1 deletion docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ let client = Client()
let account = Account(client)

let success = try await account.createOAuth2Session(
provider: .amazon
provider: .amazon,
success: "https://example.com", // optional
failure: "https://example.com", // optional
token: false, // optional
scopes: [] // optional
)

3 changes: 2 additions & 1 deletion docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let account = Account(client)

let target = try await account.createPushTarget(
targetId: "[TARGET_ID]",
identifier: "[IDENTIFIER]"
identifier: "[IDENTIFIER]",
providerId: "[PROVIDER_ID]" // optional
)

3 changes: 2 additions & 1 deletion docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let account = Account(client)
let user = try await account.create(
userId: "[USER_ID]",
email: "[email protected]",
password: ""
password: "",
name: "[NAME]" // optional
)

4 changes: 3 additions & 1 deletion docs/examples/account/list-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ let client = Client()

let account = Account(client)

let identityList = try await account.listIdentities()
let identityList = try await account.listIdentities(
queries: [] // optional
)

4 changes: 3 additions & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ let client = Client()

let account = Account(client)

let logList = try await account.listLogs()
let logList = try await account.listLogs(
queries: [] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/account/update-m-f-a.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ let client = Client()
let account = Account(client)

let user = try await account.updateMFA(
mfa: `false`
mfa: false
)

3 changes: 2 additions & 1 deletion docs/examples/account/update-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let client = Client()
let account = Account(client)

let user = try await account.updatePassword(
password: ""
password: "",
oldPassword: "password" // optional
)

5 changes: 4 additions & 1 deletion docs/examples/avatars/get-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ let client = Client()
let avatars = Avatars(client)

let bytes = try await avatars.getBrowser(
code: .avantBrowser
code: .avantBrowser,
width: 0, // optional
height: 0, // optional
quality: 0 // optional
)

5 changes: 4 additions & 1 deletion docs/examples/avatars/get-credit-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ let client = Client()
let avatars = Avatars(client)

let bytes = try await avatars.getCreditCard(
code: .americanExpress
code: .americanExpress,
width: 0, // optional
height: 0, // optional
quality: 0 // optional
)

5 changes: 4 additions & 1 deletion docs/examples/avatars/get-flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ let client = Client()
let avatars = Avatars(client)

let bytes = try await avatars.getFlag(
code: .afghanistan
code: .afghanistan,
width: 0, // optional
height: 0, // optional
quality: 0 // optional
)

4 changes: 3 additions & 1 deletion docs/examples/avatars/get-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ let client = Client()
let avatars = Avatars(client)

let bytes = try await avatars.getImage(
url: "https://example.com"
url: "https://example.com",
width: 0, // optional
height: 0 // optional
)

7 changes: 6 additions & 1 deletion docs/examples/avatars/get-initials.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ let client = Client()

let avatars = Avatars(client)

let bytes = try await avatars.getInitials()
let bytes = try await avatars.getInitials(
name: "[NAME]", // optional
width: 0, // optional
height: 0, // optional
background: "" // optional
)

5 changes: 4 additions & 1 deletion docs/examples/avatars/get-q-r.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ let client = Client()
let avatars = Avatars(client)

let bytes = try await avatars.getQR(
text: "[TEXT]"
text: "[TEXT]",
size: 1, // optional
margin: 0, // optional
download: false // optional
)

3 changes: 2 additions & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let document = try await databases.createDocument(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]",
data: [:]
data: [:],
permissions: ["read("any")"] // optional
)

3 changes: 2 additions & 1 deletion docs/examples/databases/get-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let databases = Databases(client)
let document = try await databases.getDocument(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]"
documentId: "[DOCUMENT_ID]",
queries: [] // optional
)

3 changes: 2 additions & 1 deletion docs/examples/databases/list-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let databases = Databases(client)

let documentList = try await databases.listDocuments(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]"
collectionId: "[COLLECTION_ID]",
queries: [] // optional
)

4 changes: 3 additions & 1 deletion docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ let databases = Databases(client)
let document = try await databases.updateDocument(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]",
documentId: "[DOCUMENT_ID]"
documentId: "[DOCUMENT_ID]",
data: [:], // optional
permissions: ["read("any")"] // optional
)

7 changes: 6 additions & 1 deletion docs/examples/functions/create-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ let client = Client()
let functions = Functions(client)

let execution = try await functions.createExecution(
functionId: "[FUNCTION_ID]"
functionId: "[FUNCTION_ID]",
body: "[BODY]", // optional
async: false, // optional
path: "[PATH]", // optional
method: .gET, // optional
headers: [:] // optional
)

4 changes: 3 additions & 1 deletion docs/examples/functions/list-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ let client = Client()
let functions = Functions(client)

let executionList = try await functions.listExecutions(
functionId: "[FUNCTION_ID]"
functionId: "[FUNCTION_ID]",
queries: [], // optional
search: "[SEARCH]" // optional
)

3 changes: 2 additions & 1 deletion docs/examples/storage/create-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let storage = Storage(client)
let file = try await storage.createFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]",
file: InputFile.fromPath("file.png")
file: InputFile.fromPath("file.png"),
permissions: ["read("any")"] // optional
)

13 changes: 12 additions & 1 deletion docs/examples/storage/get-file-preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ let storage = Storage(client)

let bytes = try await storage.getFilePreview(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
fileId: "[FILE_ID]",
width: 0, // optional
height: 0, // optional
gravity: .center, // optional
quality: 0, // optional
borderWidth: 0, // optional
borderColor: "", // optional
borderRadius: 0, // optional
opacity: 0, // optional
rotation: -360, // optional
background: "", // optional
output: .jpg // optional
)

4 changes: 3 additions & 1 deletion docs/examples/storage/list-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ let client = Client()
let storage = Storage(client)

let fileList = try await storage.listFiles(
bucketId: "[BUCKET_ID]"
bucketId: "[BUCKET_ID]",
queries: [], // optional
search: "[SEARCH]" // optional
)

4 changes: 3 additions & 1 deletion docs/examples/storage/update-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ let storage = Storage(client)

let file = try await storage.updateFile(
bucketId: "[BUCKET_ID]",
fileId: "[FILE_ID]"
fileId: "[FILE_ID]",
name: "[NAME]", // optional
permissions: ["read("any")"] // optional
)

7 changes: 6 additions & 1 deletion docs/examples/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ let teams = Teams(client)

let membership = try await teams.createMembership(
teamId: "[TEAM_ID]",
roles: []
roles: [],
email: "[email protected]", // optional
userId: "[USER_ID]", // optional
phone: "+12065550100", // optional
url: "https://example.com", // optional
name: "[NAME]" // optional
)

3 changes: 2 additions & 1 deletion docs/examples/teams/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let teams = Teams(client)

let team = try await teams.create(
teamId: "[TEAM_ID]",
name: "[NAME]"
name: "[NAME]",
roles: [] // optional
)

4 changes: 3 additions & 1 deletion docs/examples/teams/list-memberships.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ let client = Client()
let teams = Teams(client)

let membershipList = try await teams.listMemberships(
teamId: "[TEAM_ID]"
teamId: "[TEAM_ID]",
queries: [], // optional
search: "[SEARCH]" // optional
)

5 changes: 4 additions & 1 deletion docs/examples/teams/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ let client = Client()

let teams = Teams(client)

let teamList = try await teams.list()
let teamList = try await teams.list(
queries: [], // optional
search: "[SEARCH]" // optional
)

Loading

0 comments on commit adbb8c1

Please sign in to comment.