Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dev #39

Merged
merged 4 commits into from
Sep 7, 2023
Merged

Dev #39

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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.2-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)
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:

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

### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-android</artifactId>
<version>3.0.1</version>
<version>4.0.0</version>
</dependency>
</dependencies>
```
1 change: 0 additions & 1 deletion docs/examples/java/teams/create-membership.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ Teams teams = new Teams(client);
teams.createMembership(
"[TEAM_ID]",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
1 change: 0 additions & 1 deletion docs/examples/kotlin/teams/create-membership.md
Original file line number Diff line number Diff line change
@@ -10,5 +10,4 @@ val teams = Teams(client)
val response = teams.createMembership(
teamId = "[TEAM_ID]",
roles = listOf(),
url = "https://example.com",
)
2 changes: 1 addition & 1 deletion library/src/main/java/io/appwrite/Client.kt
Original file line number Diff line number Diff line change
@@ -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 "3.0.1",
"x-sdk-version" to "4.0.0",
"x-appwrite-response-format" to "1.4.0"
)
config = mutableMapOf()
4 changes: 2 additions & 2 deletions library/src/main/java/io/appwrite/services/Teams.kt
Original file line number Diff line number Diff line change
@@ -315,21 +315,21 @@ 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]
*/
@JvmOverloads
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"