Skip to content

Commit 90ef76a

Browse files
authored
Merge pull request #10828 from appwrite/fix-enum-examples
fix: a lot of enum examples generated
2 parents 275ff3d + 20221cd commit 90ef76a

127 files changed

Lines changed: 249 additions & 153 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Avatars;
4+
import io.appwrite.enums.Theme;
5+
import io.appwrite.enums.Timezone;
6+
import io.appwrite.enums.Output;
47

58
Client client = new Client(context)
69
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,11 +17,11 @@ avatars.getScreenshot(
1417
1, // viewportWidth (optional)
1518
1, // viewportHeight (optional)
1619
0.1, // scale (optional)
17-
theme.LIGHT, // theme (optional)
20+
Theme.LIGHT, // theme (optional)
1821
"<USER_AGENT>", // userAgent (optional)
1922
false, // fullpage (optional)
2023
"<LOCALE>", // locale (optional)
21-
timezone.AFRICA_ABIDJAN, // timezone (optional)
24+
Timezone.AFRICA_ABIDJAN, // timezone (optional)
2225
-90, // latitude (optional)
2326
-180, // longitude (optional)
2427
0, // accuracy (optional)
@@ -28,7 +31,7 @@ avatars.getScreenshot(
2831
0, // width (optional)
2932
0, // height (optional)
3033
-1, // quality (optional)
31-
output.JPG, // output (optional)
34+
Output.JPG, // output (optional)
3235
new CoroutineCallback<>((result, error) -> {
3336
if (error != null) {
3437
error.printStackTrace();

docs/examples/1.8.x/client-android/java/functions/create-execution.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Functions;
4+
import io.appwrite.enums.ExecutionMethod;
45

56
Client client = new Client(context)
67
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint

docs/examples/1.8.x/client-android/java/storage/get-file-preview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Storage;
4+
import io.appwrite.enums.ImageGravity;
5+
import io.appwrite.enums.ImageFormat;
46

57
Client client = new Client(context)
68
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint

docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Avatars
4+
import io.appwrite.enums.Theme
5+
import io.appwrite.enums.Timezone
6+
import io.appwrite.enums.Output
47

58
val client = Client(context)
69
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint

docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Functions
4+
import io.appwrite.enums.ExecutionMethod
45

56
val client = Client(context)
67
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint

docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import io.appwrite.Client
22
import io.appwrite.coroutines.CoroutineCallback
33
import io.appwrite.services.Storage
4+
import io.appwrite.enums.ImageGravity
5+
import io.appwrite.enums.ImageFormat
46

57
val client = Client(context)
68
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint

docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Uint8List bytes = await avatars.getScreenshot(
1313
viewportWidth: 1, // optional
1414
viewportHeight: 1, // optional
1515
scale: 0.1, // optional
16-
theme: .light, // optional
16+
theme: Theme.light, // optional
1717
userAgent: '<USER_AGENT>', // optional
1818
fullpage: false, // optional
1919
locale: '<LOCALE>', // optional
20-
timezone: .africaAbidjan, // optional
20+
timezone: Timezone.africaAbidjan, // optional
2121
latitude: -90, // optional
2222
longitude: -180, // optional
2323
accuracy: 0, // optional
@@ -27,7 +27,7 @@ Uint8List bytes = await avatars.getScreenshot(
2727
width: 0, // optional
2828
height: 0, // optional
2929
quality: -1, // optional
30-
output: .jpg, // optional
30+
output: Output.jpg, // optional
3131
)
3232

3333
final file = File('path_to_file/filename.ext');
@@ -41,11 +41,11 @@ FutureBuilder(
4141
viewportWidth:1 , // optional
4242
viewportHeight:1 , // optional
4343
scale:0.1 , // optional
44-
theme: .light, // optional
44+
theme: Theme.light, // optional
4545
userAgent:'<USER_AGENT>' , // optional
4646
fullpage:false , // optional
4747
locale:'<LOCALE>' , // optional
48-
timezone: .africaAbidjan, // optional
48+
timezone: Timezone.africaAbidjan, // optional
4949
latitude:-90 , // optional
5050
longitude:-180 , // optional
5151
accuracy:0 , // optional
@@ -55,7 +55,7 @@ FutureBuilder(
5555
width:0 , // optional
5656
height:0 , // optional
5757
quality:-1 , // optional
58-
output: .jpg, // optional
58+
output: Output.jpg, // optional
5959
), // Works for both public file and private file, for private files you need to be logged in
6060
builder: (context, snapshot) {
6161
return snapshot.hasData && snapshot.data != null

docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, Avatars, , , } from "react-native-appwrite";
1+
import { Client, Avatars, Theme, Timezone, Output } from "react-native-appwrite";
22

33
const client = new Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -12,11 +12,11 @@ const result = avatars.getScreenshot({
1212
viewportWidth: 1, // optional
1313
viewportHeight: 1, // optional
1414
scale: 0.1, // optional
15-
theme: .Light, // optional
15+
theme: Theme.Light, // optional
1616
userAgent: '<USER_AGENT>', // optional
1717
fullpage: false, // optional
1818
locale: '<LOCALE>', // optional
19-
timezone: .AfricaAbidjan, // optional
19+
timezone: Timezone.AfricaAbidjan, // optional
2020
latitude: -90, // optional
2121
longitude: -180, // optional
2222
accuracy: 0, // optional
@@ -26,7 +26,7 @@ const result = avatars.getScreenshot({
2626
width: 0, // optional
2727
height: 0, // optional
2828
quality: -1, // optional
29-
output: .Jpg // optional
29+
output: Output.Jpg // optional
3030
});
3131

3232
console.log(result);

docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, Avatars, , , } from "appwrite";
1+
import { Client, Avatars, Theme, Timezone, Output } from "appwrite";
22

33
const client = new Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -12,11 +12,11 @@ const result = avatars.getScreenshot({
1212
viewportWidth: 1, // optional
1313
viewportHeight: 1, // optional
1414
scale: 0.1, // optional
15-
theme: .Light, // optional
15+
theme: Theme.Light, // optional
1616
userAgent: '<USER_AGENT>', // optional
1717
fullpage: false, // optional
1818
locale: '<LOCALE>', // optional
19-
timezone: .AfricaAbidjan, // optional
19+
timezone: Timezone.AfricaAbidjan, // optional
2020
latitude: -90, // optional
2121
longitude: -180, // optional
2222
accuracy: 0, // optional
@@ -26,7 +26,7 @@ const result = avatars.getScreenshot({
2626
width: 0, // optional
2727
height: 0, // optional
2828
quality: -1, // optional
29-
output: .Jpg // optional
29+
output: Output.Jpg // optional
3030
});
3131

3232
console.log(result);

0 commit comments

Comments
 (0)