Merge pull request #3726 from appwrite/doc-flutter-webauth-dependency-change

Flutter/Dart Release changes
This commit is contained in:
Eldad A. Fux 2022-09-01 09:19:03 +03:00 committed by GitHub
commit 007ae1fcfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 157 additions and 127 deletions

View file

@ -63,7 +63,7 @@ return [
[ [
'key' => 'flutter', 'key' => 'flutter',
'name' => 'Flutter', 'name' => 'Flutter',
'version' => '6.0.0', 'version' => '7.0.0',
'url' => 'https://github.com/appwrite/sdk-for-flutter', 'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite', 'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true, 'enabled' => true,
@ -352,7 +352,7 @@ return [
[ [
'key' => 'dart', 'key' => 'dart',
'name' => 'Dart', 'name' => 'Dart',
'version' => '6.0.0', 'version' => '6.0.1',
'url' => 'https://github.com/appwrite/sdk-for-dart', 'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite', 'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true, 'enabled' => true,

120
composer.lock generated
View file

@ -481,16 +481,16 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.4.5", "version": "7.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -505,10 +505,10 @@
"psr/http-client-implementation": "1.0" "psr/http-client-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1", "bamarni/composer-bin-plugin": "^1.8.1",
"ext-curl": "*", "ext-curl": "*",
"php-http/client-integration-tests": "^3.0", "php-http/client-integration-tests": "^3.0",
"phpunit/phpunit": "^8.5.5 || ^9.3.5", "phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0" "psr/log": "^1.1 || ^2.0 || ^3.0"
}, },
"suggest": { "suggest": {
@ -518,8 +518,12 @@
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
},
"branch-alias": { "branch-alias": {
"dev-master": "7.4-dev" "dev-master": "7.5-dev"
} }
}, },
"autoload": { "autoload": {
@ -585,7 +589,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.4.5" "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
}, },
"funding": [ "funding": [
{ {
@ -601,20 +605,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-06-20T22:16:13+00:00" "time": "2022-08-28T15:39:27+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "1.5.1", "version": "1.5.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" "reference": "b94b2807d85443f9719887892882d0329d1e2598"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "reference": "b94b2807d85443f9719887892882d0329d1e2598",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -669,7 +673,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.5.1" "source": "https://github.com/guzzle/promises/tree/1.5.2"
}, },
"funding": [ "funding": [
{ {
@ -685,20 +689,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-10-22T20:56:57+00:00" "time": "2022-08-28T14:55:35+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.4.0", "version": "2.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "13388f00956b1503577598873fffb5ae994b5737" "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379",
"reference": "13388f00956b1503577598873fffb5ae994b5737", "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -712,15 +716,19 @@
"psr/http-message-implementation": "1.0" "psr/http-message-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1", "bamarni/composer-bin-plugin": "^1.8.1",
"http-interop/http-factory-tests": "^0.9", "http-interop/http-factory-tests": "^0.9",
"phpunit/phpunit": "^8.5.8 || ^9.3.10" "phpunit/phpunit": "^8.5.29 || ^9.5.23"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
},
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.4-dev"
} }
@ -784,7 +792,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.4.0" "source": "https://github.com/guzzle/psr7/tree/2.4.1"
}, },
"funding": [ "funding": [
{ {
@ -800,7 +808,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-06-20T21:43:11+00:00" "time": "2022-08-28T14:45:39+00:00"
}, },
{ {
"name": "influxdb/influxdb-php", "name": "influxdb/influxdb-php",
@ -1894,16 +1902,16 @@
}, },
{ {
"name": "utopia-php/cache", "name": "utopia-php/cache",
"version": "0.6.0", "version": "0.6.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/utopia-php/cache.git", "url": "https://github.com/utopia-php/cache.git",
"reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3" "reference": "9889235a6d3da6cbb1f435201529da4d27c30e79"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/8ea1353a4bbab617e23c865a7c97b60d8074aee3", "url": "https://api.github.com/repos/utopia-php/cache/zipball/9889235a6d3da6cbb1f435201529da4d27c30e79",
"reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3", "reference": "9889235a6d3da6cbb1f435201529da4d27c30e79",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1941,9 +1949,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/utopia-php/cache/issues", "issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/0.6.0" "source": "https://github.com/utopia-php/cache/tree/0.6.1"
}, },
"time": "2022-04-04T12:30:05+00:00" "time": "2022-08-10T08:12:46+00:00"
}, },
{ {
"name": "utopia-php/cli", "name": "utopia-php/cli",
@ -2948,16 +2956,16 @@
}, },
{ {
"name": "matthiasmullie/minify", "name": "matthiasmullie/minify",
"version": "1.3.68", "version": "1.3.69",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/matthiasmullie/minify.git", "url": "https://github.com/matthiasmullie/minify.git",
"reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297" "reference": "a61c949cccd086808063611ef9698eabe42ef22f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297", "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a61c949cccd086808063611ef9698eabe42ef22f",
"reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297", "reference": "a61c949cccd086808063611ef9698eabe42ef22f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3006,7 +3014,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/matthiasmullie/minify/issues", "issues": "https://github.com/matthiasmullie/minify/issues",
"source": "https://github.com/matthiasmullie/minify/tree/1.3.68" "source": "https://github.com/matthiasmullie/minify/tree/1.3.69"
}, },
"funding": [ "funding": [
{ {
@ -3014,7 +3022,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-04-19T08:28:56+00:00" "time": "2022-08-01T09:00:18+00:00"
}, },
{ {
"name": "matthiasmullie/path-converter", "name": "matthiasmullie/path-converter",
@ -3524,23 +3532,23 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.15", "version": "9.2.16",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"nikic/php-parser": "^4.13.0", "nikic/php-parser": "^4.14",
"php": ">=7.3", "php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3", "phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2", "phpunit/php-text-template": "^2.0.2",
@ -3589,7 +3597,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16"
}, },
"funding": [ "funding": [
{ {
@ -3597,7 +3605,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-03-07T09:28:20+00:00" "time": "2022-08-20T05:26:47+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -4800,16 +4808,16 @@
}, },
{ {
"name": "sebastian/type", "name": "sebastian/type",
"version": "3.0.0", "version": "3.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/type.git", "url": "https://github.com/sebastianbergmann/type.git",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" "reference": "fb44e1cc6e557418387ad815780360057e40753e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "reference": "fb44e1cc6e557418387ad815780360057e40753e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4821,7 +4829,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.0-dev" "dev-master": "3.1-dev"
} }
}, },
"autoload": { "autoload": {
@ -4844,7 +4852,7 @@
"homepage": "https://github.com/sebastianbergmann/type", "homepage": "https://github.com/sebastianbergmann/type",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/type/issues", "issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.0.0" "source": "https://github.com/sebastianbergmann/type/tree/3.1.0"
}, },
"funding": [ "funding": [
{ {
@ -4852,7 +4860,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-03-15T09:54:48+00:00" "time": "2022-08-29T06:55:37+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -5271,16 +5279,16 @@
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.4.1", "version": "v3.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342" "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e939eae92386b69b49cfa4599dd9bead6bf4a342", "url": "https://api.github.com/repos/twigphp/Twig/zipball/e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077",
"reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342", "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5331,7 +5339,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.4.1" "source": "https://github.com/twigphp/Twig/tree/v3.4.2"
}, },
"funding": [ "funding": [
{ {
@ -5343,7 +5351,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-05-17T05:48:52+00:00" "time": "2022-08-12T06:47:24+00:00"
} }
], ],
"aliases": [], "aliases": [],
@ -5370,5 +5378,5 @@
"platform-overrides": { "platform-overrides": {
"php": "8.0" "php": "8.0"
}, },
"plugin-api-version": "2.3.0" "plugin-api-version": "2.2.0"
} }

View file

@ -3,6 +3,7 @@ import android.os.Bundle
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Storage import io.appwrite.services.Storage
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {

View file

@ -3,6 +3,7 @@ import android.os.Bundle
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Storage import io.appwrite.services.Storage
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {

View file

@ -1,7 +1,7 @@
appwrite functions create \ appwrite functions create \
--functionId [FUNCTION_ID] \ --functionId [FUNCTION_ID] \
--name [NAME] \ --name [NAME] \
--execute one two three \ --execute "role:all" \
--runtime node-14.5 \ --runtime node-14.5 \

View file

@ -1,7 +1,7 @@
appwrite functions update \ appwrite functions update \
--functionId [FUNCTION_ID] \ --functionId [FUNCTION_ID] \
--name [NAME] \ --name [NAME] \
--execute one two three \ --execute "role:all" \

View file

@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID .setProject('5df5acd0d48c2') // Your project ID
; ;
const promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); const promise = functions.create('[FUNCTION_ID]', '[NAME]', ["role:all"], 'node-14.5');
promise.then(function (response) { promise.then(function (response) {
console.log(response); // Success console.log(response); // Success

View file

@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID .setProject('5df5acd0d48c2') // Your project ID
; ;
const promise = functions.update('[FUNCTION_ID]', '[NAME]', []); const promise = functions.update('[FUNCTION_ID]', '[NAME]', ["role:all"]);
promise.then(function (response) { promise.then(function (response) {
console.log(response); // Success console.log(response); // Success

View file

@ -13,7 +13,7 @@ void main() { // Init SDK
Future result = functions.create( Future result = functions.create(
functionId: '[FUNCTION_ID]', functionId: '[FUNCTION_ID]',
name: '[NAME]', name: '[NAME]',
execute: [], execute: ["role:all"],
runtime: 'node-14.5', runtime: 'node-14.5',
); );

View file

@ -13,7 +13,7 @@ void main() { // Init SDK
Future result = functions.update( Future result = functions.update(
functionId: '[FUNCTION_ID]', functionId: '[FUNCTION_ID]',
name: '[NAME]', name: '[NAME]',
execute: [], execute: ["role:all"],
); );
result result

View file

@ -12,7 +12,7 @@ client
; ;
let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', InputFile.fromPath('/path/to/file.png', 'file.png'), false);
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -12,7 +12,7 @@ client
; ;
let promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); let promise = functions.create('[FUNCTION_ID]', '[NAME]', ["role:all"], 'node-14.5');
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -12,7 +12,7 @@ client
; ;
let promise = functions.update('[FUNCTION_ID]', '[NAME]', []); let promise = functions.update('[FUNCTION_ID]', '[NAME]', ["role:all"]);
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -12,7 +12,7 @@ client
; ;
let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', InputFile.fromPath('/path/to/file.png', 'file.png'));
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -12,8 +12,8 @@ public void main() {
collectionId = "[COLLECTION_ID]", collectionId = "[COLLECTION_ID]",
name = "[NAME]", name = "[NAME]",
permission = "document", permission = "document",
read = ["role:all"], read = listOf("role:all"),
write = ["role:all"] write = listOf("role:all")
new Continuation<Response>() { new Continuation<Response>() {
@NotNull @NotNull
@Override @Override

View file

@ -1,4 +1,5 @@
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Functions import io.appwrite.services.Functions
public void main() { public void main() {

View file

@ -11,7 +11,7 @@ public void main() {
functions.create( functions.create(
functionId = "[FUNCTION_ID]", functionId = "[FUNCTION_ID]",
name = "[NAME]", name = "[NAME]",
execute = listOf(), execute = listOf("role:all"),
runtime = "node-14.5", runtime = "node-14.5",
new Continuation<Response>() { new Continuation<Response>() {
@NotNull @NotNull

View file

@ -11,7 +11,7 @@ public void main() {
functions.update( functions.update(
functionId = "[FUNCTION_ID]", functionId = "[FUNCTION_ID]",
name = "[NAME]", name = "[NAME]",
execute = listOf(), execute = listOf("role:all"),
new Continuation<Response>() { new Continuation<Response>() {
@NotNull @NotNull
@Override @Override

View file

@ -1,4 +1,5 @@
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Storage import io.appwrite.services.Storage
public void main() { public void main() {

View file

@ -12,8 +12,8 @@ suspend fun main() {
collectionId = "[COLLECTION_ID]", collectionId = "[COLLECTION_ID]",
name = "[NAME]", name = "[NAME]",
permission = "document", permission = "document",
read = ["role:all"], read = listOf("role:all"),
write = ["role:all"] write = listOf("role:all")
) )
val json = response.body?.string() val json = response.body?.string()
} }

View file

@ -1,4 +1,5 @@
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Functions import io.appwrite.services.Functions
suspend fun main() { suspend fun main() {

View file

@ -11,7 +11,7 @@ suspend fun main() {
val response = functions.create( val response = functions.create(
functionId = "[FUNCTION_ID]", functionId = "[FUNCTION_ID]",
name = "[NAME]", name = "[NAME]",
execute = listOf(), execute = listOf("role:all"),
runtime = "node-14.5", runtime = "node-14.5",
) )
val json = response.body?.string() val json = response.body?.string()

View file

@ -11,7 +11,7 @@ suspend fun main() {
val response = functions.update( val response = functions.update(
functionId = "[FUNCTION_ID]", functionId = "[FUNCTION_ID]",
name = "[NAME]", name = "[NAME]",
execute = listOf(), execute = listOf("role:all"),
) )
val json = response.body?.string() val json = response.body?.string()
} }

View file

@ -1,4 +1,5 @@
import io.appwrite.Client import io.appwrite.Client
import io.appwrite.models.InputFile
import io.appwrite.services.Storage import io.appwrite.services.Storage
suspend fun main() { suspend fun main() {

View file

@ -12,7 +12,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
; ;
const promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); const promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', InputFile.fromPath('/path/to/file.png', 'file.png'), false);
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -11,7 +11,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
; ;
const promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); const promise = functions.create('[FUNCTION_ID]', '[NAME]', ["role:all"], 'node-14.5');
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -11,7 +11,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
; ;
const promise = functions.update('[FUNCTION_ID]', '[NAME]', []); const promise = functions.update('[FUNCTION_ID]', '[NAME]', ["role:all"]);
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -12,7 +12,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
; ;
const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', InputFile.fromPath('/path/to/file.png', 'file.png'));
promise.then(function (response) { promise.then(function (response) {
console.log(response); console.log(response);

View file

@ -1,6 +1,7 @@
<?php <?php
use Appwrite\Client; use Appwrite\Client;
use Appwrite\InputFile;
use Appwrite\Services\Functions; use Appwrite\Services\Functions;
$client = new Client(); $client = new Client();
@ -13,4 +14,4 @@ $client
$functions = new Functions($client); $functions = new Functions($client);
$result = $functions->createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); $result = $functions->createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', InputFile::withPath('file.png'), false);

View file

@ -13,4 +13,4 @@ $client
$functions = new Functions($client); $functions = new Functions($client);
$result = $functions->create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); $result = $functions->create('[FUNCTION_ID]', '[NAME]', ["role:all"], 'node-14.5');

View file

@ -13,4 +13,4 @@ $client
$functions = new Functions($client); $functions = new Functions($client);
$result = $functions->update('[FUNCTION_ID]', '[NAME]', []); $result = $functions->update('[FUNCTION_ID]', '[NAME]', ["role:all"]);

View file

@ -1,6 +1,7 @@
<?php <?php
use Appwrite\Client; use Appwrite\Client;
use Appwrite\InputFile;
use Appwrite\Services\Storage; use Appwrite\Services\Storage;
$client = new Client(); $client = new Client();
@ -13,4 +14,4 @@ $client
$storage = new Storage($client); $storage = new Storage($client);
$result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); $result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', InputFile::withPath('file.png'));

View file

@ -1,4 +1,5 @@
from appwrite.client import Client from appwrite.client import Client
from appwrite.input_file import InputFile
from appwrite.services.functions import Functions from appwrite.services.functions import Functions
client = Client() client = Client()

View file

@ -11,4 +11,4 @@ client = Client()
functions = Functions(client) functions = Functions(client)
result = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5') result = functions.create('[FUNCTION_ID]', '[NAME]', ["role:all"], 'node-14.5')

View file

@ -11,4 +11,4 @@ client = Client()
functions = Functions(client) functions = Functions(client)
result = functions.update('[FUNCTION_ID]', '[NAME]', []) result = functions.update('[FUNCTION_ID]', '[NAME]', ["role:all"])

View file

@ -1,4 +1,5 @@
from appwrite.client import Client from appwrite.client import Client
from appwrite.input_file import InputFile
from appwrite.services.storage import Storage from appwrite.services.storage import Storage
client = Client() client = Client()

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_boolean_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_boolean_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document', read: ["role:all"], write: ["role:all"]) response = databases.create_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document', read: ["role:all"], write: ["role:all"])

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) response = databases.create_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {})

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_email_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_email_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_enum_attribute(collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false) response = databases.create_enum_attribute(collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_float_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_float_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_index(collection_id: '[COLLECTION_ID]', key: '', type: 'key', attributes: []) response = databases.create_index(collection_id: '[COLLECTION_ID]', key: '', type: 'key', attributes: [])

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_integer_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_integer_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_ip_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_ip_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_string_attribute(collection_id: '[COLLECTION_ID]', key: '', size: 1, required: false) response = databases.create_string_attribute(collection_id: '[COLLECTION_ID]', key: '', size: 1, required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create_url_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) response = databases.create_url_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false)

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.create(name: '[NAME]') response = databases.create(name: '[NAME]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.delete_attribute(collection_id: '[COLLECTION_ID]', key: '') response = databases.delete_attribute(collection_id: '[COLLECTION_ID]', key: '')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.delete_collection(collection_id: '[COLLECTION_ID]') response = databases.delete_collection(collection_id: '[COLLECTION_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') response = databases.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.delete_index(collection_id: '[COLLECTION_ID]', key: '') response = databases.delete_index(collection_id: '[COLLECTION_ID]', key: '')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.delete() response = databases.delete()

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.get_attribute(collection_id: '[COLLECTION_ID]', key: '') response = databases.get_attribute(collection_id: '[COLLECTION_ID]', key: '')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.get_collection(collection_id: '[COLLECTION_ID]') response = databases.get_collection(collection_id: '[COLLECTION_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') response = databases.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.get_index(collection_id: '[COLLECTION_ID]', key: '') response = databases.get_index(collection_id: '[COLLECTION_ID]', key: '')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.get() response = databases.get()

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.list_attributes(collection_id: '[COLLECTION_ID]') response = databases.list_attributes(collection_id: '[COLLECTION_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.list_collections() response = databases.list_collections()

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.list_documents(collection_id: '[COLLECTION_ID]') response = databases.list_documents(collection_id: '[COLLECTION_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.list_indexes(collection_id: '[COLLECTION_ID]') response = databases.list_indexes(collection_id: '[COLLECTION_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.list() response = databases.list()

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document') response = databases.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') response = databases.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]')

View file

@ -7,7 +7,7 @@ client
.set_project('5df5acd0d48c2') # Your project ID .set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
databases = Appwrite::Databases.new(client, '[DATABASE_ID]') databases = Appwrite::Databases.new(client, database_id:'[DATABASE_ID]')
response = databases.update(name: '[NAME]') response = databases.update(name: '[NAME]')

View file

@ -9,6 +9,6 @@ client
functions = Appwrite::Functions.new(client) functions = Appwrite::Functions.new(client)
response = functions.create_deployment(function_id: '[FUNCTION_ID]', entrypoint: '[ENTRYPOINT]', code: InputFile.fromPath('dir/file.png'), activate: false) response = functions.create_deployment(function_id: '[FUNCTION_ID]', entrypoint: '[ENTRYPOINT]', code: Appwrite::InputFile.from_path('dir/file.png'), activate: false)
puts response.inspect puts response.inspect

View file

@ -9,6 +9,6 @@ client
functions = Appwrite::Functions.new(client) functions = Appwrite::Functions.new(client)
response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: [], runtime: 'node-14.5') response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: ["role:all"], runtime: 'node-14.5')
puts response.inspect puts response.inspect

View file

@ -9,6 +9,6 @@ client
functions = Appwrite::Functions.new(client) functions = Appwrite::Functions.new(client)
response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: []) response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', execute: ["role:all"])
puts response.inspect puts response.inspect

View file

@ -1,6 +1,7 @@
require 'appwrite' require 'appwrite'
client = Appwrite::Client.new client = Appwrite::Client.new
InputFile = Appwrite::InputFile
client client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
@ -9,6 +10,6 @@ client
storage = Appwrite::Storage.new(client) storage = Appwrite::Storage.new(client)
response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: InputFile.fromPath('dir/file.png')) response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: Appwrite::InputFile.from_path('dir/file.png'))
puts response.inspect puts response.inspect

View file

@ -9,7 +9,7 @@ func main() async throws {
let function = try await functions.create( let function = try await functions.create(
functionId: "[FUNCTION_ID]", functionId: "[FUNCTION_ID]",
name: "[NAME]", name: "[NAME]",
execute: [], execute: ["role:all"],
runtime: "node-14.5" runtime: "node-14.5"
) )

View file

@ -6,10 +6,10 @@ func main() async throws {
.setProject("5df5acd0d48c2") // Your project ID .setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
let functions = Functions(client) let functions = Functions(client)
let deploymentList = try await functions.getDeployment( let deployment = try await functions.getDeployment(
functionId: "[FUNCTION_ID]", functionId: "[FUNCTION_ID]",
deploymentId: "[DEPLOYMENT_ID]" deploymentId: "[DEPLOYMENT_ID]"
) )
print(String(describing: deploymentList) print(String(describing: deployment)
} }

View file

@ -9,7 +9,7 @@ func main() async throws {
let function = try await functions.update( let function = try await functions.update(
functionId: "[FUNCTION_ID]", functionId: "[FUNCTION_ID]",
name: "[NAME]", name: "[NAME]",
execute: [] execute: ["role:all"]
) )
print(String(describing: function) print(String(describing: function)

View file

@ -1,3 +1,8 @@
## 6.0.1
* Dependency upgrades
* Doc comments updates
* Cleanup code
## 6.0.0 ## 6.0.0
* Support for Appwrite 0.15 * Support for Appwrite 0.15
* **BREAKING** `Database` -> `Databases` * **BREAKING** `Database` -> `Databases`

View file

@ -1,3 +1,9 @@
## 7.0.0
* **BREAKING** Switched to using [flutter_web_auth_2](https://pub.dev/packages/flutter_web_auth_2), check Getting Started section in Readme for changes (Android and Web will require adjustments for OAuth to work properly)
* Fixes Concurrent modification issue
* Upgrade dependencies
* **Windows** support for OAuth sessions
## 6.0.0 ## 6.0.0
* Support for Appwrite 0.15 * Support for Appwrite 0.15
* **NEW** Phone authentication `account.createPhoneSession()` * **NEW** Phone authentication `account.createPhoneSession()`

View file

@ -18,8 +18,8 @@ In order to capture the Appwrite OAuth callback url, the following activity need
<application ...> <application ...>
.... ....
<!-- Add this inside the <application> tag, along side the existing <activity> tags --> <!-- Add this inside the <application> tag, along side the existing <activity> tags -->
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" > <activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" >
<intent-filter android:label="flutter_web_auth"> <intent-filter android:label="flutter_web_auth_2">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
@ -58,7 +58,7 @@ For web in order to capture the OAuth2 callback URL and send it to the applicati
close the window. close the window.
<script> <script>
window.opener.postMessage({ window.opener.postMessage({
flutter-web-auth: window.location.href flutter-web-auth2: window.location.href
}, window.location.origin); }, window.location.origin);
window.close(); window.close();
</script> </script>