1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Updated SDKs

This commit is contained in:
Eldad Fux 2020-04-06 07:55:38 +03:00
parent c4c6dbbda0
commit cb7c05063e
30 changed files with 145 additions and 114 deletions

View file

@ -130,7 +130,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '0.0.8',
'version' => '0.0.10',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'enabled' => true,
'beta' => true,

View file

@ -3,7 +3,9 @@
![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the JS SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
![Appwrite](https://appwrite.io/images/github.png)

View file

@ -1,7 +1,9 @@
{
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"description": "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)",
"description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the JS SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "1.0.0",
"license": "BSD-3-Clause",
"main": "src/sdk.js",

View file

@ -1,3 +1,7 @@
## 0.0.9
- Updated deafult params
## 0.0.8
- Fixed compilation error in Client class

View file

@ -1,11 +1,14 @@
# Appwrite SDK for Dart
[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite)
![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)
**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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
@ -17,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^0.0.8
appwrite: ^0.0.9
```
You can install packages from the command line:

View file

@ -1,9 +1,10 @@
export 'package:dio/dio.dart' show Response;
export 'client.dart';
export 'enums.dart';
export 'services/account.dart';
export 'services/avatars.dart';
export 'services/database.dart';
export 'services/locale.dart';
export 'services/storage.dart';
export 'services/teams.dart';
export 'client.dart';
export 'enums.dart';
export 'package:dio/dio.dart' show Response;

View file

@ -1,9 +1,9 @@
import 'dart:io';
import 'package:cookie_jar/cookie_jar.dart';
import 'package:dio/adapter.dart';
import 'package:dio/dio.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:cookie_jar/cookie_jar.dart';
import 'enums.dart';
@ -13,10 +13,10 @@ class Client {
bool selfSigned;
final Dio http;
Client({this.endPoint: 'https://appwrite.io/v1', this.selfSigned: false, Dio http}) : this.http = http ?? Dio() {
Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() {
this.headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:dart:0.0.8',
'x-sdk-version': 'appwrite:dart:0.0.9',
};
assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'");
@ -61,7 +61,7 @@ class Client {
}
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) {
if(this.selfSigned) {
if(selfSigned) {
// Allow self signed requests
(http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) {
client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;

View file

@ -1,19 +1,15 @@
enum HttpMethod {
get, post, put, delete, patch
}
enum HttpMethod { get, post, put, delete, patch }
extension HttpMethodString on HttpMethod {
String name(){
return this.toString().split('.').last.toUpperCase();
}
String name() {
return this.toString().split('.').last.toUpperCase();
}
}
enum OrderType {
asc, desc
}
enum OrderType { asc, desc }
extension OrderTypeString on OrderType {
String name(){
return this.toString().split('.').last.toUpperCase();
}
String name() {
return this.toString().split('.').last.toUpperCase();
}
}

View file

@ -1,7 +1,7 @@
import 'client.dart';
class Service {
final Client client;
final Client client;
const Service(this.client);
}
const Service(this.client);
}

View file

@ -7,7 +7,6 @@ import '../enums.dart';
import "../service.dart";
class Account extends Service {
Account(Client client): super(client);
/// Get currently logged in user data as JSON object.
@ -17,7 +16,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -25,7 +24,7 @@ class Account extends Service {
/// verifying the user email address. To allow your new user to login to his
/// new account, you need to create a new [account
/// session](/docs/account#createSession).
Future<Response> create({@required String email, @required String password, String name = null}) {
Future<Response> create({@required String email, @required String password, String name = ''}) {
final String path = '/account';
final Map<String, dynamic> params = {
@ -34,7 +33,7 @@ class Account extends Service {
'name': name,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// 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
@ -47,7 +46,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// Update currently logged in user account email address. After changing user
/// address, user confirmation status is being reset and a new confirmation
@ -61,7 +60,7 @@ class Account extends Service {
'password': password,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
/// Get currently logged in user list of latest security activity logs. Each
/// log returns user IP address, location and date and time of log.
@ -71,7 +70,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Update currently logged in user account name.
Future<Response> updateName({@required String name}) {
@ -81,7 +80,7 @@ class Account extends Service {
'name': name,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
/// Update currently logged in user password. For validation, user is required
/// to pass the password twice.
@ -93,7 +92,7 @@ class Account extends Service {
'old-password': oldPassword,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
/// Get currently logged in user preferences as a key-value object.
Future<Response> getPrefs() {
@ -102,7 +101,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Update currently logged in user account preferences. You can pass only the
/// specific settings you wish to update.
@ -113,7 +112,7 @@ class Account extends Service {
'prefs': prefs,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
/// 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
@ -129,7 +128,7 @@ class Account extends Service {
'url': url,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Use this endpoint to complete the user account password reset. Both the
/// **userId** and **secret** arguments will be passed as query parameters to
@ -150,7 +149,7 @@ class Account extends Service {
'password-b': passwordB,
};
return this.client.call(HttpMethod.put, path: path, params: params);
return client.call(HttpMethod.put, path: path, params: params);
}
/// Get currently logged in user list of active sessions across different
/// devices.
@ -160,7 +159,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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.
@ -172,7 +171,7 @@ class Account extends Service {
'password': password,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Delete all sessions from the user account and remove any sessions cookies
/// from the end client.
@ -182,7 +181,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// 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
@ -196,7 +195,7 @@ class Account extends Service {
'failure': failure,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -207,7 +206,7 @@ class Account extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// 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**
@ -229,7 +228,7 @@ class Account extends Service {
'url': url,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Use this endpoint to complete the user email verification process. Use both
/// the **userId** and **secret** parameters that were attached to your app URL
@ -243,6 +242,6 @@ class Account extends Service {
'secret': secret,
};
return this.client.call(HttpMethod.put, path: path, params: params);
return client.call(HttpMethod.put, path: path, params: params);
}
}

View file

@ -7,7 +7,6 @@ import '../enums.dart';
import "../service.dart";
class Avatars extends Service {
Avatars(Client client): super(client);
/// You can use this endpoint to show different browser icons to your users.
@ -23,7 +22,7 @@ class Avatars extends Service {
'quality': quality,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -38,7 +37,7 @@ class Avatars extends Service {
'quality': quality,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote
/// website URL.
@ -49,7 +48,7 @@ class Avatars extends Service {
'url': url,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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,
@ -63,7 +62,7 @@ class Avatars extends Service {
'quality': quality,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -78,11 +77,11 @@ class Avatars extends Service {
'height': height,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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.
Future<Response> getQR({@required String text, int size = 400, int margin = 1, int download = null}) {
Future<Response> getQR({@required String text, int size = 400, int margin = 1, int download = 0}) {
final String path = '/avatars/qr';
final Map<String, dynamic> params = {
@ -92,6 +91,6 @@ class Avatars extends Service {
'download': download,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
}

View file

@ -7,14 +7,13 @@ import '../enums.dart';
import "../service.dart";
class Database extends Service {
Database(Client client): super(client);
/// Get a list of all the user documents. You can use the query params to
/// filter your results. On admin mode, this endpoint will return a list of all
/// of the project documents. [Learn more about different API
/// 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}) {
Future<Response> listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', String orderType = 'ASC', String orderCast = 'string', String search = '', int first = 0, int last = 0}) {
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
final Map<String, dynamic> params = {
@ -29,10 +28,10 @@ class Database extends Service {
'last': last,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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'}) {
Future<Response> createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) {
final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId);
final Map<String, dynamic> params = {
@ -44,7 +43,7 @@ class Database extends Service {
'parentPropertyType': parentPropertyType,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Get document by its unique ID. This endpoint response returns a JSON object
/// with the document data.
@ -54,7 +53,7 @@ class Database extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return 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}) {
final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId);
@ -65,7 +64,7 @@ class Database extends Service {
'write': write,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
/// Delete document by its unique ID. This endpoint deletes only the parent
/// documents, his attributes and relations to other documents. Child documents
@ -76,6 +75,6 @@ class Database extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
}

View file

@ -7,7 +7,6 @@ import '../enums.dart';
import "../service.dart";
class Locale extends Service {
Locale(Client client): super(client);
/// Get the current user location based on IP. Returns an object with user
@ -22,7 +21,7 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// List of all continents. You can use the locale header to get the data in a
/// supported language.
@ -32,7 +31,7 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// List of all countries. You can use the locale header to get the data in a
/// supported language.
@ -42,7 +41,7 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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.
@ -52,7 +51,7 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// List of all countries phone codes. You can use the locale header to get the
/// data in a supported language.
@ -62,7 +61,7 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -73,6 +72,6 @@ class Locale extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
}

View file

@ -7,13 +7,12 @@ import '../enums.dart';
import "../service.dart";
class Storage extends Service {
Storage(Client client): super(client);
/// 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
/// project files. [Learn more about different API modes](/docs/admin).
Future<Response> listFiles({String search = null, int limit = 25, int offset = null, OrderType orderType = OrderType.asc}) {
Future<Response> listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) {
final String path = '/storage/files';
final Map<String, dynamic> params = {
@ -23,7 +22,7 @@ class Storage extends Service {
'orderType': orderType.name(),
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -37,7 +36,7 @@ class Storage extends Service {
'write': write,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Get file by its unique ID. This endpoint response returns a JSON object
/// with the file metadata.
@ -47,7 +46,7 @@ class Storage extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Update file by its unique ID. Only users with write permissions have access
/// to update this resource.
@ -59,7 +58,7 @@ class Storage extends Service {
'write': write,
};
return this.client.call(HttpMethod.put, path: path, params: params);
return client.call(HttpMethod.put, path: path, params: params);
}
/// Delete a file by its unique ID. Only users with write permissions have
/// access to delete this resource.
@ -69,7 +68,7 @@ class Storage extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// Get file content by its unique ID. The endpoint response return with a
/// 'Content-Disposition: attachment' header that tells the browser to start
@ -80,13 +79,13 @@ class Storage extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Get a file preview image. Currently, this method supports preview for image
/// 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
/// 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}) {
Future<Response> getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) {
final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId);
final Map<String, dynamic> params = {
@ -97,17 +96,17 @@ class Storage extends Service {
'output': output,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Get file content by its unique ID. This endpoint is similar to the download
/// method but returns with no 'Content-Disposition: attachment' header.
Future<Response> getFileView({@required String fileId, String as = null}) {
Future<Response> getFileView({@required String fileId, String as = ''}) {
final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId);
final Map<String, dynamic> params = {
'as': as,
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
}

View file

@ -7,13 +7,12 @@ import '../enums.dart';
import "../service.dart";
class Teams extends Service {
Teams(Client client): super(client);
/// 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
/// of the project teams. [Learn more about different API modes](/docs/admin).
Future<Response> list({String search = null, int limit = 25, int offset = null, OrderType orderType = OrderType.asc}) {
Future<Response> list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) {
final String path = '/teams';
final Map<String, dynamic> params = {
@ -23,7 +22,7 @@ class Teams extends Service {
'orderType': orderType.name(),
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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,
@ -37,7 +36,7 @@ class Teams extends Service {
'roles': roles,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// Get team by its unique ID. All team members have read access for this
/// resource.
@ -47,7 +46,7 @@ class Teams extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// Update team by its unique ID. Only team owners have write access for this
/// resource.
@ -58,7 +57,7 @@ class Teams extends Service {
'name': name,
};
return this.client.call(HttpMethod.put, path: path, params: params);
return client.call(HttpMethod.put, path: path, params: params);
}
/// Delete team by its unique ID. Only team owners have write access for this
/// resource.
@ -68,7 +67,7 @@ class Teams extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// Get team members by the team unique ID. All team members have read access
/// for this list of resources.
@ -78,7 +77,7 @@ class Teams extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.get, path: path, params: params);
return client.call(HttpMethod.get, path: path, params: params);
}
/// 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
@ -93,7 +92,7 @@ class Teams extends Service {
/// 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
/// 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}) {
Future<Response> createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) {
final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId);
final Map<String, dynamic> params = {
@ -103,7 +102,7 @@ class Teams extends Service {
'url': url,
};
return this.client.call(HttpMethod.post, path: path, params: params);
return client.call(HttpMethod.post, path: path, params: params);
}
/// 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
@ -114,7 +113,7 @@ class Teams extends Service {
final Map<String, dynamic> params = {
};
return this.client.call(HttpMethod.delete, path: path, params: params);
return client.call(HttpMethod.delete, path: path, params: params);
}
/// 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
@ -127,6 +126,6 @@ class Teams extends Service {
'secret': secret,
};
return this.client.call(HttpMethod.patch, path: path, params: params);
return client.call(HttpMethod.patch, path: path, params: params);
}
}

View file

@ -1,7 +1,10 @@
name: appwrite
version: 0.0.8
description: 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)
homepage: https://github.com/appwrite/sdk-for-dart
version: 0.0.9
description: Appwrite is an open-source backend as a service server that allows you to accelerate your app development by leveraging Appwrite ready to use API and tools
homepage: https://appwrite.io
repository: https://github.com/appwrite/sdk-for-dart
issue_tracker: https://github.com/appwrite/sdk-generator/issues
documentation: https://appwrite.io/support
environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:

View file

@ -5,7 +5,9 @@
**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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

View file

@ -3,7 +3,9 @@
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

View file

@ -1,7 +1,9 @@
{
"name": "node-appwrite",
"homepage": "https://appwrite.io/support",
"description": "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)",
"description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "1.0.32",
"license": "BSD-3-Clause",
"main": "index.js",

View file

@ -3,7 +3,9 @@
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

View file

@ -1,6 +1,8 @@
{
"name": "appwrite/appwrite",
"description": "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)",
"description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"type": "library",
"license": "BSD-3-Clause",
"support": {

View file

@ -5,7 +5,9 @@
**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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

View file

@ -5,7 +5,9 @@ setuptools.setup(
packages = ['appwrite', 'appwrite/services'],
version = '0.0.4',
license='BSD-3-Clause',
description = '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)',
description = 'Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)',
author = 'Appwrite Team',
author_email = 'team@appwrite.io',
maintainer = 'Appwrite Team',

View file

@ -5,7 +5,9 @@
**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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

View file

@ -2,7 +2,9 @@ Gem::Specification.new do |s|
s.name = 'appwrite'
s.version = '1.0.9'
s.summary = "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)"
s.summary = "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)"
s.author = 'Appwrite Team'
s.homepage = 'https://appwrite.io/support'
s.email = 'team@appwrite.io'

View file

@ -3,7 +3,9 @@
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
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 is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
![Appwrite](https://appwrite.io/images/github.png)

View file

@ -1,7 +1,9 @@
{
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"description": "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)",
"description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "1.0.29",
"license": "BSD-3-Clause",
"main": "src/sdk.js",

View file

@ -135,6 +135,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$sdk = new SDK($config, new Swagger2($spec));
$sdk
->setDescription("Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
Use the {$language['name']} SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)")
->setShortDescription('Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API')
->setLicense($license)
->setLicenseContent($licenseContent)
->setVersion($language['version'])

8
composer.lock generated
View file

@ -1622,11 +1622,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
<<<<<<< HEAD
"reference": "ea7291f4419ad52f4565f57f1b61eace0bf3bba4"
=======
"reference": "3b7389388f29c6e0cf53cf2233ee516fb20ad9f7"
>>>>>>> 02c7f4a6119d1e53543293d97bff66ebc9da7ebd
"reference": "f8e7c334e672468ca9d2e616e10f2379ea890ae7"
},
"require": {
"ext-curl": "*",
@ -1656,7 +1652,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2020-04-05T13:47:11+00:00"
"time": "2020-04-06T04:46:23+00:00"
},
{
"name": "doctrine/instantiator",

View file

@ -1,3 +1,7 @@
## 0.0.9
- Updated deafult params
## 0.0.8
- Fixed compilation error in Client class