Skip to content

Commit

Permalink
Merge pull request #34 from appwrite/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
christyjacob4 authored Sep 7, 2023
2 parents c0c5bb6 + 272834a commit 75d2ad8
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

```groovy
implementation("io.appwrite:sdk-for-kotlin:3.0.1")
implementation("io.appwrite:sdk-for-kotlin:4.0.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>3.0.1</version>
<version>4.0.0</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Functions functions = new Functions(client);
functions.create(
"[FUNCTION_ID]",
"[NAME]",
"node-14.5",
"node-18.0",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 0 additions & 1 deletion docs/examples/java/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Functions functions = new Functions(client);
functions.update(
"[FUNCTION_ID]",
"[NAME]",
"node-14.5",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 0 additions & 1 deletion docs/examples/java/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Teams teams = new Teams(client);
teams.createMembership(
"[TEAM_ID]",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/kotlin/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ val functions = Functions(client)
val response = functions.create(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
runtime = "node-14.5",
runtime = "node-18.0",
)
1 change: 0 additions & 1 deletion docs/examples/kotlin/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ val functions = Functions(client)
val response = functions.update(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
runtime = "node-14.5",
)
1 change: 0 additions & 1 deletion docs/examples/kotlin/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ val teams = Teams(client)
val response = teams.createMembership(
teamId = "[TEAM_ID]",
roles = listOf(),
url = "https://example.com",
)
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 @@ -62,11 +62,11 @@ class Client @JvmOverloads constructor(
init {
headers = mutableMapOf(
"content-type" to "application/json",
"user-agent" to "AppwriteKotlinSDK/3.0.1 ${System.getProperty("http.agent")}",
"user-agent" to "AppwriteKotlinSDK/4.0.0 ${System.getProperty("http.agent")}",
"x-sdk-name" to "Kotlin",
"x-sdk-platform" to "server",
"x-sdk-language" to "kotlin",
"x-sdk-version" to "3.0.1", "x-appwrite-response-format" to "1.4.0"
"x-sdk-version" to "4.0.0", "x-appwrite-response-format" to "1.4.0"
)
config = mutableMapOf()

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/appwrite/services/Functions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class Functions : Service {
suspend fun update(
functionId: String,
name: String,
runtime: String,
runtime: String? = null,
execute: List<String>? = null,
events: List<String>? = null,
schedule: String? = null,
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/io/appwrite/services/Teams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ class Teams : Service {
*
* @param teamId Team ID.
* @param roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
* @param url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param email Email of the new team member.
* @param userId ID of the user to be added to a team.
* @param phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
* @param url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param name Name of the new team member. Max length: 128 chars.
* @return [io.appwrite.models.Membership]
*/
Expand All @@ -330,10 +330,10 @@ class Teams : Service {
suspend fun createMembership(
teamId: String,
roles: List<String>,
url: String,
email: String? = null,
userId: String? = null,
phone: String? = null,
url: String? = null,
name: String? = null,
): io.appwrite.models.Membership {
val apiPath = "/teams/{teamId}/memberships"
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/io/appwrite/services/Users.kt
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ class Users : Service {
* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](/docs/permissions) for more info.
*
* @param userId User ID.
* @param labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
* @param labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long.
* @return [io.appwrite.models.User<T>]
*/
@Throws(AppwriteException::class)
Expand Down Expand Up @@ -936,7 +936,7 @@ class Users : Service {
* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](/docs/permissions) for more info.
*
* @param userId User ID.
* @param labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
* @param labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long.
* @return [io.appwrite.models.User<T>]
*/
@Throws(AppwriteException::class)
Expand Down

0 comments on commit 75d2ad8

Please sign in to comment.