Skip to content

Commit bdb4ba6

Browse files
fix: realtime event payload
1 parent 653b728 commit bdb4ba6

File tree

12 files changed

+112
-20
lines changed

12 files changed

+112
-20
lines changed

docs/examples/avatars/get-browser.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getBrowser(
13+
code: 'aa',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getBrowser(
1625
code: 'aa',

docs/examples/avatars/get-credit-card.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getCreditCard(
13+
code: 'amex',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getCreditCard(
1625
code: 'amex',

docs/examples/avatars/get-favicon.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getFavicon(
13+
url: 'https://example.com',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getFavicon(
1625
url: 'https://example.com',

docs/examples/avatars/get-flag.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getFlag(
13+
code: 'af',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getFlag(
1625
code: 'af',

docs/examples/avatars/get-image.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getImage(
13+
url: 'https://example.com',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getImage(
1625
url: 'https://example.com',

docs/examples/avatars/get-initials.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getInitials(
13+
).then((bytes) {
14+
final file = File('path_to_file/filename.ext');
15+
file.writeAsBytesSync(bytes)
16+
}).catchError((error) {
17+
print(error.response);
18+
})
1119
}
1220

13-
//displaying image
21+
//displaying image preview
1422
FutureBuilder(
1523
future: avatars.getInitials(
1624
), //works for both public file and private file, for private files you need to be logged in

docs/examples/avatars/get-q-r.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = avatars.getQR(
13+
text: '[TEXT]',
14+
).then((bytes) {
15+
final file = File('path_to_file/filename.ext');
16+
file.writeAsBytesSync(bytes)
17+
}).catchError((error) {
18+
print(error.response);
19+
})
1120
}
1221

13-
//displaying image
22+
//displaying image preview
1423
FutureBuilder(
1524
future: avatars.getQR(
1625
text: '[TEXT]',

docs/examples/storage/get-file-download.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = storage.getFileDownload(
13+
bucketId: '[BUCKET_ID]',
14+
fileId: '[FILE_ID]',
15+
).then((bytes) {
16+
final file = File('path_to_file/filename.ext');
17+
file.writeAsBytesSync(bytes)
18+
}).catchError((error) {
19+
print(error.response);
20+
})
1121
}
1222

13-
//displaying image
23+
//displaying image preview
1424
FutureBuilder(
1525
future: storage.getFileDownload(
1626
bucketId: '[BUCKET_ID]',

docs/examples/storage/get-file-preview.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = storage.getFilePreview(
13+
bucketId: '[BUCKET_ID]',
14+
fileId: '[FILE_ID]',
15+
).then((bytes) {
16+
final file = File('path_to_file/filename.ext');
17+
file.writeAsBytesSync(bytes)
18+
}).catchError((error) {
19+
print(error.response);
20+
})
1121
}
1222

13-
//displaying image
23+
//displaying image preview
1424
FutureBuilder(
1525
future: storage.getFilePreview(
1626
bucketId: '[BUCKET_ID]',

docs/examples/storage/get-file-view.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11+
// downloading file
12+
Future result = storage.getFileView(
13+
bucketId: '[BUCKET_ID]',
14+
fileId: '[FILE_ID]',
15+
).then((bytes) {
16+
final file = File('path_to_file/filename.ext');
17+
file.writeAsBytesSync(bytes)
18+
}).catchError((error) {
19+
print(error.response);
20+
})
1121
}
1222

13-
//displaying image
23+
//displaying image preview
1424
FutureBuilder(
1525
future: storage.getFileView(
1626
bucketId: '[BUCKET_ID]',

0 commit comments

Comments
 (0)