-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from appwrite/dev
chore: update sdks for appwrite 1.4.x
- Loading branch information
Showing
85 changed files
with
2,145 additions
and
810 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
Future result = account.deleteIdentity( | ||
identityId: '[IDENTITY_ID]', | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Account account = Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token | ||
; | ||
|
||
Future result = account.listIdentities( | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Functions functions = Functions(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = functions.downloadDeployment( | ||
functionId: '[FUNCTION_ID]', | ||
deploymentId: '[DEPLOYMENT_ID]', | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Health health = Health(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = health.getPubSub(); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Health health = Health(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = health.getQueue(); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Locale locale = Locale(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = locale.listCodes(); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Users users = Users(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = users.deleteIdentity( | ||
identityId: '[IDENTITY_ID]', | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Users users = Users(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = users.listIdentities( | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:dart_appwrite/dart_appwrite.dart'; | ||
|
||
void main() { // Init SDK | ||
Client client = Client(); | ||
Users users = Users(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key | ||
; | ||
|
||
Future result = users.updateLabels( | ||
userId: '[USER_ID]', | ||
labels: [], | ||
); | ||
|
||
result | ||
.then((response) { | ||
print(response); | ||
}).catchError((error) { | ||
print(error.response); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.