import 'package:dart_appwrite/dart_appwrite.dart';

void main() { // Init SDK
  Client client = Client();
  Functions functions = Functions(client);

  client
    .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
    .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
  ;

  Future result = functions.listRuntimes();

  result
    .then((response) {
      print(response);
    }).catchError((error) {
      print(error.response);
  });
}


keep keep keep replace keep keep keep keep

<?php

namespace Appwrite\Utopia\Response\Model;

use Appwrite\Auth\Auth;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
use Utopia\Config\Config;
use Utopia\Database\Document;

class Project extends Model
{
    /**
     * @var bool
     */
    protected bool $public = false;

    public function __construct()
    {
        $this
            ->addRule('$id', [
                'type' => self::TYPE_STRING,
                'description' => 'Project ID.',
                'default' => '',
                'example' => '5e5ea5c16897e',
            ])
            ->addRule('$createdAt', [
                'type' => self::TYPE_DATETIME,
                'description' => 'Project creation date in ISO 8601 format.',
                'default' => '',
                'example' => self::TYPE_DATETIME_EXAMPLE,
            ])
            ->addRule('$updatedAt', [
                'type' => self::TYPE_DATETIME,
                'description' => 'Project update date in ISO 8601 format.',
                'default' => '',
                'example' => self::TYPE_DATETIME_EXAMPLE,
            ])
            ->addRule('name', [
                'type' => self::TYPE_STRING,
                'description' => 'Project name.',
                'default' => '',
                'example' => 'New Project',
            ])
            ->addRule('description', [
                'type' => self::TYPE_STRING,
                'description' => 'Project description.',
                'default' => '',
                'example' => 'This is a new project.',
            ])
            ->addRule('teamId', [
                'type' => self::TYPE_STRING,
                'description' => 'Project team ID.',
                'default' => '',
                'example' => '1592981250',
            ])
            ->addRule('logo', [
                'type' => self::TYPE_STRING,
                'description' => 'Project logo file ID.',
                'default' => '',
                'example' => '5f5c451b403cb',
            ])
            ->addRule('url', [
                'type' => self::TYPE_STRING,
                'description' => 'Project website URL.',
                'default' => '',
                'example' => '5f5c451b403cb',
            ])
            ->addRule('legalName', [
                'type' => self::TYPE_STRING,
                'description' => 'Company legal name.',
                'default' => '',
                'example' => 'Company LTD.',
            ])
            ->addRule('legalCountry', [
                'type' => self::TYPE_STRING,
                'description' => 'Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format.',
                'default' => '',
                'example' => 'US',
            ])
            ->addRule('legalState', [
                'type' => self::TYPE_STRING,
                'description' => 'State name.',
                'default' => '',
                'example' => 'New York',
            ])
            ->addRule('legalCity', [
                'type' => self::TYPE_STRING,
                'description' => 'City name.',
                'default' => '',
                'example' => 'New York City.',
            ])
            ->addRule('legalAddress', [
                'type' => self::TYPE_STRING,
                'description' => 'Company Address.',
                'default' => '',
                'example' => '620 Eighth Avenue, New York, NY 10018',
            ])
            ->addRule('legalTaxId', [
                'type' => self::TYPE_STRING,
                'description' => 'Company Tax ID.',
                'default' => '',
                'example' => '131102020',
            ])
            ->addRule('authDuration', [
                'type' => self::TYPE_INTEGER,
                'description' => 'Session duration in seconds.',
                'default' => Auth::TOKEN_EXPIRATION_LOGIN_LONG,
                'example' => 60,
            ])
            ->addRule('authLimit', [
                'type' => self::TYPE_INTEGER,
                'description' => 'Max users allowed. 0 is unlimited.',
                'default' => 0,
                'example' => 100,
            ])
            ->addRule('authSessionsLimit', [
                'type' => self::TYPE_INTEGER,
                'description' => 'Max sessions allowed per user. 100 maximum.',
                'default' => 10,
                'example' => 10,
            ])
            ->addRule('authPasswordHistory', [
                'type' => self::TYPE_INTEGER,
                'description' => 'Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.',
                'default' => 0,
                'example' => 5,
            ])
            ->addRule('authPasswordDictionary', [
                'type' => self::TYPE_BOOLEAN,
                'description' => 'Whether or not to check user\'s password against most commonly used passwords.',
                'default' => false,
                'example' => true,
            ])
            ->addRule('providers', [
                'type' => Response::MODEL_PROVIDER,
                'description' => 'List of Providers.',
                'default' => [],
                'example' => new \stdClass(),
                'array' => true,
            ])
            ->addRule('platforms', [
                'type' => Response::MODEL_PLATFORM,
                'description' => 'List of Platforms.',
                'default' => [],
                'example' => new \stdClass(),
                'array' => true,
            ])
            ->addRule('webhooks', [
                'type' => Response::MODEL_WEBHOOK,
                'description' => 'List of Webhooks.',
                'default' => [],
                'example' => new \stdClass(),
                'array' => true,
            ])
            ->addRule('keys', [
                'type' => Response::MODEL_KEY,
                'description' => 'List of API Keys.',
                'default' => [],
                'example' => new \stdClass(),
                'array' => true,
            ])
            ->addRule('domains', [
                'type' => Response::MODEL_DOMAIN,
                'description' => 'List of Domains.',
                'default' => [],
                'example' => new \stdClass(),
                'array' => true,
            ])
        ;

        $services = Config::getParam('services', []);
        $auth = Config::getParam('auth', []);

        foreach ($auth as $index => $method) {
            $name = $method['name'] ?? '';
            $key = $method['key'] ?? '';

            $this
                ->addRule('auth' . ucfirst($key), [
                    'type' => self::TYPE_BOOLEAN,
                    'description' => $name . ' auth method status',
                    'example' => true,
                    'default' => true,
                ])
            ;
        }

        foreach ($services as $service) {
            if (!$service['optional']) {
                continue;
            }

            $name = $service['name'] ?? '';
            $key = $service['key'] ?? '';

            $this
                ->addRule('serviceStatusFor' . ucfirst($key), [
                    'type' => self::TYPE_BOOLEAN,
                    'description' => $name . ' service status',
                    'example' => true,
                    'default' => true,
                ])
            ;
        }
    }

