Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.7.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.7.4-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: "10.1.0"),
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "10.1.1"),
],
```

Expand Down
4 changes: 2 additions & 2 deletions Sources/Appwrite/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ open class Client {
"x-sdk-name": "Apple",
"x-sdk-platform": "client",
"x-sdk-language": "apple",
"x-sdk-version": "10.1.0",
"x-sdk-version": "10.1.1",
"x-appwrite-response-format": "1.7.0"
]

Expand Down Expand Up @@ -265,7 +265,7 @@ open class Client {

return output.addingPercentEncoding(
withAllowedCharacters: .urlHostAllowed
) ?? ""
)?.replacingOccurrences(of: "+", with: "%2B") ?? "" // since urlHostAllowed doesn't include +
}

///
Expand Down
8 changes: 8 additions & 0 deletions Sources/Appwrite/Services/Databases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ open class Databases: Service {
}

///
/// **WARNING: Experimental Feature** - This endpoint is experimental and not
/// yet officially supported. It may be subject to breaking changes or removal
/// in future versions.
///
/// Create or update a Document. Before using this route, you should create a
/// new collection resource using either a [server
/// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
Expand Down Expand Up @@ -268,6 +272,10 @@ open class Databases: Service {
}

///
/// **WARNING: Experimental Feature** - This endpoint is experimental and not
/// yet officially supported. It may be subject to breaking changes or removal
/// in future versions.
///
/// Create or update a Document. Before using this route, you should create a
/// new collection resource using either a [server
/// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
Expand Down
12 changes: 6 additions & 6 deletions Sources/AppwriteModels/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ open class Document<T : Codable>: Codable {

public static func from(map: [String: Any] ) -> Document {
return Document(
id: map["$id"] as! String,
collectionId: map["$collectionId"] as! String,
databaseId: map["$databaseId"] as! String,
createdAt: map["$createdAt"] as! String,
updatedAt: map["$updatedAt"] as! String,
permissions: map["$permissions"] as! [String],
id: map["$id"] as? String ?? "",
collectionId: map["$collectionId"] as? String ?? "",
databaseId: map["$databaseId"] as? String ?? "",
createdAt: map["$createdAt"] as? String ?? "",
updatedAt: map["$updatedAt"] as? String ?? "",
permissions: map["$permissions"] as? [String] ?? [],
data: try! JSONDecoder().decode(T.self, from: JSONSerialization.data(withJSONObject: map, options: []))
)
}
Expand Down