Skip to content

Commit cb8bed0

Browse files
committed
Improved code quality and added support for private files
1 parent 75746a7 commit cb8bed0

27 files changed

+193
-193
lines changed

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: dart
2+
3+
dart: stable
4+
5+
os: linux
6+
7+
install:
8+
- mkdir -p ~/.pub-cache
9+
- |
10+
cat <<EOF > ~/.pub-cache/credentials.json
11+
{
12+
"accessToken":"$PUB_ACCESS_TOKEN",
13+
"refreshToken":"$PUB_REFRESH_TOKEN",
14+
"tokenEndpoint":"$PUB_TOKEN_EDNPOINT",
15+
"scopes":["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/userinfo.email"],
16+
"expiration":$PUB_EXPIRATION
17+
}
18+
19+
deploy:
20+
provider: script
21+
skip_cleanup: true
22+
script: pub publish -f
23+
on:
24+
tags: true

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.3.0
2+
3+
- Improved code quality
4+
- Added a custom Appwrite exception
5+
- Enabled access to private storage file
6+
7+
## 0.2.0
8+
9+
- Upgraded to work with Appwrite 0.7
10+
111
## 0.1.0
212

313
- First release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^0.2.0
26+
dart_appwrite: ^0.3.0
2727
```
2828
2929
You can install packages from the command line:

docs/examples/avatars/get-browser.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getBrowser(
13+
Future result = avatars.getBrowser(
1414
code: 'aa',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getCreditCard(
13+
Future result = avatars.getCreditCard(
1414
code: 'amex',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

docs/examples/avatars/get-favicon.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getFavicon(
13+
Future result = avatars.getFavicon(
1414
url: 'https://example.com',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

docs/examples/avatars/get-flag.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getFlag(
13+
Future result = avatars.getFlag(
1414
code: 'af',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

docs/examples/avatars/get-image.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getImage(
13+
Future result = avatars.getImage(
1414
url: 'https://example.com',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

docs/examples/avatars/get-initials.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getInitials(
13+
Future result = avatars.getInitials(
1414
);
1515

16-
print(result); // Resource URL string
16+
result
17+
.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
1722
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ void main() { // Init SDK
1010
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1111
;
1212

13-
String result = avatars.getQR(
13+
Future result = avatars.getQR(
1414
text: '[TEXT]',
1515
);
1616

17-
print(result); // Resource URL string
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
1823
}

0 commit comments

Comments
 (0)