    /**
     * Get Name
     *
     * @return string
     */
    public function getName(): string
    {
        return 'Project';
    }

    /**
     * Get Type
     *
     * @return string
     */
    public function getType(): string
    {
        return Response::MODEL_PROJECT;
    }

    /**
     * Get Collection
     *
     * @return string
     */
    public function filter(Document $document): Document
    {
        // Services
        $values = $document->getAttribute('services', []);
        $services = Config::getParam('services', []);

        foreach ($services as $service) {
            if (!$service['optional']) {
                continue;
            }
            $key = $service['key'] ?? '';
            $value = $values[$key] ?? true;
            $document->setAttribute('serviceStatusFor' . ucfirst($key), $value);
        }

        // Auth
        $authValues = $document->getAttribute('auths', []);
        $auth = Config::getParam('auth', []);

        $document->setAttribute('authLimit', $authValues['limit'] ?? 0);
        $document->setAttribute('authDuration', $authValues['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG);
        $document->setAttribute('authSessionsLimit', $authValues['maxSessions'] ?? APP_LIMIT_USER_SESSIONS_DEFAULT);
        $document->setAttribute('authPasswordHistory', $authValues['passwordHistory'] ?? 0);
        $document->setAttribute('authPasswordDictionary', $authValues['passwordDictionary'] ?? false);

        foreach ($auth as $index => $method) {
            $key = $method['key'];
            $value = $authValues[$key] ?? true;
            $document->setAttribute('auth' . ucfirst($key), $value);
        }

        // Providers
        $providers = Config::getParam('providers', []);
        $providerValues = $document->getAttribute('authProviders', []);
        $projectProviders = [];

        foreach ($providers as $key => $provider) {
            if (!$provider['enabled']) {
                // Disabled by Appwrite configuration, exclude from response
                continue;
            }

            $projectProviders[] = new Document([
                'name' => ucfirst($key),
                'appId' => $providerValues[$key . 'Appid'] ?? '',
                'secret' => $providerValues[$key . 'Secret'] ?? '',
                'enabled' => $providerValues[$key . 'Enabled'] ?? false,
            ]);
        }

        $document->setAttribute("providers", $projectProviders);

        return $document;
    }
}


appwrite users getPrefs \
        --userId="[USER_ID]"


using Appwrite;

Client client = new Client();

client
  .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
  .SetProject("5df5acd0d48c2") // Your project ID
  .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
;

Database database = new Database(client);

HttpResponseMessage result = await database.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]");


import * as sdk from "https://deno.land/x/appwrite/mod.ts";

// Init SDK
let client = new sdk.Client();

let account = new sdk.Account(client);

client
    .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
    .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
;

let promise = account.get();

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});


<?php

