1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Updated SDKs

This commit is contained in:
eldadfux 2019-09-20 09:35:36 +03:00
parent 21b3af7ce1
commit 846ef9ad13
18 changed files with 84 additions and 34 deletions

12
app/sdks/dart/LICENSE Normal file
View file

@ -0,0 +1,12 @@
Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

33
app/sdks/dart/README.md Normal file
View file

@ -0,0 +1,33 @@
# [Appwrite SDK for Dart](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.15-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**
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](https://appwrite.io/images/github.png)
**API Version: 0.1.15**
## Installation
Add this to your package's pubspec.yaml file:
```yml
dependencies:
appwrite: ^v0.0.1
```
You can install packages from the command line:
```bash
pub get
```
## License
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

View file

@ -0,0 +1,11 @@
export 'package:appwrite/services/account.dart';
export 'package:appwrite/services/auth.dart';
export 'package:appwrite/services/avatars.dart';
export 'package:appwrite/services/database.dart';
export 'package:appwrite/services/locale.dart';
export 'package:appwrite/services/projects.dart';
export 'package:appwrite/services/storage.dart';
export 'package:appwrite/services/teams.dart';
export 'package:appwrite/services/users.dart';
export 'package:appwrite/client.dart';
export 'package:dio/dio.dart' show Response;

View file

@ -79,8 +79,9 @@ class Client {
String reqPath = path;
bool isGet = method.toUpperCase() == "GET";
// Origin is hardcoded for testing
Options options = Options(
headers: {...this.headers, ...headers},
headers: {...this.headers, ...headers, "Origin": "http://localhost"},
method: method.toUpperCase(),
);

View file

@ -1,4 +1,4 @@
import 'package:dart_appwrite/client.dart';
import 'package:appwrite/client.dart';
class Service {
Client client;

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Account extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Auth extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Avatars extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Database extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Locale extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Projects extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Storage extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Teams extends Service {

View file

@ -1,5 +1,5 @@
import "package:dart_appwrite/service.dart";
import "package:dart_appwrite/client.dart";
import "package:appwrite/service.dart";
import "package:appwrite/client.dart";
import 'package:dio/dio.dart';
class Users extends Service {

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
promise.then(function (response) {
console.log(response);

View file

@ -10,7 +10,7 @@ client
setKey('')
;
let promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
let promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
promise.then(function (response) {
console.log(response);

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);

15
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "bcdcb2d9926740fea4a0515f87c58a3c",
"content-hash": "470f543ebf989400a43a6269f0b4d60a",
"packages": [
{
"name": "appwrite/appwrite",
@ -91,14 +91,8 @@
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "aa2cb7d561e33c610d58314616af3a4f0a5ebcab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/aa2cb7d561e33c610d58314616af3a4f0a5ebcab",
"reference": "aa2cb7d561e33c610d58314616af3a4f0a5ebcab",
"shasum": ""
"url": "https://github.com/appwrite/sdk-generator",
"reference": "e456fafb3d32a83c104a47ad064b2295281e58c0"
},
"require": {
"ext-curl": "*",
@ -118,7 +112,6 @@
"Appwrite\\Spec\\": "src/Spec"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@ -129,7 +122,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2019-09-20 05:54:51"
"time": "2019-09-20 06:30:54"
},
{
"name": "bacon/bacon-qr-code",