1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Merge branch 'master' of github.com:appwrite/appwrite into feature--flutter-support

This commit is contained in:
Eldad Fux 2020-04-05 23:42:55 +03:00
commit c4c6dbbda0
32 changed files with 116 additions and 15 deletions

View file

@ -73,13 +73,13 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
### Services
* [**Account**](https://appwrite.io/docs/account) - Manage current user authentication and account. Track and manage the user sessions, devices, sigin methods, and security logs.
* [**Account**](https://appwrite.io/docs/account) - Manage current user authentication and account. Track and manage the user sessions, devices, sign-in methods, and security logs.
* [**Users**](https://appwrite.io/docs/users) - Manage and list all project users when in admin mode.
* [**Teams**](https://appwrite.io/docs/teams) - Manage and group users in teams. Manage memberships, invites and user roles within a team.
* [**Database**](https://appwrite.io/docs/database) - Manage database collections and documents. Read, create, update and delete documents and filter lists of documents collections using an advanced filter with graph-like capabilities.
* [**Storage**](https://appwrite.io/docs/storage) - Manage storage files. Read, create, delete and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way.
* [**Locale**](https://appwrite.io/docs/locale) - Track user's location, and manage your app locale-based data.
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols and generate QR codes.
* [**Teams**](https://appwrite.io/docs/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team.
* [**Database**](https://appwrite.io/docs/database) - Manage database collections and documents. Read, create, update, and delete documents and filter lists of documents collections using an advanced filter with graph-like capabilities.
* [**Storage**](https://appwrite.io/docs/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way.
* [**Locale**](https://appwrite.io/docs/locale) - Track your user's location, and manage your app locale-based data.
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes.
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io).

View file

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

View file

@ -222,6 +222,32 @@ $utopia->get('/v1/mock/tests/general/redirected')
}
);
$utopia->get('/v1/mock/tests/general/set-cookie')
->desc('Mock a cookie request for SDK tests')
->label('scope', 'public')
->label('sdk.namespace', 'general')
->label('sdk.method', 'setCookie')
->label('sdk.description', 'Mock a set cookie request for SDK tests')
->action(
function () use ($response) {
$response->addCookie('cookieName', 'cookieValue', time() + 31536000, '/', 'localhost', true, true);
}
);
$utopia->get('/v1/mock/tests/general/get-cookie')
->desc('Mock a cookie request for SDK tests')
->label('scope', 'public')
->label('sdk.namespace', 'general')
->label('sdk.method', 'getCookie')
->label('sdk.description', 'Mock a get cookie request for SDK tests')
->action(
function () use ($request) {
if($request->getCookie('cookieName', '') !== 'cookieValue') {
throw new Exception('Missing cookie value', 400);
}
}
);
$utopia->get('/v1/mock/tests/general/empty')
->desc('Mock a post request for SDK tests')
->label('scope', 'public')

View file

@ -0,0 +1 @@
# Change Log

View file

@ -31,6 +31,21 @@ To install with a CDN (content delivery network) add the following scripts to th
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.0"></script>
```
## Getting Started
Initialise the Appwrite SDK in your code, and setup your API credentials:
```js
// Init your JS SDK
var appwrite = new Appwrite();
appwrite
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
.setProject('455x34dfkj') // Your Appwrite Project UID
;
```
## Contribution

View file

@ -0,0 +1,4 @@
## 0.0.8
- Fixed compilation error in Client class
- Shorter description for package

View file

@ -17,7 +17,7 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^0.0.7
appwrite: ^0.0.8
```
You can install packages from the command line:

View file

@ -1,3 +1,6 @@
import 'dart:io';
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';
@ -13,7 +16,7 @@ class Client {
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.7',
'x-sdk-version': 'appwrite:dart:0.0.8',
};
assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'");
@ -58,7 +61,14 @@ class Client {
}
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) {
if(this.selfSigned) {
// Allow self signed requests
(http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) {
client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;
return client;
};
}
// Origin is hardcoded for testing
Options options = Options(
headers: {...this.headers, ...headers, "Origin": "http://localhost"},

View file

@ -1,5 +1,5 @@
name: appwrite
version: 0.0.7
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
environment:

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -31,6 +31,21 @@ To install with a CDN (content delivery network) add the following scripts to th
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.29"></script>
```
## Getting Started
Initialise the Appwrite SDK in your code, and setup your API credentials:
```js
// Init your JS SDK
var appwrite = new Appwrite();
appwrite
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
.setProject('455x34dfkj') // Your Appwrite Project UID
;
```
## Contribution

View file

@ -58,8 +58,10 @@ $cli
$result = realpath(__DIR__.'/..').'/sdks/'.$key.'-'.$language['key'];
$target = realpath(__DIR__.'/..').'/sdks/git/'.$language['key'].'/';
$readme = realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'.md');
$readme = realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'/README.md');
$readme = ($readme) ? file_get_contents($readme) : '';
$changelog = realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'/CHANGELOG.md');
$changelog = ($changelog) ? file_get_contents($changelog) : '# Change Log';
$warning = ($language['beta']) ? '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**' : '';
$license = 'BSD-3-Clause';
$licenseContent = 'Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
@ -148,6 +150,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
->setShareVia('appwrite_io')
->setWarning($warning)
->setReadme($readme)
->setChangelog($changelog)
;
try {

4
composer.lock generated
View file

@ -1622,7 +1622,11 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
<<<<<<< HEAD
"reference": "ea7291f4419ad52f4565f57f1b61eace0bf3bba4"
=======
"reference": "3b7389388f29c6e0cf53cf2233ee516fb20ad9f7"
>>>>>>> 02c7f4a6119d1e53543293d97bff66ebc9da7ebd
},
"require": {
"ext-curl": "*",

View file

@ -0,0 +1,4 @@
## 0.0.8
- Fixed compilation error in Client class
- Shorter description for package

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -0,0 +1 @@
# Change Log

View file

@ -1,5 +1,7 @@
The database service allows you to create structured document collections, query and filter lists of documents, and manage an advanced set of read and write access.
The database service allows you to create structured collections of documents, query and filter lists of documents, and manage an advanced set of read and write access.
All the data in the database service is stored in JSON format. The service also allows you to nest child documents and use advanced filters to search and query the database just like you would with a classic graph database.
All the data in the database service is stored in structured JSON documents. The Appwrite database service also allows you to nest child documents in documents and use advanced filters to both search and query the database just like you would with a classic graph database.
By leveraging the database permission management, you can assign read or write access to the database documents for a specific user, team, user role, or even grant public access to all visitors to your project. You can learn more about [how Appwrite handles permissions and role access control](/docs/permissions).
Each database document structure in your project is defined using the Appwrite [collection rules](/docs/rules). The collections rules help you ensure all your user-submitted data is validated and stored according to the collection structure.
Using Appwrite permissions architecture, you can assign read or write access to each document in your project for either a specific user, team, user role, or even grant it with public access. You can learn more about [how Appwrite handles permissions and access control](/docs/permissions).