return [ // Ordered by ABC.
    'amazon' => [
        'name' => 'Amazon',
        'developers' => 'https://developer.amazon.com/apps-and-games/services-and-apis',
        'icon' => 'icon-amazon',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'apple' => [
        'name' => 'Apple',
        'developers' => 'https://developer.apple.com/',
        'icon' => 'icon-apple',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'apple.phtml', // Preparation for adding ability to customized OAuth UI forms, currently handled hardcoded.
        'beta' => true,
        'mock' => false,
    ],
    'auth0' => [
        'name' => 'Auth0',
        'developers' => 'https://auth0.com/developers',
        'icon' => 'icon-auth0',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'auth0.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'authentik' => [
        'name' => 'Authentik',
        'developers' => 'https://goauthentik.io/docs/',
        'icon' => 'icon-authentik',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'authentik.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'autodesk' => [
        'name' => 'Autodesk',
        'developers' => 'https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/overview/',
        'icon' => 'icon-autodesk',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'bitbucket' => [
        'name' => 'BitBucket',
        'developers' => 'https://developer.atlassian.com/bitbucket',
        'icon' => 'icon-bitbucket',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'bitly' => [
        'name' => 'Bitly',
        'developers' => 'https://dev.bitly.com/v4_documentation.html',
        'icon' => 'icon-bitly',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'box' => [
        'name' => 'Box',
        'developers' => 'https://developer.box.com/reference/',
        'icon' => 'icon-box',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'dailymotion' => [
        'name' => 'Dailymotion',
        'developers' => 'https://developers.dailymotion.com/api/',
        'icon' => 'icon-dailymotion',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'discord' => [
        'name' => 'Discord',
        'developers' => 'https://discordapp.com/developers/docs/topics/oauth2',
        'icon' => 'icon-discord',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'disqus' => [
        'name' => 'Disqus',
        'developers' => 'https://disqus.com/api/docs/auth/',
        'icon' => 'icon-disqus',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'dropbox' => [
        'name' => 'Dropbox',
        'developers' => 'https://www.dropbox.com/developers/documentation',
        'icon' => 'icon-dropbox',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'etsy' => [
        'name' => 'Etsy',
        'developers' => 'https://developers.etsy.com/',
        'icon' => 'icon-etsy',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'facebook' => [
        'name' => 'Facebook',
        'developers' => 'https://developers.facebook.com/',
        'icon' => 'icon-facebook',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'github' => [
        'name' => 'GitHub',
        'developers' => 'https://developer.github.com/',
        'icon' => 'icon-github',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'gitlab' => [
        'name' => 'GitLab',
        'developers' => 'https://docs.gitlab.com/ee/api/',
        'icon' => 'icon-gitlab',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'gitlab.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'google' => [
        'name' => 'Google',
        'developers' => 'https://support.google.com/googleapi/answer/6158849',
        'icon' => 'icon-google',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'linkedin' => [
        'name' => 'LinkedIn',
        'developers' => 'https://developer.linkedin.com/',
        'icon' => 'icon-linkedin',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'microsoft' => [
        'name' => 'Microsoft',
        'developers' => 'https://developer.microsoft.com/en-us/',
        'icon' => 'icon-windows',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'microsoft.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'notion' => [
        'name' => 'Notion',
        'developers' => 'https://developers.notion.com/docs',
        'icon' => 'icon-notion',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'oidc' => [
        'name' => 'OpenID Connect',
        'developers' => 'https://openid.net/connect/faq/',
        'icon' => 'icon-oidc',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'oidc.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'okta' => [
        'name' => 'Okta',
        'developers' => 'https://developer.okta.com/',
        'icon' => 'icon-okta',
        'enabled' => true,
        'sandbox' => false,
        'form' => 'okta.phtml',
        'beta' => false,
        'mock' => false,
    ],
    'paypal' => [
        'name' => 'PayPal',
        'developers' => 'https://developer.paypal.com/docs/api/overview/',
        'icon' => 'icon-paypal',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'paypalSandbox' => [
        'name' => 'PayPal',
        'developers' => 'https://developer.paypal.com/docs/api/overview/',
        'icon' => 'icon-paypal',
        'enabled' => true,
        'sandbox' => true,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'podio' => [
        'name' => 'Podio',
        'developers' => 'https://developers.podio.com/doc/oauth-authorization',
        'icon' => 'icon-podio',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'salesforce' => [
        'name' => 'Salesforce',
        'developers' => 'https://developer.salesforce.com/docs/',
        'icon' => 'icon-salesforce',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'slack' => [
        'name' => 'Slack',
        'developers' => 'https://api.slack.com/',
        'icon' => 'icon-slack',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'spotify' => [
        'name' => 'Spotify',
        'developers' => 'https://developer.spotify.com/documentation/general/guides/authorization-guide/',
        'icon' => 'icon-spotify',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'stripe' => [
        'name' => 'Stripe',
        'developers' => 'https://stripe.com/docs/api',
        'icon' => 'icon-stripe',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'tradeshift' => [
        'name' => 'Tradeshift',
        'developers' => 'https://developers.tradeshift.com/docs/api',
        'icon' => 'icon-tradeshift',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'tradeshiftBox' => [
        'name' => 'Tradeshift',
        'developers' => 'https://developers.tradeshift.com/docs/api',
        'icon' => 'icon-tradeshiftbox',
        'enabled' => true,
        'sandbox' => true,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'twitch' => [
        'name' => 'Twitch',
        'developers' => 'https://dev.twitch.tv/docs/authentication',
        'icon' => 'icon-twitch',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'wordpress' => [
        'name' => 'WordPress',
        'developers' => 'https://developer.wordpress.com/docs/oauth2/',
        'icon' => 'icon-wordpress',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false
    ],
    'yahoo' => [
        'name' => 'Yahoo',
        'developers' => 'https://developer.yahoo.com/oauth2/guide/flows_authcode/',
        'icon' => 'icon-yahoo',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'yammer' => [
        'name' => 'Yammer',
        'developers' => 'https://docs.microsoft.com/en-us/rest/api/yammer/oauth-2/',
        'icon' => 'icon-yammer',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'yandex' => [
        'name' => 'Yandex',
        'developers' => 'https://tech.yandex.com/oauth/',
        'icon' => 'icon-yandex',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    'zoom' => [
        'name' => 'Zoom',
        'developers' => 'https://marketplace.zoom.us/docs/guides/auth/oauth/',
        'icon' => 'icon-zoom',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => false,
    ],
    // 'instagram' => [
    //     'name' => 'Instagram',
    //     'developers' => 'https://www.instagram.com/developer/',
    //     'icon' => 'icon-instagram',
    //     'enabled' => false,
    //     'beta' => false,
    //     'mock' => false,
    // ],
    // 'twitter' => [
    //     'name' => 'twitter',
    //     'developers' => 'https://developer.twitter.com/',
    //     'icon' => 'icon-twitter',
    //     'enabled' => false,
    //     'beta' => false,
    //     'mock' => false,
    // ],

    // Keep Last
    'mock' => [
        'name' => 'Mock',
        'developers' => 'https://appwrite.io',
        'icon' => 'icon-appwrite',
        'enabled' => true,
        'sandbox' => false,
        'form' => false,
        'beta' => false,
        'mock' => true,
    ],
];


from appwrite.client import Client
from appwrite.services.users import Users

client = Client()

(client
  .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
  .set_project('5df5acd0d48c2') # Your project ID
  .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)

users = Users(client)

result = users.delete('[USER_ID]')


<?php

use Appwrite\Client;
use Appwrite\Services\Users;

$client = new Client();

$client
    ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    ->setProject('5df5acd0d48c2') // Your project ID
    ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;

$users = new Users($client);

$result = $users->delete('[USER_ID]');


import 'package:appwrite/appwrite.dart';

void main() { // Init SDK
  Client client = Client();
  Database database = Database(client);

  client
    .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
  ;
  Future result = database.updateDocument(
    collectionId: '[COLLECTION_ID]',
    documentId: '[DOCUMENT_ID]',
    data: {},
  );

  result
    .then((response) {
      print(response);
    }).catchError((error) {
      print(error.response);
  });
}


'appId' => $providerValues[$key . 'Appid'] ?? '',

'secret' => $providerValues[$key . 'Secret'] ?? '',

'enabled' => $providerValues[$key . 'Enabled'] ?? false,

keep keep keep replace keep keep keep keep keep


require 'Appwrite'

include Appwrite

client = Client.new
    .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
    .set_project('5df5acd0d48c2') # Your project ID
    .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key

users = Users.new(client)

response = users.update_name(user_id: '[USER_ID]', name: '[NAME]')

puts response.inspect


import { Client, Avatars } from "appwrite";

const client = new Client();

const avatars = new Avatars(client);

client
    .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
;

const result = avatars.getQR('[TEXT]');

console.log(result); // Resource URL


from appwrite.client import Client
from appwrite.services.databases import Databases

client = Client()

(client
  .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
  .set_project('5df5acd0d48c2') # Your project ID
  .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)

databases = Databases(client)

result = databases.get_index('[DATABASE_ID]', '[COLLECTION_ID]', '')


mutation {
    accountUpdateSession(
        sessionId: "[SESSION_ID]"
    ) {
        _id
        _createdAt
        userId
        expire
        provider
        providerUid
        providerAccessToken
        providerAccessTokenExpiry
        providerRefreshToken
        ip
        osCode
        osName
        osVersion
        clientType
        clientCode
        clientName
        clientVersion
        clientEngine
        clientEngineVersion
        deviceName
        deviceBrand
        deviceModel
        countryCode
        countryName
        current
    }
}


import * as sdk from "https://deno.land/x/appwrite/mod.ts";

// Init SDK
let client = new sdk.Client();

let storage = new sdk.Storage(client);

client
    .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
    .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;

let promise = storage.listFiles();

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});


import { Client, Account } from "appwrite";

const client = new Client();

const account = new Account(client);

client
    .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
;

const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]');

promise.then(function (response) {
    console.log(response); // Success
}, function (error) {
    console.log(error); // Failure
});


foreach ($providers as $key => $provider) {

foreach ($response['body']['providers'] as $responseProvider) {

if ($responseProvider['name'] === ucfirst($key)) {

// On first provider, test enabled=false

$this->assertEquals($i !== 0, $responseProvider['enabled']);

keep keep keep keep replace keep keep keep

if ($responseProvider['key'] === $key) {


import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Users;

Client client = new Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("5df5acd0d48c2") // Your project ID
    .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Users users = new Users(client);

users.getPrefs(
    "[USER_ID]"
    new CoroutineCallback<>((result, error) -> {
        if (error != null) {
            error.printStackTrace();
            return;
        }

        System.out.println(result);
    })
);


import io.appwrite.Client
import io.appwrite.services.Functions

suspend fun main() {
    val client = Client(context)
      .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
      .setProject("5df5acd0d48c2") // Your project ID
      .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key

    val functions = Functions(client)
    val response = functions.update(
        functionId = "[FUNCTION_ID]",
        name = "[NAME]",
        execute = listOf(),
    )
    val json = response.body?.string()
}


import io.appwrite.Client
import io.appwrite.services.Databases

val client = Client(context)
    .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("5df5acd0d48c2") // Your project ID
    .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key

val databases = Databases(client)

val response = databases.createStringAttribute(
    databaseId = "[DATABASE_ID]",
    collectionId = "[COLLECTION_ID]",
    key = "",
    size = 1,
    required = false,
)


border: none
.justify
text-align: justify
aside.navigation-drawer
z-index: 1

keep keep keep keep replace replace replace keep

<template>
  <v-layout wrap>
    <v-container>
      <v-layout justify-center>
        <v-btn @click.stop="drawer = !drawer" color="pink" dark>Toggle</v-btn>
      </v-layout>
    </v-container>
    <v-navigation-drawer
      temporary
      v-model="drawer"
      :mini-variant="mini"
      dark
      absolute
    >
      <v-list class="pa-1">
        <v-list-tile v-if="mini" @click.stop="mini = !mini">
          <v-list-tile-action>
            <v-icon>chevron_right</v-icon>
          </v-list-tile-action>
        </v-list-tile>
        <v-list-tile avatar tag="div">
          <v-list-tile-avatar>
            <img src="https://randomuser.me/api/portraits/men/85.jpg" />
          </v-list-tile-avatar>
          <v-list-tile-content>
            <v-list-tile-title>John Leider</v-list-tile-title>
          </v-list-tile-content>
          <v-list-tile-action>
            <v-btn icon @click.stop="mini = !mini">
              <v-icon>chevron_left</v-icon>
            </v-btn>
          </v-list-tile-action>
        </v-list-tile>
      </v-list>
      <v-list class="pt-0" dense>
        <v-divider light></v-divider>
        <v-list-tile v-for="item in items" :key="item.title" @click="">
          <v-list-tile-action>
            <v-icon>{{ item.icon }}</v-icon>
          </v-list-tile-action>
          <v-list-tile-content>
            <v-list-tile-title>{{ item.title }}</v-list-tile-title>
          </v-list-tile-content>
        </v-list-tile>
      </v-list>
    </v-navigation-drawer>
  </v-layout>
</template>

<script>
  export default {
    data () {
      return {
        drawer: null,
        items: [
          { title: 'Home', icon: 'dashboard' },
          { title: 'About', icon: 'question_answer' }
        ],
        mini: false,
        right: null
      }
    }
  }
</script>


// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`VItem should match snapshot activeClass 1`] = `

<div class>
</div>

`;

exports[`VItem should match snapshot activeClass 2`] = `

<div class="foo">
</div>

`;


<template lang="pug">
  component-view(v-bind:doc="doc")
</template>


<template lang="pug">
  doc-view(id="colors-view")
    v-layout(row wrap)
      v-flex(xs12 sm8 md12)
        section-def
          dt(slot="title") {{ doc.title }}
          dd(slot="desc") {{ doc.desc }}
      ad
    section.mb-5
      section-header Classes
      section-text You can change a background or text color by adding a class to the element. For background, use just the name, for example, <div class="red">. To use a shade, just add the modifying type, such as, darken-3. Text is very similar, adding a modification class, red--text, you can change the color of text, or change the type with adding text--lighten-2. For some elements like the v-badge, you can use the --after type for the background, <span class="green--after" v-badge:5>.
      div.colors
        v-container(fluid).pa-0
          v-layout(row wrap)
            v-flex(xs6 sm6 md4 lg3 v-for="color in colors" v-bind:key="color")
              v-card(v-bind:class="[color]" height="100px")
                v-card-text
                  h3 {{ color }}
              v-card(
                v-for="n in [4,3,2,1]"
                v-bind:class="[color, 'lighten-' + n]"
                class="black--text"
                v-bind:key="n"
              )
                v-card-text {{ color }} lighten-{{ n }}
              v-card(
                v-for="n in 4"
                v-bind:class="[color, 'darken-' + n]"
                v-bind:key="n"
              )
                v-card-text {{ color }} darken-{{ n }}
              v-card(
                v-for="n in 4"
                v-bind:class="[color, 'accent-' + n]"
                v-if="['grey', 'blue-grey', 'brown'].indexOf(color) === -1"
                class="black--text"
                v-bind:key="n"
              )
                v-card-text {{ color }} accent-{{ n }}

    v-divider.my-5

    section#color-pack
      section-header Color Pack
      section-text Vuetify comes pre-built with a Material Design Color Pack (thanks Materialize.css) by default. While convenient, this also increases the css export size by ~30kb. This can be disabled in both the webpack and webpack-ssr Vue cli templates.
      div(class="title pt-3 pb-3") Webpack
      section-text Navigate to src/App.vue. Scroll to the style element and set $color-pack = false above the Vuetify css import.

      div(class="title pt-3 pb-3") Webpack-SSR
      section-text Navigate to src/stylus/main.styl. At the top of the file, declare $color-pack = false.
</template>


<template lang="pug">
  section.component-example(:id="id")
    //- Section header
    h3(v-if="header").title.layout.align-center.mb-3
      router-link(
        :to="{ hash: id }"
        v-if="id"
        style="text-decoration: none;"
      ).mr-2
        v-icon(color="accent") mdi-pound
      span(v-text="header")

    //- Description
    markdown(v-if="desc" :source="desc")

    v-card(:class="{ 'elevation-0': readonly }").mt-4
      //- Example options
      v-toolbar(flat dense card v-if="!readonly").pr-1
        v-spacer
        v-tooltip(top v-if="hasInverted")
          v-btn(icon slot="activator" @click="invertedProxy = !invertedProxy")
            v-icon(color="grey darken-1") invert_colors
          span Invert colors
        v-tooltip(top)
          v-btn(
            icon
            tag="a"
            :href="`https://github.com/vuetifyjs/vuetifyjs.com/tree/master/examples/${file}.vue`"
            target="_blank"
            slot="activator"
          )
            v-icon(color="grey darken-1") fa-github
          span View on Github
        v-tooltip(top)
          v-btn(
            icon
            @click="sendToCodepen"
            slot="activator"
          )
            v-icon(color="grey darken-1") fa-codepen
          span Edit in codepen
        v-tooltip(top)
          v-btn(
            icon
            @click.stop="panel = !panel"
            slot="activator"
          )
            v-icon(color="grey darken-1") code
          span View source

      //- Example markup
      v-expansion-panel.elevation-0
        v-expansion-panel-content(v-model="panel")
          v-divider(v-if="!readonly")
          v-tabs(
            ref="tabs"
            color="grey lighten-4"
            v-show="!readonly"
          )
            v-tab(
              v-for="tab in tabs"
              :key="tab"
              v-show="parsed[tab]"
              active-class=""
              class="body-2"
            ) {{ tab }}
            v-tabs-items(class="grey lighten-3")
              v-tab-item(v-for="tab in tabs" :key="tab")
                markup(:lang="getLang(tab)" v-if="parsed[tab]").ma-0
                  | {{ parsed[tab] }}

      v-divider(v-if="!readonly")

      //- Example mount
      div(data-app :class="exampleClasses").application.application--example.pa-3
        component(:is="component")

    //- Codepen
    codepen(ref="codepen" :pen="parsed")
</template>

<script>
  import Vue from 'vue'
  const release = process.env.RELEASE

  export default {
    data () {
      return {
        tabs: ['template', 'script', 'style'],
        component: null,
        invertedProxy: this.inverted,
        panel: false,
        parsed: {
          script: null,
          style: null,
          template: null
        },
        url: release ? `releases/${release}/` : ''
      }
    },

    props: {
      active: Boolean,
      hasInverted: Boolean,
      file: String,
      header: String,
      desc: String,
      inverted: Boolean,
      newIn: String,
      id: String,
      readonly: Boolean
    },

    computed: {
      currentColor () {
        return this.$store.state.currentColor
      },
      exampleClasses () {
        return {
          'theme--dark': this.invertedProxy,
          'theme--light': !this.invertedProxy,
          'grey lighten-3': !this.invertedProxy
        }
      }
    },

    watch: {
      panel () {
        this.$nextTick(this.$refs.tabs.callSlider)
      }
    },

    created () {
      if (this.active || this.readonly) {
        this.panel = true
      }
    },

    mounted () {
      import(
        /* webpackChunkName: "examples" */
        /* webpackMode: "lazy-once" */
        `../../examples/${this.file}.vue`
      ).then(comp => {
        this.component = comp.default
      })

      import(
        /* webpackChunkName: "examples-source" */
        /* webpackMode: "lazy-once" */
        `!raw-loader!../../examples/${this.file}.vue`
        ).then(this.boot)
    },

    beforeDestroy () {
      this.instance && this.instance.$destroy()
    },

    methods: {
      getLang (tab) {
        if (tab === 'script') return 'js'
        if (tab === 'style') return 'css'
        return 'vue'
      },
      parseTemplate (target, template) {
        const string = `(<${target}(.*)?>[\\w\\W]*<\\/${target}>)`
        const regex = new RegExp(string, 'g')
        const parsed = regex.exec(template) || []

        return parsed[1] || ''
      },
      boot (res) {
        const template = this.parseTemplate('template', res)
        const script = this.parseTemplate('script', res)
        const style = this.parseTemplate('style', res)

        this.parsed = {
          template,
          script,
          style
        }
      },
      toggle () {
        this.active = !this.active
      },
      sendToCodepen () {
        this.$refs.codepen.submit()
      }
    }
  }
</script>

<style lang="stylus">
  @import '~vuetify/src/stylus/settings/_variables.styl'

  .component-example
    // margin-bottom: 32px

    .application--example
      position: relative
      transition: .3s $transition.swing
      overflow: hidden

      > div,
      > form,
      > footer
        width: 100%

    .component-example__panel
      .expansion-panel__body
        border: none

      .tabs__item, .markup
        height: 100%

      .tabs__items
        border: none
        max-height: 500px
        overflow-y: auto

      > li
        border: none

    .justify
      text-align: justify

    aside.navigation-drawer
      z-index: 1

    .overlay
      z-index: 0

    nav.toolbar
      z-index: 0
</style>


export default {
  dataIterator: {
    rowsPerPageText: 'Items per page:',
    rowsPerPageAll: 'All',
    pageText: '{0}-{1} of {2}',
    noResultsText: 'No matching records found',
    nextPage: 'Next page',
    prevPage: 'Previous page'
  },
  dataTable: {
    rowsPerPageText: 'Rows per page:'
  },
  noDataText: 'No data available'
}


<template>
  <v-container fluid>
    <v-layout row wrap>
      <v-flex xs12 md6>
        <v-subheader>Light</v-subheader>
        <v-card class="elevation-0">
          <v-card-text>
            <v-container fluid>
              <v-layout row wrap class="dark--text">
                <v-flex xs6>on</v-flex>
                <v-flex xs6>off</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-radio value="radio-1" input-value="radio-1"></v-radio>
                </v-flex>
                <v-flex xs6>
                  <v-radio input-value="radio-2"></v-radio>
                </v-flex>
              </v-layout>
              <v-layout row wrap class="dark--text">
                <v-flex xs6>on disabled</v-flex>
                <v-flex xs6>off disabled</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-radio value="radio-3" input-value="radio-3" disabled></v-radio>
                </v-flex>
                <v-flex xs6>
                  <v-radio input-value="radio-4" disabled></v-radio>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-flex>
      <v-flex xs12 md6>
        <v-subheader>Dark</v-subheader>
        <v-card dark class="secondary elevation-0">
          <v-card-text>
            <v-container fluid>
              <v-layout row wrap class="light--text">
                <v-flex xs6>on</v-flex>
                <v-flex xs6>off</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-radio value="radio-5" input-value="radio-5" dark></v-radio>
                </v-flex>
                <v-flex xs6>
                  <v-radio input-value="radio-6" dark></v-radio>
                </v-flex>
              </v-layout>
              <v-layout row wrap class="light--text">
                <v-flex xs6>on disabled</v-flex>
                <v-flex xs6>off disabled</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-radio value="radio-7" input-value="radio-7" dark disabled></v-radio>
                </v-flex>
                <v-flex xs6>
                  <v-radio input-value="radio-8" dark disabled></v-radio>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-flex>
    </v-layout>
  </v-container>
</template>


<template>
  <v-data-table
      v-bind:headers="headers"
      :items="items"
      class="elevation-1"
      hide-actions
      dark
    >
    <template slot="items" slot-scope="props">
      {{ props.item.name }}
      {{ props.item.calories }}
      {{ props.item.fat }}
      {{ props.item.carbs }}
      {{ props.item.protein }}
      {{ props.item.sodium }}
      {{ props.item.calcium }}
      {{ props.item.iron }}
    </template>
  </v-data-table>
</template>


.overlay
z-index: 0
nav.toolbar
z-index: 0
</style>


<template>
  <div class="text-xs-center">
    <v-btn outline class="indigo--text">Outline Button</v-btn>
    <v-btn outline fab class="teal--text">
      <v-icon>list</v-icon>
    </v-btn>
    <v-btn outline large fab class="indigo--text">
      <v-icon>edit</v-icon>
    </v-btn>
  </div>
</template>


<template>
  <v-layout row justify-center>
    <v-dialog v-model="dialog" persistent>
      <v-btn primary dark slot="activator">Open Dialog</v-btn>
      <v-card>
        <v-card-title class="headline">Use Google's location service?</v-card-title>
        <v-card-text>Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.</v-card-text>
        <v-card-actions>
          <v-spacer></v-spacer>
          <v-btn class="green--text darken-1" flat="flat" @click.native="dialog = false">Disagree</v-btn>
          <v-btn class="green--text darken-1" flat="flat" @click.native="dialog = false">Agree</v-btn>
        </v-card-actions>
      </v-card>
    </v-dialog>
  </v-layout>
</template>

<script>
  export default {
    data () {
      return {
        dialog: false
      }
    }
  }
</script>


<v-btn @click.stop="drawer = !drawer" color="pink" dark>Toggle</v-btn>


<template>
  <v-container fluid>
    <v-layout row wrap>
      <v-flex xs12 md6>
        <v-subheader>Light</v-subheader>
        <v-card class="elevation-0">
          <v-card-text>
            <v-container fluid>
              <v-layout row wrap class="dark--text">
                <v-flex xs6>on</v-flex>
                <v-flex xs6>off</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-switch value input-value="true" ></v-switch>
                </v-flex>
                <v-flex xs6>
                  <v-switch ></v-switch>
                </v-flex>
              </v-layout>
              <v-layout row wrap class="dark--text">
                <v-flex xs6>on disabled</v-flex>
                <v-flex xs6>off disabled</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-switch value input-value="true" disabled></v-switch>
                </v-flex>
                <v-flex xs6>
                  <v-switch disabled></v-switch>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-flex>
      <v-flex xs12 md6>
        <v-subheader>Dark</v-subheader>
        <v-card dark class="secondary elevation-0">
          <v-card-text>
            <v-container fluid>
              <v-layout row wrap class="light--text">
                <v-flex xs6>on</v-flex>
                <v-flex xs6>off</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-switch value input-value="true" dark></v-switch>
                </v-flex>
                <v-flex xs6>
                  <v-switch dark></v-switch>
                </v-flex>
              </v-layout>
              <v-layout row wrap class="light--text">
                <v-flex xs6>on disabled</v-flex>
                <v-flex xs6>off disabled</v-flex>
              </v-layout>
              <v-layout row wrap>
                <v-flex xs6>
                  <v-switch value input-value="true" dark disabled></v-switch>
                </v-flex>
                <v-flex xs6>
                  <v-switch dark disabled></v-switch>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-flex>
    </v-layout>
  </v-container>
</template>


<template>
  <v-layout row>
    <v-flex xs12 sm6 offset-sm3>
      <v-card>
        <v-toolbar class="light-blue" dark>
          <v-toolbar-side-icon></v-toolbar-side-icon>
          <v-toolbar-title>My files</v-toolbar-title>
          <v-spacer></v-spacer>
          <v-btn icon>
            <v-icon>search</v-icon>
          </v-btn>
          <v-btn icon>
            <v-icon>view_module</v-icon>
          </v-btn>
        </v-toolbar>
        <v-list two-line subheader>
          <v-subheader inset>Folders</v-subheader>
          <v-list-tile avatar v-for="item in items" v-bind:key="item.title" @click="">
            <v-list-tile-avatar>
              <v-icon v-bind:class="[item.iconClass]">{{ item.icon }}</v-icon>
            </v-list-tile-avatar>
            <v-list-tile-content>
              <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              <v-list-tile-sub-title>{{ item.subtitle }}</v-list-tile-sub-title>
            </v-list-tile-content>
            <v-list-tile-action>
              <v-btn icon ripple>
                <v-icon class="grey--text text--lighten-1">info</v-icon>
              </v-btn>
            </v-list-tile-action>
          </v-list-tile>
          <v-divider inset></v-divider>
          <v-subheader inset>Files</v-subheader>
          <v-list-tile v-for="item in items2" v-bind:key="item.title" avatar @click="">
            <v-list-tile-avatar>
              <v-icon v-bind:class="[item.iconClass]">{{ item.icon }}</v-icon>
            </v-list-tile-avatar>
            <v-list-tile-content>
              <v-list-tile-title>{{ item.title }}</v-list-tile-title>
              <v-list-tile-sub-title>{{ item.subtitle }}</v-list-tile-sub-title>
            </v-list-tile-content>
            <v-list-tile-action>
              <v-btn icon ripple>
                <v-icon class="grey--text text--lighten-1">info</v-icon>
              </v-btn>
            </v-list-tile-action>
          </v-list-tile>
        </v-list>
      </v-card>
    </v-flex>
  </v-layout>
</template>

<script>
  export default {
    data () {
      return {
        items: [
          { icon: 'folder', iconClass: 'grey lighten-1 white--text', title: 'Photos', subtitle: 'Jan 9, 2014' },
          { icon: 'folder', iconClass: 'grey lighten-1 white--text', title: 'Recipes', subtitle: 'Jan 17, 2014' },
          { icon: 'folder', iconClass: 'grey lighten-1 white--text', title: 'Work', subtitle: 'Jan 28, 2014' }
        ],
        items2: [
          { icon: 'assignment', iconClass: 'blue white--text', title: 'Vacation itinerary', subtitle: 'Jan 20, 2014' },
          { icon: 'call_to_action', iconClass: 'amber white--text', title: 'Kitchen remodel', subtitle: 'Jan 10, 2014' },
        ]
      }
    }
  }
</script>


<template>
  <div>
    <v-progress-linear value="15" height="2" secondary></v-progress-linear>

    <v-progress-linear value="30" height="5" success></v-progress-linear>

    <v-progress-linear value="45" height="10" info></v-progress-linear>

    <v-progress-linear value="60" height="15" warning></v-progress-linear>

    <v-progress-linear value="75" height="20" error></v-progress-linear>
  </div>
</template>


<v-btn @click.stop="drawer = !drawer" dark color="pink">Toggle</v-btn>