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 @@ -39,7 +39,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:

```groovy
implementation("io.appwrite:sdk-for-kotlin:11.0.0")
implementation("io.appwrite:sdk-for-kotlin:11.1.0")
```

### Maven
Expand All @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-kotlin</artifactId>
<version>11.0.0</version>
<version>11.1.0</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.createLineAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.createPointAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf(1, 2), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.createPolygonAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.updateLineAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.updatePointAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf(1, 2), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ databases.updatePolygonAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.createLineColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.createPointColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf(1, 2), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.createPolygonColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.updateLineColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.updatePointColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf(1, 2), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tablesDB.updatePolygonColumn(
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = databases.createLineAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf([1, 2], [3, 4], [5, 6]) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = databases.createPointAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf(1, 2) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = databases.createPolygonAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = databases.updateLineAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf([1, 2], [3, 4], [5, 6]), // optional
newKey = "" // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = databases.updatePointAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf(1, 2), // optional
newKey = "" // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = databases.updatePolygonAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // optional
newKey = "" // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = tablesDB.createLineColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf([1, 2], [3, 4], [5, 6]) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = tablesDB.createPointColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf(1, 2) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val response = tablesDB.createPolygonColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]) // optional
default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]) // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = tablesDB.updateLineColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf([1, 2], [3, 4], [5, 6]), // optional
newKey = "" // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = tablesDB.updatePointColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf(1, 2), // optional
newKey = "" // optional
)
2 changes: 1 addition & 1 deletion docs/examples/kotlin/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ val response = tablesDB.updatePolygonColumn(
tableId = "<TABLE_ID>",
key = "",
required = false,
default = listOf([1,2], [3, 4]), // optional
default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // optional
newKey = "" // optional
)
4 changes: 2 additions & 2 deletions src/main/kotlin/io/appwrite/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor(
init {
headers = mutableMapOf(
"content-type" to "application/json",
"user-agent" to "AppwriteKotlinSDK/11.0.0 ${System.getProperty("http.agent")}",
"user-agent" to "AppwriteKotlinSDK/11.1.0 ${System.getProperty("http.agent")}",
"x-sdk-name" to "Kotlin",
"x-sdk-platform" to "server",
"x-sdk-language" to "kotlin",
"x-sdk-version" to "11.0.0",
"x-sdk-version" to "11.1.0",
"x-appwrite-response-format" to "1.8.0",
)

Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/io/appwrite/Query.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class Query(

fun orderDesc(attribute: String) = Query("orderDesc", attribute).toJson()

fun orderRandom() = Query("orderRandom").toJson()

fun cursorBefore(documentId: String) = Query("cursorBefore", null, listOf(documentId)).toJson()

fun cursorAfter(documentId: String) = Query("cursorAfter", null, listOf(documentId)).toJson()
Expand Down
16 changes: 8 additions & 8 deletions src/main/kotlin/io/appwrite/models/Deployment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ data class Deployment(
@SerializedName("providerRepositoryUrl")
val providerRepositoryUrl: String,

/**
* The branch of the vcs repository
*/
@SerializedName("providerBranch")
val providerBranch: String,

/**
* The commit hash of the vcs commit
*/
Expand Down Expand Up @@ -163,6 +157,12 @@ data class Deployment(
@SerializedName("providerCommitUrl")
val providerCommitUrl: String,

/**
* The branch of the vcs repository
*/
@SerializedName("providerBranch")
val providerBranch: String,

/**
* The branch of the vcs repository
*/
Expand Down Expand Up @@ -191,12 +191,12 @@ data class Deployment(
"providerRepositoryName" to providerRepositoryName as Any,
"providerRepositoryOwner" to providerRepositoryOwner as Any,
"providerRepositoryUrl" to providerRepositoryUrl as Any,
"providerBranch" to providerBranch as Any,
"providerCommitHash" to providerCommitHash as Any,
"providerCommitAuthorUrl" to providerCommitAuthorUrl as Any,
"providerCommitAuthor" to providerCommitAuthor as Any,
"providerCommitMessage" to providerCommitMessage as Any,
"providerCommitUrl" to providerCommitUrl as Any,
"providerBranch" to providerBranch as Any,
"providerBranchUrl" to providerBranchUrl as Any,
)

Expand Down Expand Up @@ -226,12 +226,12 @@ data class Deployment(
providerRepositoryName = map["providerRepositoryName"] as String,
providerRepositoryOwner = map["providerRepositoryOwner"] as String,
providerRepositoryUrl = map["providerRepositoryUrl"] as String,
providerBranch = map["providerBranch"] as String,
providerCommitHash = map["providerCommitHash"] as String,
providerCommitAuthorUrl = map["providerCommitAuthorUrl"] as String,
providerCommitAuthor = map["providerCommitAuthor"] as String,
providerCommitMessage = map["providerCommitMessage"] as String,
providerCommitUrl = map["providerCommitUrl"] as String,
providerBranch = map["providerBranch"] as String,
providerBranchUrl = map["providerBranchUrl"] as String,
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/appwrite/models/Execution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ data class Execution(
val requestPath: String,

/**
* HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
* HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
*/
@SerializedName("requestHeaders")
val requestHeaders: List<Headers>,
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/appwrite/models/HealthAntivirus.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data class HealthAntivirus(
val version: String,

/**
* Antivirus status. Possible values can are: `disabled`, `offline`, `online`
* Antivirus status. Possible values are: `disabled`, `offline`, `online`
*/
@SerializedName("status")
val status: String,
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/appwrite/models/HealthStatus.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data class HealthStatus(
val ping: Long,

/**
* Service status. Possible values can are: `pass`, `fail`
* Service status. Possible values are: `pass`, `fail`
*/
@SerializedName("status")
val status: String,
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/io/appwrite/services/TablesDb.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ class TablesDB(client: Client) : Service(client) {
*
* @param databaseId Database ID.
* @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
* @param rows Array of documents data as JSON objects.
* @param rows Array of rows data as JSON objects.
* @return [io.appwrite.models.RowList<T>]
*/
@Throws(AppwriteException::class)
Expand Down Expand Up @@ -2079,7 +2079,7 @@ class TablesDB(client: Client) : Service(client) {
*
* @param databaseId Database ID.
* @param tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
* @param rows Array of documents data as JSON objects.
* @param rows Array of rows data as JSON objects.
* @return [io.appwrite.models.RowList<T>]
*/
@Throws(AppwriteException::class)
Expand Down