Skip to content

Commit

Permalink
Merge pull request #46 from appwrite/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
abnegate committed Nov 20, 2023
2 parents af76289 + 312f026 commit c5974e0
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 143 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -2,7 +2,7 @@

![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square)
![License](https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.12-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 @@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:

```groovy
implementation("io.appwrite:sdk-for-android:4.0.0")
implementation("io.appwrite:sdk-for-android:4.0.1")
```

### Maven
Expand All @@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-android</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/io/appwrite/Client.kt
Expand Up @@ -88,7 +88,7 @@ class Client @JvmOverloads constructor(
"x-sdk-name" to "Android",
"x-sdk-platform" to "client",
"x-sdk-language" to "android",
"x-sdk-version" to "4.0.0",
"x-sdk-version" to "4.0.1",
"x-appwrite-response-format" to "1.4.0"
)
config = mutableMapOf()
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/java/io/appwrite/Query.kt
Expand Up @@ -20,11 +20,11 @@ class Query {

fun isNotNull(attribute: String) = "isNotNull(\"${attribute}\")"

fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end))
fun between(attribute: String, start: Int, end: Int) = "between(\"${attribute}\", ${start}, ${end})"

fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end))
fun between(attribute: String, start: Double, end: Double) = "between(\"${attribute}\", ${start}, ${end})"

fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end))
fun between(attribute: String, start: String, end: String) = "between(\"${attribute}\", \"${start}\", \"${end}\")"

fun startsWith(attribute: String, value: String) = Query.addQuery(attribute, "startsWith", value)

Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/io/appwrite/models/Document.kt
Expand Up @@ -38,7 +38,7 @@ data class Document<T>(
val updatedAt: String,

/**
* Document permissions. [Learn more about permissions](/docs/permissions).
* Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
*/
@SerializedName("\$permissions")
val permissions: List<Any>,
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/io/appwrite/models/File.kt
Expand Up @@ -32,7 +32,7 @@ data class File(
val updatedAt: String,

/**
* File permissions. [Learn more about permissions](/docs/permissions).
* File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
*/
@SerializedName("\$permissions")
val permissions: List<Any>,
Expand Down
106 changes: 53 additions & 53 deletions library/src/main/java/io/appwrite/services/Account.kt

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions library/src/main/java/io/appwrite/services/Avatars.kt
Expand Up @@ -18,9 +18,9 @@ class Avatars : Service {
public constructor (client: Client) : super(client) { }

/**
* Get Browser Icon
* Get browser icon
*
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param code Browser Code.
* @param width Image width. Pass an integer between 0 to 2000. Defaults to 100.
Expand Down Expand Up @@ -54,7 +54,7 @@ class Avatars : Service {


/**
* Get Credit Card Icon
* Get credit card icon
*
* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
Expand Down Expand Up @@ -90,7 +90,7 @@ class Avatars : Service {


/**
* Get Favicon
* Get favicon
*
* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
*
Expand All @@ -116,9 +116,9 @@ class Avatars : Service {


/**
* Get Country Flag
* Get country flag
*
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
* @param code Country Code. ISO Alpha-2 country code format.
* @param width Image width. Pass an integer between 0 to 2000. Defaults to 100.
Expand Down Expand Up @@ -152,7 +152,7 @@ class Avatars : Service {


/**
* Get Image from URL
* Get image from URL
*
* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
*
Expand Down Expand Up @@ -185,7 +185,7 @@ class Avatars : Service {


/**
* Get User Initials
* Get user initials
*
* Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
*
Expand Down Expand Up @@ -221,7 +221,7 @@ class Avatars : Service {


/**
* Get QR Code
* Get QR code
*
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
*
Expand Down
30 changes: 15 additions & 15 deletions library/src/main/java/io/appwrite/services/Databases.kt
Expand Up @@ -16,7 +16,7 @@ class Databases : Service {
public constructor (client: Client) : super(client) { }

/**
* List Documents
* List documents
*
* Get a list of all the user&#039;s documents in a given collection. You can use the query params to filter your results.
*
Expand Down Expand Up @@ -56,7 +56,7 @@ class Databases : Service {
}

/**
* List Documents
* List documents
*
* Get a list of all the user&#039;s documents in a given collection. You can use the query params to filter your results.
*
Expand All @@ -79,15 +79,15 @@ class Databases : Service {
)

/**
* Create Document
* Create document
*
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console.
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* @param databaseId Database ID.
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
* @param documentId Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
* @param data Document data as JSON object.
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
* @return [io.appwrite.models.Document<T>]
*/
@JvmOverloads
Expand Down Expand Up @@ -125,15 +125,15 @@ class Databases : Service {
}

/**
* Create Document
* Create document
*
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console.
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
*
* @param databaseId Database ID.
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
* @param documentId Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
* @param data Document data as JSON object.
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
* @return [io.appwrite.models.Document<T>]
*/
@JvmOverloads
Expand All @@ -154,7 +154,7 @@ class Databases : Service {
)

/**
* Get Document
* Get document
*
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
*
Expand Down Expand Up @@ -197,7 +197,7 @@ class Databases : Service {
}

/**
* Get Document
* Get document
*
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
*
Expand All @@ -223,15 +223,15 @@ class Databases : Service {
)

/**
* Update Document
* Update document
*
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
*
* @param databaseId Database ID.
* @param collectionId Collection ID.
* @param documentId Document ID.
* @param data Document data as JSON object. Include only attribute and value pairs to be updated.
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
* @return [io.appwrite.models.Document<T>]
*/
@JvmOverloads
Expand Down Expand Up @@ -269,15 +269,15 @@ class Databases : Service {
}

/**
* Update Document
* Update document
*
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
*
* @param databaseId Database ID.
* @param collectionId Collection ID.
* @param documentId Document ID.
* @param data Document data as JSON object. Include only attribute and value pairs to be updated.
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
* @return [io.appwrite.models.Document<T>]
*/
@JvmOverloads
Expand All @@ -298,7 +298,7 @@ class Databases : Service {
)

/**
* Delete Document
* Delete document
*
* Delete a document by its unique ID.
*
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/java/io/appwrite/services/Functions.kt
Expand Up @@ -16,7 +16,7 @@ class Functions : Service {
public constructor (client: Client) : super(client) { }

/**
* List Executions
* List executions
*
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
*
Expand Down Expand Up @@ -56,7 +56,7 @@ class Functions : Service {


/**
* Create Execution
* Create execution
*
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
*
Expand Down Expand Up @@ -105,7 +105,7 @@ class Functions : Service {


/**
* Get Execution
* Get execution
*
* Get a function execution log by its unique ID.
*
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/java/io/appwrite/services/Graphql.kt
Expand Up @@ -16,7 +16,7 @@ class Graphql : Service {
public constructor (client: Client) : super(client) { }

/**
* GraphQL Endpoint
* GraphQL endpoint
*
* Execute a GraphQL mutation.
*
Expand Down Expand Up @@ -50,7 +50,7 @@ class Graphql : Service {


/**
* GraphQL Endpoint
* GraphQL endpoint
*
* Execute a GraphQL mutation.
*
Expand Down
14 changes: 7 additions & 7 deletions library/src/main/java/io/appwrite/services/Locale.kt
Expand Up @@ -16,7 +16,7 @@ class Locale : Service {
public constructor (client: Client) : super(client) { }

/**
* Get User Locale
* Get user locale
*
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.([IP Geolocation by DB-IP](https://db-ip.com))
*
Expand Down Expand Up @@ -76,7 +76,7 @@ class Locale : Service {


/**
* List Continents
* List continents
*
* List of all continents. You can use the locale header to get the data in a supported language.
*
Expand Down Expand Up @@ -106,7 +106,7 @@ class Locale : Service {


/**
* List Countries
* List countries
*
* List of all countries. You can use the locale header to get the data in a supported language.
*
Expand Down Expand Up @@ -136,7 +136,7 @@ class Locale : Service {


/**
* List EU Countries
* List EU countries
*
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
*
Expand Down Expand Up @@ -166,7 +166,7 @@ class Locale : Service {


/**
* List Countries Phone Codes
* List countries phone codes
*
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
*
Expand Down Expand Up @@ -196,7 +196,7 @@ class Locale : Service {


/**
* List Currencies
* List currencies
*
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
*
Expand Down Expand Up @@ -226,7 +226,7 @@ class Locale : Service {


/**
* List Languages
* List languages
*
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
*
Expand Down

0 comments on commit c5974e0

Please sign in to comment.