Skip to content

Commit 96d23be

Browse files
authored
Merge pull request #31 from appwrite/dev
Fix oauth2 issues
2 parents 32e2c6e + 57c57b4 commit 96d23be

File tree

12 files changed

+141
-130
lines changed

12 files changed

+141
-130
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.2.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.2.1-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -38,7 +38,7 @@ repositories {
3838
Next, add the dependency to your project's `build.gradle(.kts)` file:
3939

4040
```groovy
41-
implementation("io.appwrite:sdk-for-android:1.2.0")
41+
implementation("io.appwrite:sdk-for-android:1.2.1")
4242
```
4343

4444
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949
<dependency>
5050
<groupId>io.appwrite</groupId>
5151
<artifactId>sdk-for-android</artifactId>
52-
<version>1.2.0</version>
52+
<version>1.2.1</version>
5353
</dependency>
5454
</dependencies>
5555
```

library/src/main/java/io/appwrite/Client.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Client @JvmOverloads constructor(
8888
"x-sdk-name" to "Android",
8989
"x-sdk-platform" to "client",
9090
"x-sdk-language" to "android",
91-
"x-sdk-version" to "1.2.0",
91+
"x-sdk-version" to "1.2.1",
9292
"x-appwrite-response-format" to "1.0.0"
9393
)
9494
config = mutableMapOf()

library/src/main/java/io/appwrite/models/Locale.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ data class Locale(
3838
val continent: String,
3939

4040
/**
41-
* True if country is part of the Europian Union.
41+
* True if country is part of the European Union.
4242
*/
4343
@SerializedName("eu")
4444
val eu: Boolean,

library/src/main/java/io/appwrite/services/Account.kt

Lines changed: 57 additions & 56 deletions
Large diffs are not rendered by default.

library/src/main/java/io/appwrite/services/Avatars.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class Avatars : Service {
4242
"width" to width,
4343
"height" to height,
4444
"quality" to quality,
45+
"project" to client.config["project"],
4546
)
4647
return client.call(
4748
"GET",
@@ -77,6 +78,7 @@ class Avatars : Service {
7778
"width" to width,
7879
"height" to height,
7980
"quality" to quality,
81+
"project" to client.config["project"],
8082
)
8183
return client.call(
8284
"GET",
@@ -102,6 +104,7 @@ class Avatars : Service {
102104

103105
val params = mutableMapOf<String, Any?>(
104106
"url" to url,
107+
"project" to client.config["project"],
105108
)
106109
return client.call(
107110
"GET",
@@ -137,6 +140,7 @@ class Avatars : Service {
137140
"width" to width,
138141
"height" to height,
139142
"quality" to quality,
143+
"project" to client.config["project"],
140144
)
141145
return client.call(
142146
"GET",
@@ -169,6 +173,7 @@ class Avatars : Service {
169173
"url" to url,
170174
"width" to width,
171175
"height" to height,
176+
"project" to client.config["project"],
172177
)
173178
return client.call(
174179
"GET",
@@ -204,6 +209,7 @@ class Avatars : Service {
204209
"width" to width,
205210
"height" to height,
206211
"background" to background,
212+
"project" to client.config["project"],
207213
)
208214
return client.call(
209215
"GET",
@@ -239,6 +245,7 @@ class Avatars : Service {
239245
"size" to size,
240246
"margin" to margin,
241247
"download" to download,
248+
"project" to client.config["project"],
242249
)
243250
return client.call(
244251
"GET",

library/src/main/java/io/appwrite/services/Databases.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class Databases : Service {
4343
"content-type" to "application/json",
4444
)
4545
val converter: (Any) -> io.appwrite.models.DocumentList<T> = {
46-
io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType)
47-
}
46+
io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType)
47+
}
4848
return client.call(
4949
"GET",
5050
path,
@@ -85,9 +85,9 @@ class Databases : Service {
8585
*
8686
* @param databaseId Database ID.
8787
* @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.
88-
* @param documentId Document ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. 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.
88+
* @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.
8989
* @param data Document data as JSON object.
90-
* @param permissions An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](/docs/permissions).
90+
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
9191
* @return [io.appwrite.models.Document<T>]
9292
*/
9393
@JvmOverloads
@@ -112,8 +112,8 @@ class Databases : Service {
112112
"content-type" to "application/json",
113113
)
114114
val converter: (Any) -> io.appwrite.models.Document<T> = {
115-
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
116-
}
115+
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
116+
}
117117
return client.call(
118118
"POST",
119119
path,
@@ -131,9 +131,9 @@ class Databases : Service {
131131
*
132132
* @param databaseId Database ID.
133133
* @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.
134-
* @param documentId Document ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. 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.
134+
* @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.
135135
* @param data Document data as JSON object.
136-
* @param permissions An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](/docs/permissions).
136+
* @param permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
137137
* @return [io.appwrite.models.Document<T>]
138138
*/
139139
@JvmOverloads
@@ -180,8 +180,8 @@ class Databases : Service {
180180
"content-type" to "application/json",
181181
)
182182
val converter: (Any) -> io.appwrite.models.Document<T> = {
183-
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
184-
}
183+
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
184+
}
185185
return client.call(
186186
"GET",
187187
path,
@@ -223,7 +223,7 @@ class Databases : Service {
223223
* @param collectionId Collection ID.
224224
* @param documentId Document ID.
225225
* @param data Document data as JSON object. Include only attribute and value pairs to be updated.
226-
* @param permissions An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](/docs/permissions).
226+
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
227227
* @return [io.appwrite.models.Document<T>]
228228
*/
229229
@JvmOverloads
@@ -248,8 +248,8 @@ class Databases : Service {
248248
"content-type" to "application/json",
249249
)
250250
val converter: (Any) -> io.appwrite.models.Document<T> = {
251-
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
252-
}
251+
io.appwrite.models.Document.from(map = it as Map<String, Any>, nestedType)
252+
}
253253
return client.call(
254254
"PATCH",
255255
path,
@@ -269,7 +269,7 @@ class Databases : Service {
269269
* @param collectionId Collection ID.
270270
* @param documentId Document ID.
271271
* @param data Document data as JSON object. Include only attribute and value pairs to be updated.
272-
* @param permissions An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](/docs/permissions).
272+
* @param permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
273273
* @return [io.appwrite.models.Document<T>]
274274
*/
275275
@JvmOverloads

library/src/main/java/io/appwrite/services/Functions.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class Functions : Service {
4242
"content-type" to "application/json",
4343
)
4444
val converter: (Any) -> io.appwrite.models.ExecutionList = {
45-
io.appwrite.models.ExecutionList.from(map = it as Map<String, Any>)
46-
}
45+
io.appwrite.models.ExecutionList.from(map = it as Map<String, Any>)
46+
}
4747
return client.call(
4848
"GET",
4949
path,
@@ -82,8 +82,8 @@ class Functions : Service {
8282
"content-type" to "application/json",
8383
)
8484
val converter: (Any) -> io.appwrite.models.Execution = {
85-
io.appwrite.models.Execution.from(map = it as Map<String, Any>)
86-
}
85+
io.appwrite.models.Execution.from(map = it as Map<String, Any>)
86+
}
8787
return client.call(
8888
"POST",
8989
path,
@@ -118,8 +118,8 @@ class Functions : Service {
118118
"content-type" to "application/json",
119119
)
120120
val converter: (Any) -> io.appwrite.models.Execution = {
121-
io.appwrite.models.Execution.from(map = it as Map<String, Any>)
122-
}
121+
io.appwrite.models.Execution.from(map = it as Map<String, Any>)
122+
}
123123
return client.call(
124124
"GET",
125125
path,

library/src/main/java/io/appwrite/services/Graphql.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class Graphql : Service {
3636
"content-type" to "application/json",
3737
)
3838
val converter: (Any) -> Any = {
39-
it
40-
}
39+
it
40+
}
4141
return client.call(
4242
"POST",
4343
path,
@@ -70,8 +70,8 @@ class Graphql : Service {
7070
"content-type" to "application/json",
7171
)
7272
val converter: (Any) -> Any = {
73-
it
74-
}
73+
it
74+
}
7575
return client.call(
7676
"POST",
7777
path,

library/src/main/java/io/appwrite/services/Locale.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class Locale : Service {
3232
"content-type" to "application/json",
3333
)
3434
val converter: (Any) -> io.appwrite.models.Locale = {
35-
io.appwrite.models.Locale.from(map = it as Map<String, Any>)
36-
}
35+
io.appwrite.models.Locale.from(map = it as Map<String, Any>)
36+
}
3737
return client.call(
3838
"GET",
3939
path,
@@ -62,8 +62,8 @@ class Locale : Service {
6262
"content-type" to "application/json",
6363
)
6464
val converter: (Any) -> io.appwrite.models.ContinentList = {
65-
io.appwrite.models.ContinentList.from(map = it as Map<String, Any>)
66-
}
65+
io.appwrite.models.ContinentList.from(map = it as Map<String, Any>)
66+
}
6767
return client.call(
6868
"GET",
6969
path,
@@ -92,8 +92,8 @@ class Locale : Service {
9292
"content-type" to "application/json",
9393
)
9494
val converter: (Any) -> io.appwrite.models.CountryList = {
95-
io.appwrite.models.CountryList.from(map = it as Map<String, Any>)
96-
}
95+
io.appwrite.models.CountryList.from(map = it as Map<String, Any>)
96+
}
9797
return client.call(
9898
"GET",
9999
path,
@@ -122,8 +122,8 @@ class Locale : Service {
122122
"content-type" to "application/json",
123123
)
124124
val converter: (Any) -> io.appwrite.models.CountryList = {
125-
io.appwrite.models.CountryList.from(map = it as Map<String, Any>)
126-
}
125+
io.appwrite.models.CountryList.from(map = it as Map<String, Any>)
126+
}
127127
return client.call(
128128
"GET",
129129
path,
@@ -152,8 +152,8 @@ class Locale : Service {
152152
"content-type" to "application/json",
153153
)
154154
val converter: (Any) -> io.appwrite.models.PhoneList = {
155-
io.appwrite.models.PhoneList.from(map = it as Map<String, Any>)
156-
}
155+
io.appwrite.models.PhoneList.from(map = it as Map<String, Any>)
156+
}
157157
return client.call(
158158
"GET",
159159
path,
@@ -182,8 +182,8 @@ class Locale : Service {
182182
"content-type" to "application/json",
183183
)
184184
val converter: (Any) -> io.appwrite.models.CurrencyList = {
185-
io.appwrite.models.CurrencyList.from(map = it as Map<String, Any>)
186-
}
185+
io.appwrite.models.CurrencyList.from(map = it as Map<String, Any>)
186+
}
187187
return client.call(
188188
"GET",
189189
path,
@@ -212,8 +212,8 @@ class Locale : Service {
212212
"content-type" to "application/json",
213213
)
214214
val converter: (Any) -> io.appwrite.models.LanguageList = {
215-
io.appwrite.models.LanguageList.from(map = it as Map<String, Any>)
216-
}
215+
io.appwrite.models.LanguageList.from(map = it as Map<String, Any>)
216+
}
217217
return client.call(
218218
"GET",
219219
path,

0 commit comments

Comments
 (0)