Merge branch '0.11.x' of https://github.com/appwrite/appwrite into feat-0-11-0-changes
This commit is contained in:
commit
4b10ecf2ee
197 changed files with 4542 additions and 1518 deletions
|
@ -15,7 +15,7 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $(find "./app/db/DBIP/dbip-country-lite-2021-06.mmdb" -mmin +259200)
|
if test $(find "./app/db/DBIP/dbip-country-lite-2021-10.mmdb" -mmin +259200)
|
||||||
then
|
then
|
||||||
printf "${RED}GEO country DB has not been updated for more than 6 months. Go to https://db-ip.com/db/download/ip-to-country-lite to download a newer version${NC}\n"
|
printf "${RED}GEO country DB has not been updated for more than 6 months. Go to https://db-ip.com/db/download/ip-to-country-lite to download a newer version${NC}\n"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,7 +18,7 @@ ARG DEBUG=false
|
||||||
ENV DEBUG=$DEBUG
|
ENV DEBUG=$DEBUG
|
||||||
|
|
||||||
ENV PHP_REDIS_VERSION=5.3.4 \
|
ENV PHP_REDIS_VERSION=5.3.4 \
|
||||||
PHP_SWOOLE_VERSION=v4.7.0 \
|
PHP_SWOOLE_VERSION=v4.8.0 \
|
||||||
PHP_IMAGICK_VERSION=3.5.1 \
|
PHP_IMAGICK_VERSION=3.5.1 \
|
||||||
PHP_YAML_VERSION=2.2.1 \
|
PHP_YAML_VERSION=2.2.1 \
|
||||||
PHP_MAXMINDDB_VERSION=v1.10.1
|
PHP_MAXMINDDB_VERSION=v1.10.1
|
||||||
|
|
|
@ -58,7 +58,7 @@ docker run -it --rm \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||||
--entrypoint="install" \
|
--entrypoint="install" \
|
||||||
appwrite/appwrite:0.10.4
|
appwrite/appwrite:0.11.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
@ -70,7 +70,7 @@ docker run -it --rm ^
|
||||||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||||
--entrypoint="install" ^
|
--entrypoint="install" ^
|
||||||
appwrite/appwrite:0.10.4
|
appwrite/appwrite:0.11.0
|
||||||
```
|
```
|
||||||
|
|
||||||
#### PowerShell
|
#### PowerShell
|
||||||
|
@ -80,7 +80,7 @@ docker run -it --rm ,
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock ,
|
--volume /var/run/docker.sock:/var/run/docker.sock ,
|
||||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
|
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
|
||||||
--entrypoint="install" ,
|
--entrypoint="install" ,
|
||||||
appwrite/appwrite:0.10.4
|
appwrite/appwrite:0.11.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.
|
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.
|
||||||
|
|
|
@ -77,19 +77,20 @@ return [
|
||||||
'gitUserName' => 'appwrite',
|
'gitUserName' => 'appwrite',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'key' => 'swift',
|
'key' => 'apple',
|
||||||
'name' => 'Swift',
|
'name' => 'Apple',
|
||||||
'url' => '',
|
'version' => '0.1.0',
|
||||||
'package' => '',
|
'url' => 'https://github.com/appwrite/sdk-for-apple',
|
||||||
'enabled' => false,
|
'package' => 'https://github.com/appwrite/sdk-for-apple',
|
||||||
'beta' => false,
|
'enabled' => true,
|
||||||
|
'beta' => true,
|
||||||
'dev' => false,
|
'dev' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'family' => APP_PLATFORM_CLIENT,
|
'family' => APP_PLATFORM_CLIENT,
|
||||||
'prism' => 'swift',
|
'prism' => 'swift',
|
||||||
'source' => false,
|
'source' => \realpath(__DIR__ . '/../sdks/client-apple'),
|
||||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git',
|
'gitUrl' => 'git@github.com:appwrite/sdk-for-apple.git',
|
||||||
'gitRepoName' => 'sdk-for-swift',
|
'gitRepoName' => 'sdk-for-apple',
|
||||||
'gitUserName' => 'appwrite',
|
'gitUserName' => 'appwrite',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -371,6 +372,23 @@ return [
|
||||||
'Java' => 'java',
|
'Java' => 'java',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'key' => 'swift',
|
||||||
|
'name' => 'Swift',
|
||||||
|
'version' => '0.1.0',
|
||||||
|
'url' => 'https://github.com/appwrite/sdk-for-swift',
|
||||||
|
'package' => 'https://github.com/appwrite/sdk-for-swift',
|
||||||
|
'enabled' => true,
|
||||||
|
'beta' => true,
|
||||||
|
'dev' => false,
|
||||||
|
'hidden' => false,
|
||||||
|
'family' => APP_PLATFORM_SERVER,
|
||||||
|
'prism' => 'swift',
|
||||||
|
'source' => \realpath(__DIR__ . '/../sdks/server-swift'),
|
||||||
|
'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git',
|
||||||
|
'gitRepoName' => 'sdk-for-swift',
|
||||||
|
'gitUserName' => 'appwrite',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
1
app/config/specs/0.11.x.client.json
Normal file
1
app/config/specs/0.11.x.client.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/0.11.x.console.json
Normal file
1
app/config/specs/0.11.x.console.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/0.11.x.server.json
Normal file
1
app/config/specs/0.11.x.server.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -1314,9 +1314,9 @@ App::post('/v1/projects/:projectId/platforms')
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_PLATFORM)
|
->label('sdk.response.model', Response::MODEL_PLATFORM)
|
||||||
->param('projectId', null, new UID(), 'Project unique ID.')
|
->param('projectId', null, new UID(), 'Project unique ID.')
|
||||||
->param('type', null, new WhiteList(['web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'ios', 'android', 'unity'], true), 'Platform type.')
|
->param('type', null, new WhiteList(['web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'apple-ios', 'apple-macos', 'apple-watchos', 'apple-tvos', 'android', 'unity'], true), 'Platform type.')
|
||||||
->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.')
|
->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.')
|
||||||
->param('key', '', new Text(256), 'Package name for android or bundle ID for iOS. Max length: 256 chars.', true)
|
->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true)
|
||||||
->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true)
|
->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true)
|
||||||
->param('hostname', '', new Text(256), 'Platform client hostname. Max length: 256 chars.', true)
|
->param('hostname', '', new Text(256), 'Platform client hostname. Max length: 256 chars.', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
|
|
Binary file not shown.
BIN
app/db/DBIP/dbip-country-lite-2021-10.mmdb
Normal file
BIN
app/db/DBIP/dbip-country-lite-2021-10.mmdb
Normal file
Binary file not shown.
|
@ -26,7 +26,6 @@ use Appwrite\Database\Adapter\Redis as RedisAdapter;
|
||||||
use Appwrite\Database\Document;
|
use Appwrite\Database\Document;
|
||||||
use Appwrite\Database\Validator\Authorization;
|
use Appwrite\Database\Validator\Authorization;
|
||||||
use Appwrite\Event\Event;
|
use Appwrite\Event\Event;
|
||||||
use Appwrite\Event\Realtime;
|
|
||||||
use Appwrite\OpenSSL\OpenSSL;
|
use Appwrite\OpenSSL\OpenSSL;
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\View;
|
use Utopia\View;
|
||||||
|
@ -48,8 +47,8 @@ const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
|
||||||
const APP_MODE_DEFAULT = 'default';
|
const APP_MODE_DEFAULT = 'default';
|
||||||
const APP_MODE_ADMIN = 'admin';
|
const APP_MODE_ADMIN = 'admin';
|
||||||
const APP_PAGING_LIMIT = 12;
|
const APP_PAGING_LIMIT = 12;
|
||||||
const APP_CACHE_BUSTER = 160;
|
const APP_CACHE_BUSTER = 170;
|
||||||
const APP_VERSION_STABLE = '0.10.4';
|
const APP_VERSION_STABLE = '0.11.0';
|
||||||
const APP_STORAGE_UPLOADS = '/storage/uploads';
|
const APP_STORAGE_UPLOADS = '/storage/uploads';
|
||||||
const APP_STORAGE_FUNCTIONS = '/storage/functions';
|
const APP_STORAGE_FUNCTIONS = '/storage/functions';
|
||||||
const APP_STORAGE_CACHE = '/storage/cache';
|
const APP_STORAGE_CACHE = '/storage/cache';
|
||||||
|
@ -65,6 +64,8 @@ const APP_SOCIAL_DISCORD = 'https://appwrite.io/discord';
|
||||||
const APP_SOCIAL_DISCORD_CHANNEL = '564160730845151244';
|
const APP_SOCIAL_DISCORD_CHANNEL = '564160730845151244';
|
||||||
const APP_SOCIAL_DEV = 'https://dev.to/appwrite';
|
const APP_SOCIAL_DEV = 'https://dev.to/appwrite';
|
||||||
const APP_SOCIAL_STACKSHARE = 'https://stackshare.io/appwrite';
|
const APP_SOCIAL_STACKSHARE = 'https://stackshare.io/appwrite';
|
||||||
|
const APP_SOCIAL_YOUTUBE = 'https://www.youtube.com/c/appwrite';
|
||||||
|
|
||||||
// Deletion Types
|
// Deletion Types
|
||||||
const DELETE_TYPE_DOCUMENT = 'document';
|
const DELETE_TYPE_DOCUMENT = 'document';
|
||||||
const DELETE_TYPE_EXECUTIONS = 'executions';
|
const DELETE_TYPE_EXECUTIONS = 'executions';
|
||||||
|
@ -254,7 +255,7 @@ $register->set('smtp', function () {
|
||||||
return $mail;
|
return $mail;
|
||||||
});
|
});
|
||||||
$register->set('geodb', function () {
|
$register->set('geodb', function () {
|
||||||
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2021-06.mmdb');
|
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2021-10.mmdb');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,6 +18,7 @@ use Appwrite\SDK\Language\Go;
|
||||||
use Appwrite\SDK\Language\Kotlin;
|
use Appwrite\SDK\Language\Kotlin;
|
||||||
use Appwrite\SDK\Language\Android;
|
use Appwrite\SDK\Language\Android;
|
||||||
use Appwrite\SDK\Language\Swift;
|
use Appwrite\SDK\Language\Swift;
|
||||||
|
use Appwrite\SDK\Language\SwiftClient;
|
||||||
|
|
||||||
$cli
|
$cli
|
||||||
->task('sdks')
|
->task('sdks')
|
||||||
|
@ -137,6 +138,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
break;
|
break;
|
||||||
case 'swift':
|
case 'swift':
|
||||||
$config = new Swift();
|
$config = new Swift();
|
||||||
|
$warning = $warning."\n\n > This is the Swift SDK for integrating with Appwrite from your Swift server-side code. If you're looking for the Apple SDK you should check [appwrite/sdk-for-apple](https://github.com/appwrite/sdk-for-apple)";
|
||||||
|
break;
|
||||||
|
case 'apple':
|
||||||
|
$config = new SwiftClient();
|
||||||
break;
|
break;
|
||||||
case 'dotnet':
|
case 'dotnet':
|
||||||
$cover = '';
|
$cover = '';
|
||||||
|
|
|
@ -201,6 +201,22 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
<div data-ls-if="{{platform.type}} === 'flutter-windows'" class="corner">
|
<div data-ls-if="{{platform.type}} === 'flutter-windows'" class="corner">
|
||||||
<img src="" data-ls-attrs="src=/images/clients/flutter.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Windows Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
<img src="" data-ls-attrs="src=/images/clients/flutter.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Windows Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-ls-if="{{platform.type}} === 'apple-ios'" class="corner">
|
||||||
|
<img src="" data-ls-attrs="src=/images/clients/apple.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="iOS Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div data-ls-if="{{platform.type}} === 'apple-macos'" class="corner">
|
||||||
|
<img src="" data-ls-attrs="src=/images/clients/apple.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="macOS Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div data-ls-if="{{platform.type}} === 'apple-watchos'" class="corner">
|
||||||
|
<img src="" data-ls-attrs="src=/images/clients/apple.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="watchOS Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div data-ls-if="{{platform.type}} === 'apple-tvos'" class="corner">
|
||||||
|
<img src="" data-ls-attrs="src=/images/clients/apple.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="tvOS Logo" class="avatar xs" loading="lazy" width="30" height="30" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-one-liner" data-ls-bind="{{platform.name}}"></span>
|
<span class="text-one-liner" data-ls-bind="{{platform.name}}"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -240,10 +256,10 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
<div class="link flutter-new"><img src="/images/clients/flutter.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Flutter Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Flutter App</div>
|
<div class="link flutter-new"><img src="/images/clients/flutter.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Flutter Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Flutter App</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link android-new"><img src="/images/clients/android.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Android Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Android App</div>
|
<div class="link apple-new"><img src="/images/clients/apple.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="iOS Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Apple App</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="disabled">
|
<li>
|
||||||
<div class="link ios-new"><img src="/images/clients/ios.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="iOS Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New iOS App <span class="text-fade text-size-small">(soon)</span></div>
|
<div class="link android-new"><img src="/images/clients/android.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Android Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Android App</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="disabled">
|
<li class="disabled">
|
||||||
<div class="link unity-new"><img src="/images/clients/unity.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Unity Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Unity Game <span class="text-fade text-size-small">(soon)</span></div>
|
<div class="link unity-new"><img src="/images/clients/unity.png?v=<?php echo APP_CACHE_BUSTER; ?>" alt="Unity Platform Logo" class="avatar xxs margin-end-small" loading="lazy" /> New Unity Game <span class="text-fade text-size-small">(soon)</span></div>
|
||||||
|
@ -539,13 +555,155 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-ui-modal class="modal box close width-large" data-button-alias=".apple-new">
|
||||||
|
<button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button>
|
||||||
|
|
||||||
|
<h1 class="margin-bottom-xl">Register your Apple App</h1>
|
||||||
|
|
||||||
|
<ul class="phases clear margin-top-negative-small padding" data-ui-phases>
|
||||||
|
<li>
|
||||||
|
<h2 style="display: none"> iOS </h2>
|
||||||
|
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Create Project Platform (Apple / iOS)"
|
||||||
|
data-service="projects.createPlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger,reset"
|
||||||
|
data-success-param-alert-text="Registered new platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.createPlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to register platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="type" data-ls-bind="apple-ios" />
|
||||||
|
|
||||||
|
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="name" required autocomplete="off" placeholder="My iOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label for="key">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="key" required autocomplete="off" placeholder="com.company.appname" />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Register</button> <button data-ui-modal-close="" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h2 style="display: none"> macOS </h2>
|
||||||
|
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Create Project Platform (Apple / macOS)"
|
||||||
|
data-service="projects.createPlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger,reset"
|
||||||
|
data-success-param-alert-text="Registered new platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.createPlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to register platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="type" data-ls-bind="apple-macos" />
|
||||||
|
|
||||||
|
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="name" required autocomplete="off" placeholder="My macOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label for="key">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="key" required autocomplete="off" placeholder="com.company.appname" />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Register</button> <button data-ui-modal-close="" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h2 style="display: none"> watchOS </h2>
|
||||||
|
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Create Project Platform (Apple / watchOS)"
|
||||||
|
data-service="projects.createPlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger,reset"
|
||||||
|
data-success-param-alert-text="Registered new platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.createPlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to register platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="type" data-ls-bind="apple-watchos" />
|
||||||
|
|
||||||
|
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="name" required autocomplete="off" placeholder="My watchOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label for="key">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="key" required autocomplete="off" placeholder="com.company.appname" />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Register</button> <button data-ui-modal-close="" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<h2 style="display: none"> tvOS </h2>
|
||||||
|
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Create Project Platform (Apple / tvOS)"
|
||||||
|
data-service="projects.createPlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger,reset"
|
||||||
|
data-success-param-alert-text="Registered new platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.createPlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to register platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="type" data-ls-bind="apple-tvos" />
|
||||||
|
|
||||||
|
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="name" required autocomplete="off" placeholder="My tvOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label for="key">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" name="key" required autocomplete="off" placeholder="com.company.appname" />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Register</button> <button data-ui-modal-close="" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type="text/html" id="template-ios-update">
|
<script type="text/html" id="template-ios-update">
|
||||||
<form
|
<form
|
||||||
data-analytics
|
data-analytics
|
||||||
data-analytics-activity
|
data-analytics-activity
|
||||||
data-analytics-event="submit"
|
data-analytics-event="submit"
|
||||||
data-analytics-category="console"
|
data-analytics-category="console"
|
||||||
data-analytics-label="Update Project Platform (Flutter / iOS)"
|
data-analytics-label="Update Project Platform (iOS)"
|
||||||
data-service="projects.updatePlatform"
|
data-service="projects.updatePlatform"
|
||||||
data-scope="console"
|
data-scope="console"
|
||||||
data-event="submit"
|
data-event="submit"
|
||||||
|
@ -563,7 +721,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My iOS App" maxlength="128" />
|
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My iOS App" maxlength="128" />
|
||||||
|
|
||||||
<label data-ls-attrs="for=key-{{platform.$id}}">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
<label data-ls-attrs="for=key-{{platform.$id}}">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.cpmpany.appname" data-ls-bind="{{platform.key}}" required />
|
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.company.appname" data-ls-bind="{{platform.key}}" required />
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
@ -571,6 +729,38 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
</form>
|
</form>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="template-macos-update">
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Update Project Platform (macOS)"
|
||||||
|
data-service="projects.updatePlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger"
|
||||||
|
data-success-param-alert-text="Updated platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.updatePlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to update platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="platformId" data-ls-bind="{{platform.$id}}" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=name-{{platform.$id}}">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My macOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=key-{{platform.$id}}">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.company.appname" data-ls-bind="{{platform.key}}" required />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Update</button> <button data-ls-ui-trigger="modal-close" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="template-android-update">
|
<script type="text/html" id="template-android-update">
|
||||||
<form
|
<form
|
||||||
data-analytics
|
data-analytics
|
||||||
|
@ -594,7 +784,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My Android App" maxlength="128" />
|
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My Android App" maxlength="128" />
|
||||||
|
|
||||||
<label data-ls-attrs="for=key-{{platform.$id}}">Package Name <span class="tooltip large" data-tooltip="Your package name is generally the applicationId in your app-level build.gradle file."><i class="icon-question"></i></span></label>
|
<label data-ls-attrs="for=key-{{platform.$id}}">Package Name <span class="tooltip large" data-tooltip="Your package name is generally the applicationId in your app-level build.gradle file."><i class="icon-question"></i></span></label>
|
||||||
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.cpmpany.appname" data-ls-bind="{{platform.key}}" required />
|
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.company.appname" data-ls-bind="{{platform.key}}" required />
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
@ -602,6 +792,70 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
</form>
|
</form>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="template-apple-watchos-update">
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Update Project Platform (watchOS)"
|
||||||
|
data-service="projects.updatePlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger"
|
||||||
|
data-success-param-alert-text="Updated platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.updatePlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to update platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="platformId" data-ls-bind="{{platform.$id}}" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=name-{{platform.$id}}">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My watchOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=key-{{platform.$id}}">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.company.appname" data-ls-bind="{{platform.key}}" required />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Update</button> <button data-ls-ui-trigger="modal-close" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="template-apple-tvos-update">
|
||||||
|
<form
|
||||||
|
data-analytics
|
||||||
|
data-analytics-activity
|
||||||
|
data-analytics-event="submit"
|
||||||
|
data-analytics-category="console"
|
||||||
|
data-analytics-label="Update Project Platform (tvOS)"
|
||||||
|
data-service="projects.updatePlatform"
|
||||||
|
data-scope="console"
|
||||||
|
data-event="submit"
|
||||||
|
data-success="alert,trigger"
|
||||||
|
data-success-param-alert-text="Updated platform successfully"
|
||||||
|
data-success-param-trigger-events="projects.updatePlatform"
|
||||||
|
data-failure="alert"
|
||||||
|
data-failure-param-alert-text="Failed to update platform"
|
||||||
|
data-failure-param-alert-classname="error">
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" />
|
||||||
|
<input type="hidden" name="platformId" data-ls-bind="{{platform.$id}}" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=name-{{platform.$id}}">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
|
||||||
|
<input type="text" class="full-width" data-ls-attrs="id=name-{{platform.$id}}" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" placeholder="My tvOS App" maxlength="128" />
|
||||||
|
|
||||||
|
<label data-ls-attrs="for=key-{{platform.$id}}">Bundle ID <span class="tooltip large" data-tooltip="You can find your Bundle Identifier in the General tab for your app's primary target in Xcode."><i class="icon-question"></i></span></label>
|
||||||
|
<input name="key" type="text" class="margin-bottom" autocomplete="off" placeholder="com.company.appname" data-ls-bind="{{platform.key}}" required />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<button type="submit">Update</button> <button data-ls-ui-trigger="modal-close" type="button" class="reverse">Back</button>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="template-flutter-ios-update">
|
<script type="text/html" id="template-flutter-ios-update">
|
||||||
<div data-ls-template="template-ios-update" data-type="script"></div>
|
<div data-ls-template="template-ios-update" data-type="script"></div>
|
||||||
</script>
|
</script>
|
||||||
|
@ -612,4 +866,12 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||||
|
|
||||||
<script type="text/html" id="template-flutter-macos-update">
|
<script type="text/html" id="template-flutter-macos-update">
|
||||||
<div data-ls-template="template-macos-update" data-type="script"></div>
|
<div data-ls-template="template-macos-update" data-type="script"></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="template-apple-ios-update">
|
||||||
|
<div data-ls-template="template-ios-update" data-type="script"></div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="template-apple-macos-update">
|
||||||
|
<div data-ls-template="template-macos-update" data-type="script"></div>
|
||||||
|
</script>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
"utopia-php/cli": "0.11.*",
|
"utopia-php/cli": "0.11.*",
|
||||||
"utopia-php/config": "0.2.*",
|
"utopia-php/config": "0.2.*",
|
||||||
"utopia-php/locale": "0.4.*",
|
"utopia-php/locale": "0.4.*",
|
||||||
|
"utopia-php/orchestration": "0.2.*",
|
||||||
"utopia-php/registry": "0.5.*",
|
"utopia-php/registry": "0.5.*",
|
||||||
"utopia-php/preloader": "0.2.*",
|
"utopia-php/preloader": "0.2.*",
|
||||||
"utopia-php/domains": "1.1.*",
|
"utopia-php/domains": "1.1.*",
|
||||||
|
@ -54,17 +55,16 @@
|
||||||
"utopia-php/websocket": "0.0.*",
|
"utopia-php/websocket": "0.0.*",
|
||||||
"utopia-php/image": "0.5.*",
|
"utopia-php/image": "0.5.*",
|
||||||
"resque/php-resque": "1.3.6",
|
"resque/php-resque": "1.3.6",
|
||||||
"matomo/device-detector": "4.2.3",
|
"matomo/device-detector": "4.3.1",
|
||||||
"utopia-php/orchestration": "0.2.1",
|
|
||||||
"dragonmantank/cron-expression": "3.1.0",
|
"dragonmantank/cron-expression": "3.1.0",
|
||||||
"influxdb/influxdb-php": "1.15.2",
|
"influxdb/influxdb-php": "1.15.2",
|
||||||
"phpmailer/phpmailer": "6.5.0",
|
"phpmailer/phpmailer": "6.5.1",
|
||||||
"chillerlan/php-qrcode": "4.3.0",
|
"chillerlan/php-qrcode": "4.3.1",
|
||||||
"adhocore/jwt": "1.1.2",
|
"adhocore/jwt": "1.1.2",
|
||||||
"slickdeals/statsd": "3.1.0"
|
"slickdeals/statsd": "3.1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"appwrite/sdk-generator": "0.15.2",
|
"appwrite/sdk-generator": "dev-feat-swift-templates",
|
||||||
"phpunit/phpunit": "9.5.6",
|
"phpunit/phpunit": "9.5.6",
|
||||||
"swoole/ide-helper": "4.6.7",
|
"swoole/ide-helper": "4.6.7",
|
||||||
"textalk/websocket": "1.5.2",
|
"textalk/websocket": "1.5.2",
|
||||||
|
|
191
composer.lock
generated
191
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "984640c83bc02c3253a0f38b5f772011",
|
"content-hash": "6658bcb6a570300242ac1d227052f1bf",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/jwt",
|
"name": "adhocore/jwt",
|
||||||
|
@ -115,16 +115,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "appwrite/php-runtimes",
|
"name": "appwrite/php-runtimes",
|
||||||
"version": "0.4.0",
|
"version": "0.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/php-runtimes.git",
|
"url": "https://github.com/appwrite/php-runtimes.git",
|
||||||
"reference": "cc7090a67d8824c779190b38873f0f8154f906b2"
|
"reference": "b4ca9786e6012c99db30baa752b55d935294ac5c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/php-runtimes/zipball/cc7090a67d8824c779190b38873f0f8154f906b2",
|
"url": "https://api.github.com/repos/appwrite/php-runtimes/zipball/b4ca9786e6012c99db30baa752b55d935294ac5c",
|
||||||
"reference": "cc7090a67d8824c779190b38873f0f8154f906b2",
|
"reference": "b4ca9786e6012c99db30baa752b55d935294ac5c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -164,22 +164,22 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/php-runtimes/issues",
|
"issues": "https://github.com/appwrite/php-runtimes/issues",
|
||||||
"source": "https://github.com/appwrite/php-runtimes/tree/0.4.0"
|
"source": "https://github.com/appwrite/php-runtimes/tree/0.6.0"
|
||||||
},
|
},
|
||||||
"time": "2021-06-23T07:17:12+00:00"
|
"time": "2021-10-06T13:26:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-qrcode",
|
"name": "chillerlan/php-qrcode",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/chillerlan/php-qrcode.git",
|
"url": "https://github.com/chillerlan/php-qrcode.git",
|
||||||
"reference": "4968063fb3baeedb658293f89f9673fbf2499a3e"
|
"reference": "be3beb936c21fe53a4e7e8f7f3582e9f02443666"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/4968063fb3baeedb658293f89f9673fbf2499a3e",
|
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/be3beb936c21fe53a4e7e8f7f3582e9f02443666",
|
||||||
"reference": "4968063fb3baeedb658293f89f9673fbf2499a3e",
|
"reference": "be3beb936c21fe53a4e7e8f7f3582e9f02443666",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phan/phan": "^3.2.2",
|
"phan/phan": "^3.2.2",
|
||||||
"phpunit/phpunit": "^9.4",
|
"phpunit/phpunit": "^9.5",
|
||||||
"setasign/fpdf": "^1.8.2"
|
"setasign/fpdf": "^1.8.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/chillerlan/php-qrcode/issues",
|
"issues": "https://github.com/chillerlan/php-qrcode/issues",
|
||||||
"source": "https://github.com/chillerlan/php-qrcode/tree/4.3.0"
|
"source": "https://github.com/chillerlan/php-qrcode/tree/4.3.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
"type": "ko_fi"
|
"type": "ko_fi"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-11-18T20:49:20+00:00"
|
"time": "2021-01-05T21:21:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-settings-container",
|
"name": "chillerlan/php-settings-container",
|
||||||
|
@ -519,16 +519,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
"version": "1.4.1",
|
"version": "1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/promises.git",
|
"url": "https://github.com/guzzle/promises.git",
|
||||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
"reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
"url": "https://api.github.com/repos/guzzle/promises/zipball/136a635e2b4a49b9d79e9c8fee267ffb257fdba0",
|
||||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
"reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -540,7 +540,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.4-dev"
|
"dev-master": "1.5-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -556,10 +556,25 @@
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "hello@gjcampbell.co.uk",
|
||||||
|
"homepage": "https://github.com/GrahamCampbell"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Michael Dowling",
|
"name": "Michael Dowling",
|
||||||
"email": "mtdowling@gmail.com",
|
"email": "mtdowling@gmail.com",
|
||||||
"homepage": "https://github.com/mtdowling"
|
"homepage": "https://github.com/mtdowling"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Nyholm",
|
||||||
|
"email": "tobias.nyholm@gmail.com",
|
||||||
|
"homepage": "https://github.com/Nyholm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Schultze",
|
||||||
|
"email": "webmaster@tubo-world.de",
|
||||||
|
"homepage": "https://github.com/Tobion"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Guzzle promises library",
|
"description": "Guzzle promises library",
|
||||||
|
@ -568,22 +583,36 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/promises/issues",
|
"issues": "https://github.com/guzzle/promises/issues",
|
||||||
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
"source": "https://github.com/guzzle/promises/tree/1.5.0"
|
||||||
},
|
},
|
||||||
"time": "2021-03-07T09:25:29+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/GrahamCampbell",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Nyholm",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-10-07T13:05:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7"
|
"reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1dc8d9cba3897165e16d12bb13d813afb1eb3fe7",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
|
||||||
"reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7",
|
"reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -607,7 +636,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0-dev"
|
"dev-master": "2.1-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -620,13 +649,34 @@
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "hello@gjcampbell.co.uk",
|
||||||
|
"homepage": "https://github.com/GrahamCampbell"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Michael Dowling",
|
"name": "Michael Dowling",
|
||||||
"email": "mtdowling@gmail.com",
|
"email": "mtdowling@gmail.com",
|
||||||
"homepage": "https://github.com/mtdowling"
|
"homepage": "https://github.com/mtdowling"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "George Mponos",
|
||||||
|
"email": "gmponos@gmail.com",
|
||||||
|
"homepage": "https://github.com/gmponos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Nyholm",
|
||||||
|
"email": "tobias.nyholm@gmail.com",
|
||||||
|
"homepage": "https://github.com/Nyholm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Márk Sági-Kazár",
|
||||||
|
"email": "mark.sagikazar@gmail.com",
|
||||||
|
"homepage": "https://github.com/sagikazarmark"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Tobias Schultze",
|
"name": "Tobias Schultze",
|
||||||
|
"email": "webmaster@tubo-world.de",
|
||||||
"homepage": "https://github.com/Tobion"
|
"homepage": "https://github.com/Tobion"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -648,9 +698,23 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/psr7/issues",
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
"source": "https://github.com/guzzle/psr7/tree/2.0.0"
|
"source": "https://github.com/guzzle/psr7/tree/2.1.0"
|
||||||
},
|
},
|
||||||
"time": "2021-06-30T20:03:07+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/GrahamCampbell",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Nyholm",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-10-06T17:43:30+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "influxdb/influxdb-php",
|
"name": "influxdb/influxdb-php",
|
||||||
|
@ -720,16 +784,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "matomo/device-detector",
|
"name": "matomo/device-detector",
|
||||||
"version": "4.2.3",
|
"version": "4.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/matomo-org/device-detector.git",
|
"url": "https://github.com/matomo-org/device-detector.git",
|
||||||
"reference": "d879f07496d6e6ee89cef5bcd925383d9b0c2cc0"
|
"reference": "88e5419ee1448ccb9537e287dd09836ff9d2de3b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/matomo-org/device-detector/zipball/d879f07496d6e6ee89cef5bcd925383d9b0c2cc0",
|
"url": "https://api.github.com/repos/matomo-org/device-detector/zipball/88e5419ee1448ccb9537e287dd09836ff9d2de3b",
|
||||||
"reference": "d879f07496d6e6ee89cef5bcd925383d9b0c2cc0",
|
"reference": "88e5419ee1448ccb9537e287dd09836ff9d2de3b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -785,7 +849,7 @@
|
||||||
"source": "https://github.com/matomo-org/matomo",
|
"source": "https://github.com/matomo-org/matomo",
|
||||||
"wiki": "https://dev.matomo.org/"
|
"wiki": "https://dev.matomo.org/"
|
||||||
},
|
},
|
||||||
"time": "2021-05-12T14:14:25+00:00"
|
"time": "2021-09-20T12:34:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mustangostang/spyc",
|
"name": "mustangostang/spyc",
|
||||||
|
@ -839,16 +903,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpmailer/phpmailer",
|
"name": "phpmailer/phpmailer",
|
||||||
"version": "v6.5.0",
|
"version": "v6.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c"
|
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -860,10 +924,12 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||||
"doctrine/annotations": "^1.2",
|
"doctrine/annotations": "^1.2",
|
||||||
|
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||||
|
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"squizlabs/php_codesniffer": "^3.5.6",
|
"squizlabs/php_codesniffer": "^3.6.0",
|
||||||
"yoast/phpunit-polyfills": "^0.2.0"
|
"yoast/phpunit-polyfills": "^1.0.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||||
|
@ -903,7 +969,7 @@
|
||||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0"
|
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -911,7 +977,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-06-16T14:33:43+00:00"
|
"time": "2021-08-18T09:14:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-client",
|
"name": "psr/http-client",
|
||||||
|
@ -1805,20 +1871,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/image",
|
"name": "utopia-php/image",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/image.git",
|
"url": "https://github.com/utopia-php/image.git",
|
||||||
"reference": "5b4ac25e70a95fa10b39c129b742ac66748d40b8"
|
"reference": "a7255ac9ea04eaa18b985e9acce30d407bfb8e79"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/image/zipball/5b4ac25e70a95fa10b39c129b742ac66748d40b8",
|
"url": "https://api.github.com/repos/utopia-php/image/zipball/a7255ac9ea04eaa18b985e9acce30d407bfb8e79",
|
||||||
"reference": "5b4ac25e70a95fa10b39c129b742ac66748d40b8",
|
"reference": "a7255ac9ea04eaa18b985e9acce30d407bfb8e79",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"chillerlan/php-qrcode": "4.3.0",
|
"chillerlan/php-qrcode": "4.3.1",
|
||||||
"ext-imagick": "*",
|
"ext-imagick": "*",
|
||||||
"php": ">=7.4"
|
"php": ">=7.4"
|
||||||
},
|
},
|
||||||
|
@ -1852,9 +1918,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/image/issues",
|
"issues": "https://github.com/utopia-php/image/issues",
|
||||||
"source": "https://github.com/utopia-php/image/tree/0.5.0"
|
"source": "https://github.com/utopia-php/image/tree/0.5.1"
|
||||||
},
|
},
|
||||||
"time": "2021-06-25T03:40:03+00:00"
|
"time": "2021-10-15T10:16:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/locale",
|
"name": "utopia-php/locale",
|
||||||
|
@ -2516,16 +2582,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "appwrite/sdk-generator",
|
"name": "appwrite/sdk-generator",
|
||||||
"version": "0.15.2",
|
"version": "dev-feat-swift-templates",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||||
"reference": "f42e70737d3b63fb8440111022c9509529a16479"
|
"reference": "cb7ed206fb3a63fa764db90d64f5b6316e466b73"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/f42e70737d3b63fb8440111022c9509529a16479",
|
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/cb7ed206fb3a63fa764db90d64f5b6316e466b73",
|
||||||
"reference": "f42e70737d3b63fb8440111022c9509529a16479",
|
"reference": "cb7ed206fb3a63fa764db90d64f5b6316e466b73",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2559,9 +2625,9 @@
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.15.2"
|
"source": "https://github.com/appwrite/sdk-generator/tree/feat-swift-templates"
|
||||||
},
|
},
|
||||||
"time": "2021-09-24T16:14:17+00:00"
|
"time": "2021-10-15T11:25:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/package-versions-deprecated",
|
"name": "composer/package-versions-deprecated",
|
||||||
|
@ -3559,16 +3625,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/type-resolver",
|
"name": "phpdocumentor/type-resolver",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||||
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f"
|
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f",
|
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
|
||||||
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f",
|
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3603,9 +3669,9 @@
|
||||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0"
|
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
|
||||||
},
|
},
|
||||||
"time": "2021-09-17T15:28:14+00:00"
|
"time": "2021-10-02T14:08:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpspec/prophecy",
|
"name": "phpspec/prophecy",
|
||||||
|
@ -4996,6 +5062,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"abandoned": true,
|
||||||
"time": "2020-09-28T06:45:17+00:00"
|
"time": "2020-09-28T06:45:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -6230,7 +6297,9 @@
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {
|
||||||
|
"appwrite/sdk-generator": 20
|
||||||
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createAnonymousSession() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let session):
|
||||||
|
print(String(describing: session)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createJWT() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let jwt):
|
||||||
|
print(String(describing: jwt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createMagicURLSession(
|
||||||
|
email: "email@example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createOAuth2Session(
|
||||||
|
provider: "amazon"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let success):
|
||||||
|
print(String(describing: success)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createRecovery(
|
||||||
|
email: "email@example.com",
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createSession(
|
||||||
|
email: "email@example.com",
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let session):
|
||||||
|
print(String(describing: session)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createVerification(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
docs/examples/0.10.x/client-apple/examples/account/create.md
Normal file
20
docs/examples/0.10.x/client-apple/examples/account/create.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.create(
|
||||||
|
email: "email@example.com",
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.deleteSession(
|
||||||
|
sessionId: "[SESSION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.deleteSessions() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
docs/examples/0.10.x/client-apple/examples/account/delete.md
Normal file
17
docs/examples/0.10.x/client-apple/examples/account/delete.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.delete() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getLogs() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let logList):
|
||||||
|
print(String(describing: logList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getPrefs() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let preferences):
|
||||||
|
print(String(describing: preferences)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getSession(
|
||||||
|
sessionId: "[SESSION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let session):
|
||||||
|
print(String(describing: session)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getSessions() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let sessionList):
|
||||||
|
print(String(describing: sessionList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
docs/examples/0.10.x/client-apple/examples/account/get.md
Normal file
17
docs/examples/0.10.x/client-apple/examples/account/get.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.get() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateEmail(
|
||||||
|
email: "email@example.com",
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateMagicURLSession(
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let session):
|
||||||
|
print(String(describing: session)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateName(
|
||||||
|
name: "[NAME]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updatePassword(
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updatePrefs(
|
||||||
|
prefs:
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateRecovery(
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]",
|
||||||
|
password: "password",
|
||||||
|
passwordAgain: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateVerification(
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getBrowser(
|
||||||
|
code: "aa"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getCreditCard(
|
||||||
|
code: "amex"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getFavicon(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getFlag(
|
||||||
|
code: "af"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getImage(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getInitials() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getQR(
|
||||||
|
text: "[TEXT]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let database = Database(client)
|
||||||
|
database.createDocument(
|
||||||
|
collectionId: "[COLLECTION_ID]",
|
||||||
|
data:
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let document):
|
||||||
|
print(String(describing: document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let database = Database(client)
|
||||||
|
database.deleteDocument(
|
||||||
|
collectionId: "[COLLECTION_ID]",
|
||||||
|
documentId: "[DOCUMENT_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let database = Database(client)
|
||||||
|
database.getDocument(
|
||||||
|
collectionId: "[COLLECTION_ID]",
|
||||||
|
documentId: "[DOCUMENT_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let document):
|
||||||
|
print(String(describing: document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let database = Database(client)
|
||||||
|
database.listDocuments(
|
||||||
|
collectionId: "[COLLECTION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let documentList):
|
||||||
|
print(String(describing: documentList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let database = Database(client)
|
||||||
|
database.updateDocument(
|
||||||
|
collectionId: "[COLLECTION_ID]",
|
||||||
|
documentId: "[DOCUMENT_ID]",
|
||||||
|
data:
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let document):
|
||||||
|
print(String(describing: document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let functions = Functions(client)
|
||||||
|
functions.createExecution(
|
||||||
|
functionId: "[FUNCTION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let execution):
|
||||||
|
print(String(describing: execution)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let functions = Functions(client)
|
||||||
|
functions.getExecution(
|
||||||
|
functionId: "[FUNCTION_ID]",
|
||||||
|
executionId: "[EXECUTION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let execution):
|
||||||
|
print(String(describing: execution)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let functions = Functions(client)
|
||||||
|
functions.listExecutions(
|
||||||
|
functionId: "[FUNCTION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let executionList):
|
||||||
|
print(String(describing: executionList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getContinents() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let continentList):
|
||||||
|
print(String(describing: continentList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getCountriesEU() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let countryList):
|
||||||
|
print(String(describing: countryList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getCountriesPhones() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let phoneList):
|
||||||
|
print(String(describing: phoneList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getCountries() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let countryList):
|
||||||
|
print(String(describing: countryList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getCurrencies() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let currencyList):
|
||||||
|
print(String(describing: currencyList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.getLanguages() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let languageList):
|
||||||
|
print(String(describing: languageList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
docs/examples/0.10.x/client-apple/examples/locale/get.md
Normal file
17
docs/examples/0.10.x/client-apple/examples/locale/get.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let locale = Locale(client)
|
||||||
|
locale.get() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let locale):
|
||||||
|
print(String(describing: locale)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.createFile(
|
||||||
|
file: File(name: "image.jpg", buffer: yourByteBuffer)
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let file):
|
||||||
|
print(String(describing: file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.deleteFile(
|
||||||
|
fileId: "[FILE_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.getFileDownload(
|
||||||
|
fileId: "[FILE_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.getFilePreview(
|
||||||
|
fileId: "[FILE_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.getFileView(
|
||||||
|
fileId: "[FILE_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.getFile(
|
||||||
|
fileId: "[FILE_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let file):
|
||||||
|
print(String(describing: file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.listFiles() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let fileList):
|
||||||
|
print(String(describing: fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let storage = Storage(client)
|
||||||
|
storage.updateFile(
|
||||||
|
fileId: "[FILE_ID]",
|
||||||
|
read: [],
|
||||||
|
write: []
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let file):
|
||||||
|
print(String(describing: file)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.createMembership(
|
||||||
|
teamId: "[TEAM_ID]",
|
||||||
|
email: "email@example.com",
|
||||||
|
roles: [],
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let membership):
|
||||||
|
print(String(describing: membership)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
docs/examples/0.10.x/client-apple/examples/teams/create.md
Normal file
19
docs/examples/0.10.x/client-apple/examples/teams/create.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.create(
|
||||||
|
name: "[NAME]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let team):
|
||||||
|
print(String(describing: team)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.deleteMembership(
|
||||||
|
teamId: "[TEAM_ID]",
|
||||||
|
membershipId: "[MEMBERSHIP_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
docs/examples/0.10.x/client-apple/examples/teams/delete.md
Normal file
19
docs/examples/0.10.x/client-apple/examples/teams/delete.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.delete(
|
||||||
|
teamId: "[TEAM_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.getMemberships(
|
||||||
|
teamId: "[TEAM_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let membershipList):
|
||||||
|
print(String(describing: membershipList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
docs/examples/0.10.x/client-apple/examples/teams/get.md
Normal file
19
docs/examples/0.10.x/client-apple/examples/teams/get.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.get(
|
||||||
|
teamId: "[TEAM_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let team):
|
||||||
|
print(String(describing: team)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
docs/examples/0.10.x/client-apple/examples/teams/list.md
Normal file
17
docs/examples/0.10.x/client-apple/examples/teams/list.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.list() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let teamList):
|
||||||
|
print(String(describing: teamList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.updateMembershipRoles(
|
||||||
|
teamId: "[TEAM_ID]",
|
||||||
|
membershipId: "[MEMBERSHIP_ID]",
|
||||||
|
roles: []
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let membership):
|
||||||
|
print(String(describing: membership)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.updateMembershipStatus(
|
||||||
|
teamId: "[TEAM_ID]",
|
||||||
|
membershipId: "[MEMBERSHIP_ID]",
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let membership):
|
||||||
|
print(String(describing: membership)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
docs/examples/0.10.x/client-apple/examples/teams/update.md
Normal file
20
docs/examples/0.10.x/client-apple/examples/teams/update.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
let teams = Teams(client)
|
||||||
|
teams.update(
|
||||||
|
teamId: "[TEAM_ID]",
|
||||||
|
name: "[NAME]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let team):
|
||||||
|
print(String(describing: team)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createRecovery(
|
||||||
|
email: "email@example.com",
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.createVerification(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.deleteSession(
|
||||||
|
sessionId: "[SESSION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.deleteSessions() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
docs/examples/0.10.x/server-swift/examples/account/delete.md
Normal file
18
docs/examples/0.10.x/server-swift/examples/account/delete.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.delete() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let ):
|
||||||
|
print(String(describing: )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getLogs() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let logList):
|
||||||
|
print(String(describing: logList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getPrefs() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let preferences):
|
||||||
|
print(String(describing: preferences)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getSession(
|
||||||
|
sessionId: "[SESSION_ID]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let session):
|
||||||
|
print(String(describing: session)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.getSessions() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let sessionList):
|
||||||
|
print(String(describing: sessionList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
docs/examples/0.10.x/server-swift/examples/account/get.md
Normal file
18
docs/examples/0.10.x/server-swift/examples/account/get.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.get() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateEmail(
|
||||||
|
email: "email@example.com",
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateName(
|
||||||
|
name: "[NAME]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updatePassword(
|
||||||
|
password: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updatePrefs(
|
||||||
|
prefs:
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let user):
|
||||||
|
print(String(describing: user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateRecovery(
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]",
|
||||||
|
password: "password",
|
||||||
|
passwordAgain: "password"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token
|
||||||
|
|
||||||
|
let account = Account(client)
|
||||||
|
account.updateVerification(
|
||||||
|
userId: "[USER_ID]",
|
||||||
|
secret: "[SECRET]"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let token):
|
||||||
|
print(String(describing: token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getBrowser(
|
||||||
|
code: "aa"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getCreditCard(
|
||||||
|
code: "amex"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getFavicon(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getFlag(
|
||||||
|
code: "af"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getImage(
|
||||||
|
url: "https://example.com"
|
||||||
|
) { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Appwrite
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
let client = Client()
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||||
|
|
||||||
|
let avatars = Avatars(client)
|
||||||
|
avatars.getInitials() { result in
|
||||||
|
switch result {
|
||||||
|
case .failure(let error):
|
||||||
|
print(error.message)
|
||||||
|
case .success(let byteBuffer):
|
||||||
|
print(String(describing: byteBuffer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue