Updated dart package
This commit is contained in:
parent
074b93b644
commit
6ac886b40c
17 changed files with 416 additions and 441 deletions
|
@ -3,7 +3,7 @@
|
||||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1)
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1)
|
||||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||||
|
|
||||||
**This SDK is compatible with Appwrite server version . For older versions, please check previous releases.**
|
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||||
|
|
||||||
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add this to your package's pubspec.yaml file:
|
Add this to your package's `pubspec.yaml` file:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -23,7 +23,7 @@ dependencies:
|
||||||
You can install packages from the command line:
|
You can install packages from the command line:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pub get
|
pub get appwrite
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
export 'package:appwrite/services/account.dart';
|
export 'services/account.dart';
|
||||||
export 'package:appwrite/services/avatars.dart';
|
export 'services/avatars.dart';
|
||||||
export 'package:appwrite/services/database.dart';
|
export 'services/database.dart';
|
||||||
export 'package:appwrite/services/locale.dart';
|
export 'services/locale.dart';
|
||||||
export 'package:appwrite/services/storage.dart';
|
export 'services/storage.dart';
|
||||||
export 'package:appwrite/services/teams.dart';
|
export 'services/teams.dart';
|
||||||
export 'package:appwrite/client.dart';
|
export 'client.dart';
|
||||||
|
export 'enums.dart';
|
||||||
export 'package:dio/dio.dart' show Response;
|
export 'package:dio/dio.dart' show Response;
|
|
@ -8,78 +8,56 @@ class Client {
|
||||||
String endPoint;
|
String endPoint;
|
||||||
Map<String, String> headers;
|
Map<String, String> headers;
|
||||||
bool selfSigned;
|
bool selfSigned;
|
||||||
Dio http;
|
final Dio http;
|
||||||
|
|
||||||
Client() {
|
Client({this.endPoint: 'https://appwrite.io/v1', this.selfSigned: false, Dio http}) : this.http = http ?? Dio() {
|
||||||
this.endPoint = 'https://appwrite.io/v1';
|
|
||||||
this.headers = {
|
this.headers = {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'x-sdk-version': 'appwrite:dart:0.0.7',
|
'x-sdk-version': 'appwrite:dart:0.0.7',
|
||||||
};
|
};
|
||||||
this.selfSigned = false;
|
|
||||||
|
|
||||||
this.http = Dio();
|
assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'");
|
||||||
this.http.options.baseUrl = this.endPoint;
|
this.http.options.baseUrl = this.endPoint;
|
||||||
this.http.options.validateStatus = (status) => status != 404;
|
this.http.options.validateStatus = (status) => status != 404;
|
||||||
this.http.interceptors.add(CookieManager(CookieJar()));
|
this.http.interceptors.add(CookieManager(CookieJar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Your project ID
|
/// Your project ID
|
||||||
Client setProject(value) {
|
Client setProject(value) {
|
||||||
this.addHeader('X-Appwrite-Project', value);
|
addHeader('X-Appwrite-Project', value);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Your secret API key
|
/// Your secret API key
|
||||||
Client setKey(value) {
|
Client setKey(value) {
|
||||||
this.addHeader('X-Appwrite-Key', value);
|
addHeader('X-Appwrite-Key', value);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Client setLocale(value) {
|
Client setLocale(value) {
|
||||||
this.addHeader('X-Appwrite-Locale', value);
|
addHeader('X-Appwrite-Locale', value);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Client setMode(value) {
|
Client setMode(value) {
|
||||||
this.addHeader('X-Appwrite-Mode', value);
|
addHeader('X-Appwrite-Mode', value);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client setSelfSigned({bool status = true}) {
|
Client setSelfSigned({bool status = true}) {
|
||||||
this.selfSigned = status;
|
selfSigned = status;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client setEndpoint(String endPoint)
|
Client setEndpoint(String endPoint) {
|
||||||
{
|
|
||||||
this.endPoint = endPoint;
|
this.endPoint = endPoint;
|
||||||
this.http.options.baseUrl = this.endPoint;
|
this.http.options.baseUrl = this.endPoint;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client addHeader(String key, String value) {
|
Client addHeader(String key, String value) {
|
||||||
this.headers[key.toLowerCase()] = value.toLowerCase();
|
headers[key] = value;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) {
|
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) {
|
||||||
if(this.selfSigned) {
|
|
||||||
// Allow self signed requests
|
|
||||||
}
|
|
||||||
|
|
||||||
String reqPath = path;
|
|
||||||
bool isGet = method == HttpMethod.get;
|
|
||||||
|
|
||||||
// Origin is hardcoded for testing
|
// Origin is hardcoded for testing
|
||||||
Options options = Options(
|
Options options = Options(
|
||||||
|
@ -87,16 +65,10 @@ class Client {
|
||||||
method: method.name(),
|
method: method.name(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isGet) {
|
if (method == HttpMethod.get) {
|
||||||
path += "?";
|
return http.get(path, queryParameters: params, options: options);
|
||||||
params.forEach((k, v) {
|
} else {
|
||||||
path += "${k}=${v}&";
|
return http.request(path, data: params, options: options);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isGet)
|
|
||||||
return http.request(reqPath, data: params, options: options);
|
|
||||||
else
|
|
||||||
return http.request(reqPath, options: options);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,17 @@ enum HttpMethod {
|
||||||
get, post, put, delete, patch
|
get, post, put, delete, patch
|
||||||
}
|
}
|
||||||
|
|
||||||
extension HttpMethodString on HttpMethod{
|
extension HttpMethodString on HttpMethod {
|
||||||
|
String name(){
|
||||||
|
return this.toString().split('.').last.toUpperCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum OrderType {
|
||||||
|
asc, desc
|
||||||
|
}
|
||||||
|
|
||||||
|
extension OrderTypeString on OrderType {
|
||||||
String name(){
|
String name(){
|
||||||
return this.toString().split('.').last.toUpperCase();
|
return this.toString().split('.').last.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import 'package:appwrite/client.dart';
|
import 'client.dart';
|
||||||
|
|
||||||
class Service {
|
class Service {
|
||||||
Client client;
|
final Client client;
|
||||||
|
|
||||||
Service(Client client) {
|
const Service(this.client);
|
||||||
this.client = client;
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,24 +1,23 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Account extends Service {
|
class Account extends Service {
|
||||||
|
|
||||||
Account(Client client): super(client);
|
Account(Client client): super(client);
|
||||||
|
|
||||||
/// Get currently logged in user data as JSON object.
|
/// Get currently logged in user data as JSON object.
|
||||||
Future<Response> get() async {
|
Future<Response> get() {
|
||||||
String path = '/account';
|
final String path = '/account';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to allow a new user to register a new account in your
|
/// Use this endpoint to allow a new user to register a new account in your
|
||||||
/// project. After the user registration completes successfully, you can use
|
/// project. After the user registration completes successfully, you can use
|
||||||
|
@ -26,95 +25,95 @@ class Account extends Service {
|
||||||
/// verifying the user email address. To allow your new user to login to his
|
/// verifying the user email address. To allow your new user to login to his
|
||||||
/// new account, you need to create a new [account
|
/// new account, you need to create a new [account
|
||||||
/// session](/docs/account#createSession).
|
/// session](/docs/account#createSession).
|
||||||
Future<Response> create({@required String email, @required String password, String name = null}) async {
|
Future<Response> create({@required String email, @required String password, String name = null}) {
|
||||||
String path = '/account';
|
final String path = '/account';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'password': password,
|
'password': password,
|
||||||
'name': name,
|
'name': name,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Delete a currently logged in user account. Behind the scene, the user
|
/// Delete a currently logged in user account. Behind the scene, the user
|
||||||
/// record is not deleted but permanently blocked from any access. This is done
|
/// record is not deleted but permanently blocked from any access. This is done
|
||||||
/// to avoid deleted accounts being overtaken by new users with the same email
|
/// to avoid deleted accounts being overtaken by new users with the same email
|
||||||
/// address. Any user-related resources like documents or storage files should
|
/// address. Any user-related resources like documents or storage files should
|
||||||
/// be deleted separately.
|
/// be deleted separately.
|
||||||
Future<Response> delete() async {
|
Future<Response> delete() {
|
||||||
String path = '/account';
|
final String path = '/account';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update currently logged in user account email address. After changing user
|
/// Update currently logged in user account email address. After changing user
|
||||||
/// address, user confirmation status is being reset and a new confirmation
|
/// address, user confirmation status is being reset and a new confirmation
|
||||||
/// mail is sent. For security measures, user password is required to complete
|
/// mail is sent. For security measures, user password is required to complete
|
||||||
/// this request.
|
/// this request.
|
||||||
Future<Response> updateEmail({@required String email, @required String password}) async {
|
Future<Response> updateEmail({@required String email, @required String password}) {
|
||||||
String path = '/account/email';
|
final String path = '/account/email';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'password': password,
|
'password': password,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get currently logged in user list of latest security activity logs. Each
|
/// Get currently logged in user list of latest security activity logs. Each
|
||||||
/// log returns user IP address, location and date and time of log.
|
/// log returns user IP address, location and date and time of log.
|
||||||
Future<Response> getLogs() async {
|
Future<Response> getLogs() {
|
||||||
String path = '/account/logs';
|
final String path = '/account/logs';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update currently logged in user account name.
|
/// Update currently logged in user account name.
|
||||||
Future<Response> updateName({@required String name}) async {
|
Future<Response> updateName({@required String name}) {
|
||||||
String path = '/account/name';
|
final String path = '/account/name';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'name': name,
|
'name': name,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update currently logged in user password. For validation, user is required
|
/// Update currently logged in user password. For validation, user is required
|
||||||
/// to pass the password twice.
|
/// to pass the password twice.
|
||||||
Future<Response> updatePassword({@required String password, @required String oldPassword}) async {
|
Future<Response> updatePassword({@required String password, @required String oldPassword}) {
|
||||||
String path = '/account/password';
|
final String path = '/account/password';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'password': password,
|
'password': password,
|
||||||
'old-password': oldPassword,
|
'old-password': oldPassword,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get currently logged in user preferences as a key-value object.
|
/// Get currently logged in user preferences as a key-value object.
|
||||||
Future<Response> getPrefs() async {
|
Future<Response> getPrefs() {
|
||||||
String path = '/account/prefs';
|
final String path = '/account/prefs';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update currently logged in user account preferences. You can pass only the
|
/// Update currently logged in user account preferences. You can pass only the
|
||||||
/// specific settings you wish to update.
|
/// specific settings you wish to update.
|
||||||
Future<Response> updatePrefs({@required dynamic prefs}) async {
|
Future<Response> updatePrefs({@required dynamic prefs}) {
|
||||||
String path = '/account/prefs';
|
final String path = '/account/prefs';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'prefs': prefs,
|
'prefs': prefs,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Sends the user an email with a temporary secret key for password reset.
|
/// Sends the user an email with a temporary secret key for password reset.
|
||||||
/// When the user clicks the confirmation link he is redirected back to your
|
/// When the user clicks the confirmation link he is redirected back to your
|
||||||
|
@ -122,15 +121,15 @@ class Account extends Service {
|
||||||
/// attached to the URL query string. Use the query string params to submit a
|
/// attached to the URL query string. Use the query string params to submit a
|
||||||
/// request to the [PUT /account/recovery](/docs/account#updateRecovery)
|
/// request to the [PUT /account/recovery](/docs/account#updateRecovery)
|
||||||
/// endpoint to complete the process.
|
/// endpoint to complete the process.
|
||||||
Future<Response> createRecovery({@required String email, @required String url}) async {
|
Future<Response> createRecovery({@required String email, @required String url}) {
|
||||||
String path = '/account/recovery';
|
final String path = '/account/recovery';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'url': url,
|
'url': url,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to complete the user account password reset. Both the
|
/// Use this endpoint to complete the user account password reset. Both the
|
||||||
/// **userId** and **secret** arguments will be passed as query parameters to
|
/// **userId** and **secret** arguments will be passed as query parameters to
|
||||||
|
@ -141,74 +140,74 @@ class Account extends Service {
|
||||||
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||||
/// the only valid redirect URLs are the ones from domains you have set when
|
/// the only valid redirect URLs are the ones from domains you have set when
|
||||||
/// adding your platforms in the console interface.
|
/// adding your platforms in the console interface.
|
||||||
Future<Response> updateRecovery({@required String userId, @required String secret, @required String passwordA, @required String passwordB}) async {
|
Future<Response> updateRecovery({@required String userId, @required String secret, @required String passwordA, @required String passwordB}) {
|
||||||
String path = '/account/recovery';
|
final String path = '/account/recovery';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'userId': userId,
|
'userId': userId,
|
||||||
'secret': secret,
|
'secret': secret,
|
||||||
'password-a': passwordA,
|
'password-a': passwordA,
|
||||||
'password-b': passwordB,
|
'password-b': passwordB,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.put, path: path, params: params);
|
return this.client.call(HttpMethod.put, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get currently logged in user list of active sessions across different
|
/// Get currently logged in user list of active sessions across different
|
||||||
/// devices.
|
/// devices.
|
||||||
Future<Response> getSessions() async {
|
Future<Response> getSessions() {
|
||||||
String path = '/account/sessions';
|
final String path = '/account/sessions';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Allow the user to login into his account by providing a valid email and
|
/// Allow the user to login into his account by providing a valid email and
|
||||||
/// password combination. This route will create a new session for the user.
|
/// password combination. This route will create a new session for the user.
|
||||||
Future<Response> createSession({@required String email, @required String password}) async {
|
Future<Response> createSession({@required String email, @required String password}) {
|
||||||
String path = '/account/sessions';
|
final String path = '/account/sessions';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'password': password,
|
'password': password,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Delete all sessions from the user account and remove any sessions cookies
|
/// Delete all sessions from the user account and remove any sessions cookies
|
||||||
/// from the end client.
|
/// from the end client.
|
||||||
Future<Response> deleteSessions() async {
|
Future<Response> deleteSessions() {
|
||||||
String path = '/account/sessions';
|
final String path = '/account/sessions';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Allow the user to login to his account using the OAuth2 provider of his
|
/// Allow the user to login to his account using the OAuth2 provider of his
|
||||||
/// choice. Each OAuth2 provider should be enabled from the Appwrite console
|
/// choice. Each OAuth2 provider should be enabled from the Appwrite console
|
||||||
/// first. Use the success and failure arguments to provide a redirect URL's
|
/// first. Use the success and failure arguments to provide a redirect URL's
|
||||||
/// back to your app when login is completed.
|
/// back to your app when login is completed.
|
||||||
Future<Response> createOAuth2Session({@required String provider, @required String success, @required String failure}) async {
|
Future<Response> createOAuth2Session({@required String provider, @required String success, @required String failure}) {
|
||||||
String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider);
|
final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'success': success,
|
'success': success,
|
||||||
'failure': failure,
|
'failure': failure,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to log out the currently logged in user from all his
|
/// Use this endpoint to log out the currently logged in user from all his
|
||||||
/// account sessions across all his different devices. When using the option id
|
/// account sessions across all his different devices. When using the option id
|
||||||
/// argument, only the session unique ID provider will be deleted.
|
/// argument, only the session unique ID provider will be deleted.
|
||||||
Future<Response> deleteSession({@required String sessionId}) async {
|
Future<Response> deleteSession({@required String sessionId}) {
|
||||||
String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId);
|
final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to send a verification message to your user email address
|
/// Use this endpoint to send a verification message to your user email address
|
||||||
/// to confirm they are the valid owners of that address. Both the **userId**
|
/// to confirm they are the valid owners of that address. Both the **userId**
|
||||||
|
@ -223,27 +222,27 @@ class Account extends Service {
|
||||||
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||||
/// the only valid redirect URLs are the ones from domains you have set when
|
/// the only valid redirect URLs are the ones from domains you have set when
|
||||||
/// adding your platforms in the console interface.
|
/// adding your platforms in the console interface.
|
||||||
Future<Response> createVerification({@required String url}) async {
|
Future<Response> createVerification({@required String url}) {
|
||||||
String path = '/account/verification';
|
final String path = '/account/verification';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'url': url,
|
'url': url,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to complete the user email verification process. Use both
|
/// Use this endpoint to complete the user email verification process. Use both
|
||||||
/// the **userId** and **secret** parameters that were attached to your app URL
|
/// the **userId** and **secret** parameters that were attached to your app URL
|
||||||
/// to verify the user email ownership. If confirmed this route will return a
|
/// to verify the user email ownership. If confirmed this route will return a
|
||||||
/// 200 status code.
|
/// 200 status code.
|
||||||
Future<Response> updateVerification({@required String userId, @required String secret}) async {
|
Future<Response> updateVerification({@required String userId, @required String secret}) {
|
||||||
String path = '/account/verification';
|
final String path = '/account/verification';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'userId': userId,
|
'userId': userId,
|
||||||
'secret': secret,
|
'secret': secret,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.put, path: path, params: params);
|
return this.client.call(HttpMethod.put, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Avatars extends Service {
|
class Avatars extends Service {
|
||||||
|
|
||||||
|
@ -15,84 +14,84 @@ class Avatars extends Service {
|
||||||
/// The code argument receives the browser code as it appears in your user
|
/// The code argument receives the browser code as it appears in your user
|
||||||
/// /account/sessions endpoint. Use width, height and quality arguments to
|
/// /account/sessions endpoint. Use width, height and quality arguments to
|
||||||
/// change the output settings.
|
/// change the output settings.
|
||||||
Future<Response> getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) async {
|
Future<Response> getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) {
|
||||||
String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code);
|
final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'width': width,
|
'width': width,
|
||||||
'height': height,
|
'height': height,
|
||||||
'quality': quality,
|
'quality': quality,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Need to display your users with your billing method or their payment
|
/// Need to display your users with your billing method or their payment
|
||||||
/// methods? The credit card endpoint will return you the icon of the credit
|
/// methods? The credit card endpoint will return you the icon of the credit
|
||||||
/// card provider you need. Use width, height and quality arguments to change
|
/// card provider you need. Use width, height and quality arguments to change
|
||||||
/// the output settings.
|
/// the output settings.
|
||||||
Future<Response> getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) async {
|
Future<Response> getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) {
|
||||||
String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code);
|
final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'width': width,
|
'width': width,
|
||||||
'height': height,
|
'height': height,
|
||||||
'quality': quality,
|
'quality': quality,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote
|
/// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote
|
||||||
/// website URL.
|
/// website URL.
|
||||||
Future<Response> getFavicon({@required String url}) async {
|
Future<Response> getFavicon({@required String url}) {
|
||||||
String path = '/avatars/favicon';
|
final String path = '/avatars/favicon';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'url': url,
|
'url': url,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// You can use this endpoint to show different country flags icons to your
|
/// You can use this endpoint to show different country flags icons to your
|
||||||
/// users. The code argument receives the 2 letter country code. Use width,
|
/// users. The code argument receives the 2 letter country code. Use width,
|
||||||
/// height and quality arguments to change the output settings.
|
/// height and quality arguments to change the output settings.
|
||||||
Future<Response> getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) async {
|
Future<Response> getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) {
|
||||||
String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code);
|
final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'width': width,
|
'width': width,
|
||||||
'height': height,
|
'height': height,
|
||||||
'quality': quality,
|
'quality': quality,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to fetch a remote image URL and crop it to any image size
|
/// Use this endpoint to fetch a remote image URL and crop it to any image size
|
||||||
/// you want. This endpoint is very useful if you need to crop and display
|
/// you want. This endpoint is very useful if you need to crop and display
|
||||||
/// remote images in your app or in case you want to make sure a 3rd party
|
/// remote images in your app or in case you want to make sure a 3rd party
|
||||||
/// image is properly served using a TLS protocol.
|
/// image is properly served using a TLS protocol.
|
||||||
Future<Response> getImage({@required String url, int width = 400, int height = 400}) async {
|
Future<Response> getImage({@required String url, int width = 400, int height = 400}) {
|
||||||
String path = '/avatars/image';
|
final String path = '/avatars/image';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'url': url,
|
'url': url,
|
||||||
'width': width,
|
'width': width,
|
||||||
'height': height,
|
'height': height,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Converts a given plain text to a QR code image. You can use the query
|
/// Converts a given plain text to a QR code image. You can use the query
|
||||||
/// parameters to change the size and style of the resulting image.
|
/// parameters to change the size and style of the resulting image.
|
||||||
Future<Response> getQR({@required String text, int size = 400, int margin = 1, int download = null}) async {
|
Future<Response> getQR({@required String text, int size = 400, int margin = 1, int download = null}) {
|
||||||
String path = '/avatars/qr';
|
final String path = '/avatars/qr';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'text': text,
|
'text': text,
|
||||||
'size': size,
|
'size': size,
|
||||||
'margin': margin,
|
'margin': margin,
|
||||||
'download': download,
|
'download': download,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Database extends Service {
|
class Database extends Service {
|
||||||
|
|
||||||
|
@ -15,10 +14,10 @@ class Database extends Service {
|
||||||
/// filter your results. On admin mode, this endpoint will return a list of all
|
/// filter your results. On admin mode, this endpoint will return a list of all
|
||||||
/// of the project documents. [Learn more about different API
|
/// of the project documents. [Learn more about different API
|
||||||
/// modes](/docs/admin).
|
/// modes](/docs/admin).
|
||||||
Future<Response> listDocuments({@required String collectionId, List filters = const [], int offset = null, int limit = 50, String orderField = '\$id', String orderType = 'ASC', String orderCast = 'string', String search = null, int first = null, int last = null}) async {
|
Future<Response> listDocuments({@required String collectionId, List filters = const [], int offset = null, int limit = 50, String orderField = '\$id', String orderType = 'ASC', String orderCast = 'string', String search = null, int first = null, int last = null}) {
|
||||||
String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
|
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'filters': filters,
|
'filters': filters,
|
||||||
'offset': offset,
|
'offset': offset,
|
||||||
'limit': limit,
|
'limit': limit,
|
||||||
|
@ -30,13 +29,13 @@ class Database extends Service {
|
||||||
'last': last,
|
'last': last,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Create a new Document.
|
/// Create a new Document.
|
||||||
Future<Response> createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = null, String parentProperty = null, String parentPropertyType = 'assign'}) async {
|
Future<Response> createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = null, String parentProperty = null, String parentPropertyType = 'assign'}) {
|
||||||
String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
|
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'data': data,
|
'data': data,
|
||||||
'read': read,
|
'read': read,
|
||||||
'write': write,
|
'write': write,
|
||||||
|
@ -45,38 +44,38 @@ class Database extends Service {
|
||||||
'parentPropertyType': parentPropertyType,
|
'parentPropertyType': parentPropertyType,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get document by its unique ID. This endpoint response returns a JSON object
|
/// Get document by its unique ID. This endpoint response returns a JSON object
|
||||||
/// with the document data.
|
/// with the document data.
|
||||||
Future<Response> getDocument({@required String collectionId, @required String documentId}) async {
|
Future<Response> getDocument({@required String collectionId, @required String documentId}) {
|
||||||
String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
Future<Response> updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) async {
|
Future<Response> updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) {
|
||||||
String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'data': data,
|
'data': data,
|
||||||
'read': read,
|
'read': read,
|
||||||
'write': write,
|
'write': write,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Delete document by its unique ID. This endpoint deletes only the parent
|
/// Delete document by its unique ID. This endpoint deletes only the parent
|
||||||
/// documents, his attributes and relations to other documents. Child documents
|
/// documents, his attributes and relations to other documents. Child documents
|
||||||
/// **will not** be deleted.
|
/// **will not** be deleted.
|
||||||
Future<Response> deleteDocument({@required String collectionId, @required String documentId}) async {
|
Future<Response> deleteDocument({@required String collectionId, @required String documentId}) {
|
||||||
String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Locale extends Service {
|
class Locale extends Service {
|
||||||
|
|
||||||
|
@ -17,63 +16,63 @@ class Locale extends Service {
|
||||||
/// supported language.
|
/// supported language.
|
||||||
///
|
///
|
||||||
/// ([IP Geolocation by DB-IP](https://db-ip.com))
|
/// ([IP Geolocation by DB-IP](https://db-ip.com))
|
||||||
Future<Response> get() async {
|
Future<Response> get() {
|
||||||
String path = '/locale';
|
final String path = '/locale';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// List of all continents. You can use the locale header to get the data in a
|
/// List of all continents. You can use the locale header to get the data in a
|
||||||
/// supported language.
|
/// supported language.
|
||||||
Future<Response> getContinents() async {
|
Future<Response> getContinents() {
|
||||||
String path = '/locale/continents';
|
final String path = '/locale/continents';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// List of all countries. You can use the locale header to get the data in a
|
/// List of all countries. You can use the locale header to get the data in a
|
||||||
/// supported language.
|
/// supported language.
|
||||||
Future<Response> getCountries() async {
|
Future<Response> getCountries() {
|
||||||
String path = '/locale/countries';
|
final String path = '/locale/countries';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// List of all countries that are currently members of the EU. You can use the
|
/// List of all countries that are currently members of the EU. You can use the
|
||||||
/// locale header to get the data in a supported language.
|
/// locale header to get the data in a supported language.
|
||||||
Future<Response> getCountriesEU() async {
|
Future<Response> getCountriesEU() {
|
||||||
String path = '/locale/countries/eu';
|
final String path = '/locale/countries/eu';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// List of all countries phone codes. You can use the locale header to get the
|
/// List of all countries phone codes. You can use the locale header to get the
|
||||||
/// data in a supported language.
|
/// data in a supported language.
|
||||||
Future<Response> getCountriesPhones() async {
|
Future<Response> getCountriesPhones() {
|
||||||
String path = '/locale/countries/phones';
|
final String path = '/locale/countries/phones';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// List of all currencies, including currency symol, name, plural, and decimal
|
/// List of all currencies, including currency symol, name, plural, and decimal
|
||||||
/// digits for all major and minor currencies. You can use the locale header to
|
/// digits for all major and minor currencies. You can use the locale header to
|
||||||
/// get the data in a supported language.
|
/// get the data in a supported language.
|
||||||
Future<Response> getCurrencies() async {
|
Future<Response> getCurrencies() {
|
||||||
String path = '/locale/currencies';
|
final String path = '/locale/currencies';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Storage extends Service {
|
class Storage extends Service {
|
||||||
|
|
||||||
|
@ -14,83 +13,83 @@ class Storage extends Service {
|
||||||
/// Get a list of all the user files. You can use the query params to filter
|
/// Get a list of all the user files. You can use the query params to filter
|
||||||
/// your results. On admin mode, this endpoint will return a list of all of the
|
/// your results. On admin mode, this endpoint will return a list of all of the
|
||||||
/// project files. [Learn more about different API modes](/docs/admin).
|
/// project files. [Learn more about different API modes](/docs/admin).
|
||||||
Future<Response> listFiles({String search = null, int limit = 25, int offset = null, String orderType = 'ASC'}) async {
|
Future<Response> listFiles({String search = null, int limit = 25, int offset = null, OrderType orderType = OrderType.asc}) {
|
||||||
String path = '/storage/files';
|
final String path = '/storage/files';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'search': search,
|
'search': search,
|
||||||
'limit': limit,
|
'limit': limit,
|
||||||
'offset': offset,
|
'offset': offset,
|
||||||
'orderType': orderType,
|
'orderType': orderType.name(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Create a new file. The user who creates the file will automatically be
|
/// Create a new file. The user who creates the file will automatically be
|
||||||
/// assigned to read and write access unless he has passed custom values for
|
/// assigned to read and write access unless he has passed custom values for
|
||||||
/// read and write arguments.
|
/// read and write arguments.
|
||||||
Future<Response> createFile({@required File file, @required List read, @required List write}) async {
|
Future<Response> createFile({@required file, @required List read, @required List write}) {
|
||||||
String path = '/storage/files';
|
final String path = '/storage/files';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'file': file,
|
'file': file,
|
||||||
'read': read,
|
'read': read,
|
||||||
'write': write,
|
'write': write,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get file by its unique ID. This endpoint response returns a JSON object
|
/// Get file by its unique ID. This endpoint response returns a JSON object
|
||||||
/// with the file metadata.
|
/// with the file metadata.
|
||||||
Future<Response> getFile({@required String fileId}) async {
|
Future<Response> getFile({@required String fileId}) {
|
||||||
String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update file by its unique ID. Only users with write permissions have access
|
/// Update file by its unique ID. Only users with write permissions have access
|
||||||
/// to update this resource.
|
/// to update this resource.
|
||||||
Future<Response> updateFile({@required String fileId, @required List read, @required List write}) async {
|
Future<Response> updateFile({@required String fileId, @required List read, @required List write}) {
|
||||||
String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'read': read,
|
'read': read,
|
||||||
'write': write,
|
'write': write,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.put, path: path, params: params);
|
return this.client.call(HttpMethod.put, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Delete a file by its unique ID. Only users with write permissions have
|
/// Delete a file by its unique ID. Only users with write permissions have
|
||||||
/// access to delete this resource.
|
/// access to delete this resource.
|
||||||
Future<Response> deleteFile({@required String fileId}) async {
|
Future<Response> deleteFile({@required String fileId}) {
|
||||||
String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get file content by its unique ID. The endpoint response return with a
|
/// Get file content by its unique ID. The endpoint response return with a
|
||||||
/// 'Content-Disposition: attachment' header that tells the browser to start
|
/// 'Content-Disposition: attachment' header that tells the browser to start
|
||||||
/// downloading the file to user downloads directory.
|
/// downloading the file to user downloads directory.
|
||||||
Future<Response> getFileDownload({@required String fileId}) async {
|
Future<Response> getFileDownload({@required String fileId}) {
|
||||||
String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get a file preview image. Currently, this method supports preview for image
|
/// Get a file preview image. Currently, this method supports preview for image
|
||||||
/// files (jpg, png, and gif), other supported formats, like pdf, docs, slides,
|
/// files (jpg, png, and gif), other supported formats, like pdf, docs, slides,
|
||||||
/// and spreadsheets, will return the file icon image. You can also pass query
|
/// and spreadsheets, will return the file icon image. You can also pass query
|
||||||
/// string arguments for cutting and resizing your preview image.
|
/// string arguments for cutting and resizing your preview image.
|
||||||
Future<Response> getFilePreview({@required String fileId, int width = null, int height = null, int quality = 100, String background = null, String output = null}) async {
|
Future<Response> getFilePreview({@required String fileId, int width = null, int height = null, int quality = 100, String background = null, String output = null}) {
|
||||||
String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'width': width,
|
'width': width,
|
||||||
'height': height,
|
'height': height,
|
||||||
'quality': quality,
|
'quality': quality,
|
||||||
|
@ -98,17 +97,17 @@ class Storage extends Service {
|
||||||
'output': output,
|
'output': output,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get file content by its unique ID. This endpoint is similar to the download
|
/// Get file content by its unique ID. This endpoint is similar to the download
|
||||||
/// method but returns with no 'Content-Disposition: attachment' header.
|
/// method but returns with no 'Content-Disposition: attachment' header.
|
||||||
Future<Response> getFileView({@required String fileId, String as = null}) async {
|
Future<Response> getFileView({@required String fileId, String as = null}) {
|
||||||
String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId);
|
final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'as': as,
|
'as': as,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,10 @@
|
||||||
import 'dart:html';
|
|
||||||
|
|
||||||
import "package:appwrite/service.dart";
|
|
||||||
import "package:appwrite/client.dart";
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import "../client.dart";
|
||||||
import '../enums.dart';
|
import '../enums.dart';
|
||||||
|
import "../service.dart";
|
||||||
|
|
||||||
class Teams extends Service {
|
class Teams extends Service {
|
||||||
|
|
||||||
|
@ -14,72 +13,72 @@ class Teams extends Service {
|
||||||
/// Get a list of all the current user teams. You can use the query params to
|
/// Get a list of all the current user teams. You can use the query params to
|
||||||
/// filter your results. On admin mode, this endpoint will return a list of all
|
/// filter your results. On admin mode, this endpoint will return a list of all
|
||||||
/// of the project teams. [Learn more about different API modes](/docs/admin).
|
/// of the project teams. [Learn more about different API modes](/docs/admin).
|
||||||
Future<Response> list({String search = null, int limit = 25, int offset = null, String orderType = 'ASC'}) async {
|
Future<Response> list({String search = null, int limit = 25, int offset = null, OrderType orderType = OrderType.asc}) {
|
||||||
String path = '/teams';
|
final String path = '/teams';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'search': search,
|
'search': search,
|
||||||
'limit': limit,
|
'limit': limit,
|
||||||
'offset': offset,
|
'offset': offset,
|
||||||
'orderType': orderType,
|
'orderType': orderType.name(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Create a new team. The user who creates the team will automatically be
|
/// Create a new team. The user who creates the team will automatically be
|
||||||
/// assigned as the owner of the team. The team owner can invite new members,
|
/// assigned as the owner of the team. The team owner can invite new members,
|
||||||
/// who will be able add new owners and update or delete the team from your
|
/// who will be able add new owners and update or delete the team from your
|
||||||
/// project.
|
/// project.
|
||||||
Future<Response> create({@required String name, List roles = const ["owner"]}) async {
|
Future<Response> create({@required String name, List roles = const ["owner"]}) {
|
||||||
String path = '/teams';
|
final String path = '/teams';
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'roles': roles,
|
'roles': roles,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get team by its unique ID. All team members have read access for this
|
/// Get team by its unique ID. All team members have read access for this
|
||||||
/// resource.
|
/// resource.
|
||||||
Future<Response> get({@required String teamId}) async {
|
Future<Response> get({@required String teamId}) {
|
||||||
String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Update team by its unique ID. Only team owners have write access for this
|
/// Update team by its unique ID. Only team owners have write access for this
|
||||||
/// resource.
|
/// resource.
|
||||||
Future<Response> update({@required String teamId, @required String name}) async {
|
Future<Response> update({@required String teamId, @required String name}) {
|
||||||
String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'name': name,
|
'name': name,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.put, path: path, params: params);
|
return this.client.call(HttpMethod.put, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Delete team by its unique ID. Only team owners have write access for this
|
/// Delete team by its unique ID. Only team owners have write access for this
|
||||||
/// resource.
|
/// resource.
|
||||||
Future<Response> delete({@required String teamId}) async {
|
Future<Response> delete({@required String teamId}) {
|
||||||
String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Get team members by the team unique ID. All team members have read access
|
/// Get team members by the team unique ID. All team members have read access
|
||||||
/// for this list of resources.
|
/// for this list of resources.
|
||||||
Future<Response> getMemberships({@required String teamId}) async {
|
Future<Response> getMemberships({@required String teamId}) {
|
||||||
String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
|
final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.get, path: path, params: params);
|
return this.client.call(HttpMethod.get, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to invite a new member to join your team. An email with a
|
/// Use this endpoint to invite a new member to join your team. An email with a
|
||||||
/// link to join the team will be sent to the new member email address if the
|
/// link to join the team will be sent to the new member email address if the
|
||||||
|
@ -94,40 +93,40 @@ class Teams extends Service {
|
||||||
/// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
/// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||||
/// the only valid redirect URL's are the once from domains you have set when
|
/// the only valid redirect URL's are the once from domains you have set when
|
||||||
/// added your platforms in the console interface.
|
/// added your platforms in the console interface.
|
||||||
Future<Response> createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = null}) async {
|
Future<Response> createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = null}) {
|
||||||
String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
|
final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'email': email,
|
'email': email,
|
||||||
'name': name,
|
'name': name,
|
||||||
'roles': roles,
|
'roles': roles,
|
||||||
'url': url,
|
'url': url,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.post, path: path, params: params);
|
return this.client.call(HttpMethod.post, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// This endpoint allows a user to leave a team or for a team owner to delete
|
/// This endpoint allows a user to leave a team or for a team owner to delete
|
||||||
/// the membership of any other team member. You can also use this endpoint to
|
/// the membership of any other team member. You can also use this endpoint to
|
||||||
/// delete a user membership even if he didn't accept it.
|
/// delete a user membership even if he didn't accept it.
|
||||||
Future<Response> deleteMembership({@required String teamId, @required String inviteId}) async {
|
Future<Response> deleteMembership({@required String teamId, @required String inviteId}) {
|
||||||
String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId);
|
final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.delete, path: path, params: params);
|
return this.client.call(HttpMethod.delete, path: path, params: params);
|
||||||
}
|
}
|
||||||
/// Use this endpoint to allow a user to accept an invitation to join a team
|
/// Use this endpoint to allow a user to accept an invitation to join a team
|
||||||
/// after he is being redirected back to your app from the invitation email he
|
/// after he is being redirected back to your app from the invitation email he
|
||||||
/// was sent.
|
/// was sent.
|
||||||
Future<Response> updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) async {
|
Future<Response> updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) {
|
||||||
String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId);
|
final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId);
|
||||||
|
|
||||||
Map<String, dynamic> params = {
|
final Map<String, dynamic> params = {
|
||||||
'userId': userId,
|
'userId': userId,
|
||||||
'secret': secret,
|
'secret': secret,
|
||||||
};
|
};
|
||||||
|
|
||||||
return await this.client.call(HttpMethod.patch, path: path, params: params);
|
return this.client.call(HttpMethod.patch, path: path, params: params);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1)
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1)
|
||||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||||
|
|
||||||
**This SDK is compatible with Appwrite server version . For older versions, please check previous releases.**
|
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||||
|
|
||||||
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1)
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1)
|
||||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||||
|
|
||||||
**This SDK is compatible with Appwrite server version . For older versions, please check previous releases.**
|
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||||
|
|
||||||
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
|
||||||
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
|
||||||
|
|
||||||
**This SDK is compatible with Appwrite server version . For older versions, please check previous releases.**
|
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||||
|
|
||||||
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ $warning = '**This SDK is compatible with Appwrite server version ' . $version .
|
||||||
|
|
||||||
$cli
|
$cli
|
||||||
->task('generate')
|
->task('generate')
|
||||||
->action(function () use ($warning) {
|
->action(function () use ($warning, $version) {
|
||||||
function getSSLPage($url)
|
function getSSLPage($url)
|
||||||
{
|
{
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
@ -60,7 +60,7 @@ $cli
|
||||||
$target = realpath(__DIR__.'/..').'/sdks/git/'.$language['key'].'/';
|
$target = realpath(__DIR__.'/..').'/sdks/git/'.$language['key'].'/';
|
||||||
$readme = realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'.md');
|
$readme = realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'.md');
|
||||||
$readme = ($readme) ? file_get_contents($readme) : '';
|
$readme = ($readme) ? file_get_contents($readme) : '';
|
||||||
$warning = ($language['beta']) ? '**This SDK is compatible with Appwrite server version ' . Config::getParam('version') . '. For older versions, please check previous releases.**' : '';
|
$warning = ($language['beta']) ? '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**' : '';
|
||||||
$license = 'BSD-3-Clause';
|
$license = 'BSD-3-Clause';
|
||||||
$licenseContent = 'Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
|
$licenseContent = 'Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
12
composer.lock
generated
12
composer.lock
generated
|
@ -1622,7 +1622,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator",
|
"url": "https://github.com/appwrite/sdk-generator",
|
||||||
"reference": "97cb12c9c187a42a545060c324b0960c99582893"
|
"reference": "fd595168b90b777834aedf9760f484096b386860"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
@ -1652,7 +1652,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"time": "2020-03-27T15:12:28+00:00"
|
"time": "2020-04-05T12:21:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
|
@ -3252,12 +3252,12 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "6df2e2c3181e6d0b961fc341fbe8269fefc933c6"
|
"reference": "e3ff236877694af42d51506dd7476a224fb829fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/6df2e2c3181e6d0b961fc341fbe8269fefc933c6",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e3ff236877694af42d51506dd7476a224fb829fb",
|
||||||
"reference": "6df2e2c3181e6d0b961fc341fbe8269fefc933c6",
|
"reference": "e3ff236877694af42d51506dd7476a224fb829fb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3309,7 +3309,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"time": "2020-03-27T16:41:01+00:00"
|
"time": "2020-03-31T06:42:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webmozart/assert",
|
"name": "webmozart/assert",
|
||||||
|
|
Loading…
Reference in a new issue