├── src └── Appwrite │ ├── Service.php │ └── ID.php ├── .github └── workflows │ └── autoclose.yml ├── docs ├── examples │ ├── account │ │ ├── create-jwt.md │ │ ├── create-anonymous-session.md │ │ ├── get.md │ │ ├── create-session.md │ │ ├── get-prefs.md │ │ ├── create-phone-token.md │ │ ├── list-sessions.md │ │ ├── update-status.md │ │ ├── delete-sessions.md │ │ ├── list-mfa-factors.md │ │ ├── update-phone-session.md │ │ ├── update-magic-url-session.md │ │ ├── get-mfa-recovery-codes.md │ │ ├── update-mfa.md │ │ ├── create-mfa-recovery-codes.md │ │ ├── create-phone-verification.md │ │ ├── update-mfa-recovery-codes.md │ │ ├── update-name.md │ │ ├── create-email-password-session.md │ │ ├── get-session.md │ │ ├── delete-session.md │ │ ├── update-session.md │ │ ├── create-mfa-challenge.md │ │ ├── delete-identity.md │ │ ├── create-email-token.md │ │ ├── create-verification.md │ │ ├── create.md │ │ ├── create-email-verification.md │ │ ├── list-logs.md │ │ ├── update-phone.md │ │ ├── update-email.md │ │ ├── list-identities.md │ │ ├── update-password.md │ │ ├── update-verification.md │ │ ├── create-recovery.md │ │ ├── update-mfa-challenge.md │ │ ├── update-email-verification.md │ │ ├── update-phone-verification.md │ │ ├── update-recovery.md │ │ ├── create-magic-url-token.md │ │ ├── create-mfa-authenticator.md │ │ ├── delete-mfa-authenticator.md │ │ ├── update-mfa-authenticator.md │ │ ├── update-prefs.md │ │ └── create-o-auth-2-token.md │ ├── health │ │ ├── get.md │ │ ├── get-db.md │ │ ├── get-time.md │ │ ├── get-cache.md │ │ ├── get-pub-sub.md │ │ ├── get-storage.md │ │ ├── get-antivirus.md │ │ ├── get-storage-local.md │ │ ├── get-certificate.md │ │ ├── get-queue-logs.md │ │ ├── get-queue-mails.md │ │ ├── get-queue-usage.md │ │ ├── get-queue-builds.md │ │ ├── get-queue-deletes.md │ │ ├── get-queue-webhooks.md │ │ ├── get-queue-functions.md │ │ ├── get-queue-messaging.md │ │ ├── get-queue-migrations.md │ │ ├── get-queue-certificates.md │ │ ├── get-queue-stats-resources.md │ │ ├── get-queue-databases.md │ │ └── get-failed-jobs.md │ ├── locale │ │ ├── get.md │ │ ├── list-codes.md │ │ ├── list-countries.md │ │ ├── list-languages.md │ │ ├── list-continents.md │ │ ├── list-countries-eu.md │ │ ├── list-currencies.md │ │ └── list-countries-phones.md │ ├── sites │ │ ├── list-frameworks.md │ │ ├── get.md │ │ ├── delete.md │ │ ├── list-specifications.md │ │ ├── list-variables.md │ │ ├── get-log.md │ │ ├── delete-log.md │ │ ├── get-variable.md │ │ ├── delete-variable.md │ │ ├── get-deployment.md │ │ ├── delete-deployment.md │ │ ├── list-logs.md │ │ ├── update-site-deployment.md │ │ ├── list.md │ │ ├── update-deployment-status.md │ │ ├── create-duplicate-deployment.md │ │ ├── create-variable.md │ │ ├── list-deployments.md │ │ ├── update-variable.md │ │ ├── get-deployment-download.md │ │ └── create-vcs-deployment.md │ ├── users │ │ ├── get.md │ │ ├── delete.md │ │ ├── get-prefs.md │ │ ├── create-session.md │ │ ├── delete-sessions.md │ │ ├── list-mfa-factors.md │ │ ├── delete-identity.md │ │ ├── get-mfa-recovery-codes.md │ │ ├── update-mfa.md │ │ ├── create-mfa-recovery-codes.md │ │ ├── update-labels.md │ │ ├── update-mfa-recovery-codes.md │ │ ├── update-name.md │ │ ├── update-prefs.md │ │ ├── update-password.md │ │ ├── update-status.md │ │ ├── get-target.md │ │ ├── update-phone.md │ │ ├── delete-target.md │ │ ├── list-sessions.md │ │ ├── update-email.md │ │ ├── delete-session.md │ │ ├── list-logs.md │ │ ├── update-email-verification.md │ │ ├── update-phone-verification.md │ │ ├── create-token.md │ │ ├── list-targets.md │ │ ├── list.md │ │ ├── create-jwt.md │ │ ├── list-identities.md │ │ ├── delete-mfa-authenticator.md │ │ ├── create-md-5-user.md │ │ ├── create-argon-2-user.md │ │ ├── create-bcrypt-user.md │ │ ├── create-ph-pass-user.md │ │ ├── list-memberships.md │ │ ├── create.md │ │ ├── update-target.md │ │ ├── create-sha-user.md │ │ └── create-target.md │ ├── graphql │ │ ├── query.md │ │ └── mutation.md │ ├── functions │ │ ├── list-runtimes.md │ │ ├── list-specifications.md │ │ ├── get.md │ │ ├── delete.md │ │ ├── list-variables.md │ │ ├── get-variable.md │ │ ├── delete-variable.md │ │ ├── get-deployment.md │ │ ├── delete-execution.md │ │ ├── get-execution.md │ │ ├── delete-deployment.md │ │ ├── list.md │ │ ├── update-deployment-status.md │ │ ├── update-function-deployment.md │ │ ├── list-executions.md │ │ ├── create-variable.md │ │ ├── create-duplicate-deployment.md │ │ ├── list-deployments.md │ │ ├── update-variable.md │ │ ├── create-vcs-deployment.md │ │ ├── get-deployment-download.md │ │ └── create-deployment.md │ ├── teams │ │ ├── get.md │ │ ├── delete.md │ │ ├── get-prefs.md │ │ ├── update-prefs.md │ │ ├── update-name.md │ │ ├── create.md │ │ ├── get-membership.md │ │ ├── delete-membership.md │ │ ├── list.md │ │ ├── update-membership.md │ │ ├── list-memberships.md │ │ ├── update-membership-status.md │ │ └── create-membership.md │ ├── tokens │ │ ├── get.md │ │ ├── delete.md │ │ ├── update.md │ │ ├── create-file-token.md │ │ └── list.md │ ├── tablesdb │ │ ├── get.md │ │ ├── delete.md │ │ ├── create-transaction.md │ │ ├── list-transactions.md │ │ ├── get-transaction.md │ │ ├── delete-transaction.md │ │ ├── get-table.md │ │ ├── delete-table.md │ │ ├── get-column.md │ │ ├── get-index.md │ │ ├── create.md │ │ ├── delete-index.md │ │ ├── update.md │ │ ├── delete-column.md │ │ ├── list.md │ │ ├── update-transaction.md │ │ ├── list-columns.md │ │ ├── list-indexes.md │ │ ├── create-rows.md │ │ ├── upsert-rows.md │ │ ├── list-tables.md │ │ ├── delete-row.md │ │ ├── delete-rows.md │ │ ├── create-point-column.md │ │ ├── update-ip-column.md │ │ ├── create-line-column.md │ │ ├── get-row.md │ │ ├── update-boolean-column.md │ │ ├── update-datetime-column.md │ │ ├── update-rows.md │ │ ├── create-ip-column.md │ │ ├── create-polygon-column.md │ │ ├── list-rows.md │ │ ├── update-email-column.md │ │ ├── update-point-column.md │ │ ├── update-url-column.md │ │ ├── create-boolean-column.md │ │ ├── create-datetime-column.md │ │ ├── create-email-column.md │ │ ├── create-url-column.md │ │ ├── update-enum-column.md │ │ ├── update-line-column.md │ │ ├── update-string-column.md │ │ ├── create-enum-column.md │ │ ├── update-polygon-column.md │ │ ├── create-index.md │ │ ├── update-float-column.md │ │ ├── update-relationship-column.md │ │ ├── update-integer-column.md │ │ ├── create-float-column.md │ │ ├── create-string-column.md │ │ ├── decrement-row-column.md │ │ ├── increment-row-column.md │ │ └── create-integer-column.md │ ├── databases │ │ ├── get.md │ │ ├── delete.md │ │ ├── create-transaction.md │ │ ├── list-transactions.md │ │ ├── get-transaction.md │ │ ├── delete-transaction.md │ │ ├── get-collection.md │ │ ├── create.md │ │ ├── update.md │ │ ├── delete-collection.md │ │ ├── get-index.md │ │ ├── delete-index.md │ │ ├── list.md │ │ ├── get-attribute.md │ │ ├── delete-attribute.md │ │ ├── update-transaction.md │ │ ├── list-indexes.md │ │ ├── list-attributes.md │ │ ├── list-collections.md │ │ ├── create-documents.md │ │ ├── upsert-documents.md │ │ ├── delete-documents.md │ │ ├── create-point-attribute.md │ │ ├── delete-document.md │ │ ├── update-ip-attribute.md │ │ ├── create-line-attribute.md │ │ ├── update-datetime-attribute.md │ │ ├── create-ip-attribute.md │ │ ├── update-boolean-attribute.md │ │ ├── update-documents.md │ │ ├── create-polygon-attribute.md │ │ ├── update-point-attribute.md │ │ ├── update-url-attribute.md │ │ ├── create-boolean-attribute.md │ │ ├── create-datetime-attribute.md │ │ ├── get-document.md │ │ ├── list-documents.md │ │ ├── update-email-attribute.md │ │ ├── create-email-attribute.md │ │ ├── create-url-attribute.md │ │ ├── update-enum-attribute.md │ │ ├── update-line-attribute.md │ │ ├── update-string-attribute.md │ │ ├── create-enum-attribute.md │ │ ├── update-polygon-attribute.md │ │ ├── create-index.md │ │ ├── update-float-attribute.md │ │ ├── update-relationship-attribute.md │ │ ├── update-integer-attribute.md │ │ ├── create-float-attribute.md │ │ └── create-string-attribute.md │ ├── storage │ │ ├── get-bucket.md │ │ ├── delete-bucket.md │ │ ├── get-file.md │ │ ├── delete-file.md │ │ ├── get-file-view.md │ │ ├── list-buckets.md │ │ ├── get-file-download.md │ │ ├── list-files.md │ │ ├── update-file.md │ │ └── create-file.md │ ├── messaging │ │ ├── delete.md │ │ ├── get-topic.md │ │ ├── delete-topic.md │ │ ├── get-message.md │ │ ├── get-provider.md │ │ ├── delete-provider.md │ │ ├── get-subscriber.md │ │ ├── delete-subscriber.md │ │ ├── create-topic.md │ │ ├── list-targets.md │ │ ├── list-topic-logs.md │ │ ├── list-topics.md │ │ ├── list-message-logs.md │ │ ├── list-messages.md │ │ ├── list-providers.md │ │ ├── update-topic.md │ │ ├── list-provider-logs.md │ │ ├── create-subscriber.md │ │ ├── list-subscriber-logs.md │ │ ├── list-subscribers.md │ │ ├── create-fcm-provider.md │ │ ├── update-fcm-provider.md │ │ ├── create-sms.md │ │ ├── update-sms.md │ │ ├── create-vonage-provider.md │ │ ├── create-msg-91-provider.md │ │ ├── create-telesign-provider.md │ │ ├── create-textmagic-provider.md │ │ ├── update-vonage-provider.md │ │ ├── create-twilio-provider.md │ │ ├── update-telesign-provider.md │ │ ├── update-textmagic-provider.md │ │ ├── update-twilio-provider.md │ │ └── update-msg-91-provider.md │ └── avatars │ │ ├── get-favicon.md │ │ ├── get-image.md │ │ ├── get-qr.md │ │ ├── get-initials.md │ │ ├── get-flag.md │ │ ├── get-browser.md │ │ └── get-credit-card.md └── graphql.md └── tests └── Appwrite └── IDTest.php /src/Appwrite/Service.php: -------------------------------------------------------------------------------- 1 | client = $client; 12 | } 13 | } -------------------------------------------------------------------------------- /.github/workflows/autoclose.yml: -------------------------------------------------------------------------------- 1 | name: Auto-close External Pull Requests 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, reopened] 6 | 7 | jobs: 8 | auto_close: 9 | uses: appwrite/.github/.github/workflows/autoclose.yml@main 10 | secrets: 11 | GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }} 12 | -------------------------------------------------------------------------------- /docs/examples/account/create-jwt.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createJWT(); 13 | -------------------------------------------------------------------------------- /tests/Appwrite/IDTest.php: -------------------------------------------------------------------------------- 1 | assertSame('unique()', ID::unique()); 10 | } 11 | 12 | public function testCustom(): void { 13 | $this->assertSame('custom', ID::custom('custom')); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/examples/account/create-anonymous-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createAnonymousSession(); 13 | -------------------------------------------------------------------------------- /docs/examples/health/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->get(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-db.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getDB(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-time.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getTime(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->get(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->get(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-cache.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getCache(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-pub-sub.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getPubSub(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-storage.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getStorage(); 14 | -------------------------------------------------------------------------------- /docs/examples/health/get-antivirus.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getAntivirus(); 14 | -------------------------------------------------------------------------------- /docs/examples/sites/list-frameworks.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->listFrameworks(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/create-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createSession( 13 | userId: '', 14 | secret: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/get-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->getPrefs(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/list-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listCodes(); 14 | -------------------------------------------------------------------------------- /docs/examples/sites/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->get( 14 | siteId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->get( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/graphql/query.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $graphql = new Graphql($client); 12 | 13 | $result = $graphql->query( 14 | query: [] 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-storage-local.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getStorageLocal(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/list-countries.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listCountries(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/list-languages.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listLanguages(); 14 | -------------------------------------------------------------------------------- /docs/examples/sites/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->delete( 14 | siteId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/list-specifications.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->listSpecifications(); 14 | -------------------------------------------------------------------------------- /docs/examples/users/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->delete( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-phone-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createPhoneToken( 13 | userId: '', 14 | phone: '+12065550100' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/list-sessions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->listSessions(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/update-status.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateStatus(); 14 | -------------------------------------------------------------------------------- /docs/examples/functions/list-runtimes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->listRuntimes(); 14 | -------------------------------------------------------------------------------- /docs/examples/graphql/mutation.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $graphql = new Graphql($client); 12 | 13 | $result = $graphql->mutation( 14 | query: [] 15 | ); -------------------------------------------------------------------------------- /docs/examples/locale/list-continents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listContinents(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/list-countries-eu.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listCountriesEU(); 14 | -------------------------------------------------------------------------------- /docs/examples/locale/list-currencies.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listCurrencies(); 14 | -------------------------------------------------------------------------------- /docs/examples/teams/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->get( 14 | teamId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/tokens/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tokens = new Tokens($client); 12 | 13 | $result = $tokens->get( 14 | tokenId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/get-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->getPrefs( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/delete-sessions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->deleteSessions(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/list-mfa-factors.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->listMFAFactors(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/update-phone-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->updatePhoneSession( 13 | userId: '', 14 | secret: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/teams/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->delete( 14 | teamId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/tokens/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tokens = new Tokens($client); 12 | 13 | $result = $tokens->delete( 14 | tokenId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-magic-url-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->updateMagicURLSession( 13 | userId: '', 14 | secret: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/locale/list-countries-phones.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $locale = new Locale($client); 12 | 13 | $result = $locale->listCountriesPhones(); 14 | -------------------------------------------------------------------------------- /docs/examples/sites/list-variables.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->listVariables( 14 | siteId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/teams/get-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->getPrefs( 14 | teamId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createSession( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/get-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->getMFARecoveryCodes(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/update-mfa.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateMFA( 14 | mfa: false 15 | ); -------------------------------------------------------------------------------- /docs/examples/functions/list-specifications.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->listSpecifications(); 14 | -------------------------------------------------------------------------------- /docs/examples/tablesdb/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->get( 14 | databaseId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/delete-sessions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->deleteSessions( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-mfa-factors.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listMFAFactors( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createMFARecoveryCodes(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/create-phone-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createPhoneVerification(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/update-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateMFARecoveryCodes(); 14 | -------------------------------------------------------------------------------- /docs/examples/account/update-name.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateName( 14 | name: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->get( 14 | databaseId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/functions/get.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->get( 14 | functionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-certificate.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getCertificate( 14 | domain: '' // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/storage/get-bucket.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->getBucket( 14 | bucketId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->delete( 14 | databaseId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/delete-identity.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->deleteIdentity( 14 | identityId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->delete( 14 | databaseId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/functions/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->delete( 14 | functionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueLogs( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-mails.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueMails( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-usage.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueUsage( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/delete.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->delete( 14 | messageId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/get-topic.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->getTopic( 14 | topicId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/get-log.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->getLog( 14 | siteId: '', 15 | logId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/storage/delete-bucket.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->deleteBucket( 14 | bucketId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/get-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->getMFARecoveryCodes( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-mfa.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateMFA( 14 | userId: '', 15 | mfa: false 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-email-password-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createEmailPasswordSession( 13 | email: 'email@example.com', 14 | password: 'password' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/get-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->getSession( 14 | sessionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-favicon.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $avatars = new Avatars($client); 12 | 13 | $result = $avatars->getFavicon( 14 | url: 'https://example.com' 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-builds.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueBuilds( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-deletes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueDeletes( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-webhooks.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueWebhooks( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/delete-topic.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->deleteTopic( 14 | topicId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/get-message.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->getMessage( 14 | messageId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/delete-log.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->deleteLog( 14 | siteId: '', 15 | logId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createMFARecoveryCodes( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-labels.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateLabels( 14 | userId: '', 15 | labels: [] 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateMFARecoveryCodes( 14 | userId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-name.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateName( 14 | userId: '', 15 | name: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updatePrefs( 14 | userId: '', 15 | prefs: [] 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/delete-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->deleteSession( 14 | sessionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateSession( 14 | sessionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-functions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueFunctions( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-messaging.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueMessaging( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-migrations.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueMigrations( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/get-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->getProvider( 14 | providerId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createTransaction( 14 | ttl: 60 // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list-transactions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->listTransactions( 14 | queries: [] // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/teams/update-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->updatePrefs( 14 | teamId: '', 15 | prefs: [] 16 | ); -------------------------------------------------------------------------------- /docs/examples/tokens/update.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tokens = new Tokens($client); 12 | 13 | $result = $tokens->update( 14 | tokenId: '', 15 | expire: '' // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-password.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updatePassword( 14 | userId: '', 15 | password: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-status.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateStatus( 14 | userId: '', 15 | status: false 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-mfa-challenge.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject(''); // Your project ID 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createMFAChallenge( 14 | factor: AuthenticationFactor::EMAIL() 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/delete-identity.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->deleteIdentity( 14 | identityId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createTransaction( 14 | ttl: 60 // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list-transactions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->listTransactions( 14 | queries: [] // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/functions/list-variables.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->listVariables( 14 | functionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-certificates.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueCertificates( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/delete-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->deleteProvider( 14 | providerId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/teams/update-name.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->updateName( 14 | teamId: '', 15 | name: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/get-target.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->getTarget( 14 | userId: '', 15 | targetId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-phone.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updatePhone( 14 | userId: '', 15 | number: '+12065550100' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-email-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createEmailToken( 13 | userId: '', 14 | email: 'email@example.com', 15 | phrase: false // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createVerification( 14 | url: 'https://example.com' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/create.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->create( 13 | userId: '', 14 | email: 'email@example.com', 15 | password: '', 16 | name: '' // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-stats-resources.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueStatsResources( 14 | threshold: null // optional 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/get-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->getVariable( 14 | siteId: '', 15 | variableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/get-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->getTransaction( 14 | transactionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/delete-target.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->deleteTarget( 14 | userId: '', 15 | targetId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-sessions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listSessions( 14 | userId: '', 15 | total: false // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-email.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateEmail( 14 | userId: '', 15 | email: 'email@example.com' 16 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->getTransaction( 14 | transactionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/delete-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->deleteVariable( 14 | siteId: '', 15 | variableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/storage/get-file.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->getFile( 14 | bucketId: '', 15 | fileId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteTransaction( 14 | transactionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/users/delete-session.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->deleteSession( 14 | userId: '', 15 | sessionId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteTransaction( 14 | transactionId: '' 15 | ); -------------------------------------------------------------------------------- /docs/examples/sites/get-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->getDeployment( 14 | siteId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/get-table.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->getTable( 14 | databaseId: '', 15 | tableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-email-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createEmailVerification( 14 | url: 'https://example.com' 15 | ); -------------------------------------------------------------------------------- /docs/examples/account/list-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->listLogs( 14 | queries: [], // optional 15 | total: false // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-phone.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updatePhone( 14 | phone: '+12065550100', 15 | password: 'password' 16 | ); -------------------------------------------------------------------------------- /docs/examples/sites/delete-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->deleteDeployment( 14 | siteId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/storage/delete-file.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->deleteFile( 14 | bucketId: '', 15 | fileId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/teams/create.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->create( 14 | teamId: '', 15 | name: '', 16 | roles: [] // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/teams/get-membership.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->getMembership( 14 | teamId: '', 15 | membershipId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-email.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateEmail( 14 | email: 'email@example.com', 15 | password: 'password' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-table.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteTable( 14 | databaseId: '', 15 | tableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/list-identities.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->listIdentities( 14 | queries: [], // optional 15 | total: false // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-password.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updatePassword( 14 | password: '', 15 | oldPassword: 'password' // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateVerification( 14 | userId: '', 15 | secret: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-queue-databases.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $health = new Health($client); 12 | 13 | $result = $health->getQueueDatabases( 14 | name: '', // optional 15 | threshold: null // optional 16 | ); -------------------------------------------------------------------------------- /docs/examples/sites/list-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->listLogs( 14 | siteId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/sites/update-site-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->updateSiteDeployment( 14 | siteId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/teams/delete-membership.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->deleteMembership( 14 | teamId: '', 15 | membershipId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listLogs( 14 | userId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-email-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateEmailVerification( 14 | userId: '', 15 | emailVerification: false 16 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-phone-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updatePhoneVerification( 14 | userId: '', 15 | phoneVerification: false 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-recovery.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createRecovery( 14 | email: 'email@example.com', 15 | url: 'https://example.com' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-mfa-challenge.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateMFAChallenge( 14 | challengeId: '', 15 | otp: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/functions/get-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->getVariable( 14 | functionId: '', 15 | variableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/get-subscriber.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->getSubscriber( 14 | topicId: '', 15 | subscriberId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/sites/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/sites/update-deployment-status.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->updateDeploymentStatus( 14 | siteId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/get-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->getColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/get-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->getIndex( 14 | databaseId: '', 15 | tableId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createToken( 14 | userId: '', 15 | length: 4, // optional 16 | expire: 60 // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-targets.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listTargets( 14 | userId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-email-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateEmailVerification( 14 | userId: '', 15 | secret: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-phone-verification.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updatePhoneVerification( 14 | userId: '', 15 | secret: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get-collection.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->getCollection( 14 | databaseId: '', 15 | collectionId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/functions/delete-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->deleteVariable( 14 | functionId: '', 15 | variableId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/functions/get-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->getDeployment( 14 | functionId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/sites/create-duplicate-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->createDuplicateDeployment( 14 | siteId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->create( 14 | databaseId: '', 15 | name: '', 16 | enabled: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteIndex( 14 | databaseId: '', 15 | tableId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->update( 14 | databaseId: '', 15 | name: '', 16 | enabled: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/teams/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-recovery.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updateRecovery( 14 | userId: '', 15 | secret: '', 16 | password: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->create( 14 | databaseId: '', 15 | name: '', 16 | enabled: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->update( 14 | databaseId: '', 15 | name: '', 16 | enabled: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/delete-execution.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->deleteExecution( 14 | functionId: '', 15 | executionId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/functions/get-execution.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->getExecution( 14 | functionId: '', 15 | executionId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/delete-subscriber.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setJWT(''); // Your secret JSON Web Token 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->deleteSubscriber( 14 | topicId: '', 15 | subscriberId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-jwt.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createJWT( 14 | userId: '', 15 | sessionId: '', // optional 16 | duration: 0 // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-image.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $avatars = new Avatars($client); 12 | 13 | $result = $avatars->getImage( 14 | url: 'https://example.com', 15 | width: 0, // optional 16 | height: 0 // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-collection.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteCollection( 14 | databaseId: '', 15 | collectionId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->getIndex( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/delete-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->deleteDeployment( 14 | functionId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/health/get-failed-jobs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $health = new Health($client); 13 | 14 | $result = $health->getFailedJobs( 15 | name: Name::V1DATABASE(), 16 | threshold: null // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/teams/update-membership.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->updateMembership( 14 | teamId: '', 15 | membershipId: '', 16 | roles: [] 17 | ); -------------------------------------------------------------------------------- /docs/examples/tokens/create-file-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tokens = new Tokens($client); 12 | 13 | $result = $tokens->createFileToken( 14 | bucketId: '', 15 | fileId: '', 16 | expire: '' // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteIndex( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->list( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-topic.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createTopic( 14 | topicId: '', 15 | name: '', 16 | subscribe: ["any"] // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-identities.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listIdentities( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-magic-url-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject(''); // Your project ID 9 | 10 | $account = new Account($client); 11 | 12 | $result = $account->createMagicURLToken( 13 | userId: '', 14 | email: 'email@example.com', 15 | url: 'https://example.com', // optional 16 | phrase: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->getAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/update-deployment-status.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->updateDeploymentStatus( 14 | functionId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/sites/create-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->createVariable( 14 | siteId: '', 15 | key: '', 16 | value: '', 17 | secret: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/storage/get-file-view.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->getFileView( 14 | bucketId: '', 15 | fileId: '', 16 | token: '' // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/storage/list-buckets.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->listBuckets( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/tokens/list.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tokens = new Tokens($client); 12 | 13 | $result = $tokens->list( 14 | bucketId: '', 15 | fileId: '', 16 | queries: [], // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $account = new Account($client); 13 | 14 | $result = $account->createMFAAuthenticator( 15 | type: AuthenticatorType::TOTP() 16 | ); -------------------------------------------------------------------------------- /docs/examples/account/delete-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $account = new Account($client); 13 | 14 | $result = $account->deleteMFAAuthenticator( 15 | type: AuthenticatorType::TOTP() 16 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/update-function-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->updateFunctionDeployment( 14 | functionId: '', 15 | deploymentId: '' 16 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-targets.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listTargets( 14 | messageId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-topic-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listTopicLogs( 14 | topicId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-topics.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listTopics( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-qr.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $avatars = new Avatars($client); 12 | 13 | $result = $avatars->getQR( 14 | text: '', 15 | size: 1, // optional 16 | margin: 0, // optional 17 | download: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-message-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listMessageLogs( 14 | messageId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-messages.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listMessages( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-providers.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listProviders( 14 | queries: [], // optional 15 | search: '', // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-topic.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateTopic( 14 | topicId: '', 15 | name: '', // optional 16 | subscribe: ["any"] // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/storage/get-file-download.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->getFileDownload( 14 | bucketId: '', 15 | fileId: '', 16 | token: '' // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-provider-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listProviderLogs( 14 | providerId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/delete-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $users = new Users($client); 13 | 14 | $result = $users->deleteMFAAuthenticator( 15 | userId: '', 16 | type: AuthenticatorType::TOTP() 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/list-executions.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->listExecutions( 14 | functionId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-subscriber.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setJWT(''); // Your secret JSON Web Token 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createSubscriber( 14 | topicId: '', 15 | subscriberId: '', 16 | targetId: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-md-5-user.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createMD5User( 14 | userId: '', 15 | email: 'email@example.com', 16 | password: 'password', 17 | name: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $account = new Account($client); 13 | 14 | $result = $account->updateMFAAuthenticator( 15 | type: AuthenticatorType::TOTP(), 16 | otp: '' 17 | ); -------------------------------------------------------------------------------- /docs/examples/account/update-prefs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->updatePrefs( 14 | prefs: [ 15 | 'language' => 'en', 16 | 'timezone' => 'UTC', 17 | 'darkTheme' => true 18 | ] 19 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-subscriber-logs.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listSubscriberLogs( 14 | subscriberId: '', 15 | queries: [], // optional 16 | total: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/sites/list-deployments.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->listDeployments( 14 | siteId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateTransaction( 14 | transactionId: '', 15 | commit: false, // optional 16 | rollback: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-argon-2-user.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createArgon2User( 14 | userId: '', 15 | email: 'email@example.com', 16 | password: 'password', 17 | name: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-bcrypt-user.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createBcryptUser( 14 | userId: '', 15 | email: 'email@example.com', 16 | password: 'password', 17 | name: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-ph-pass-user.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->createPHPassUser( 14 | userId: '', 15 | email: 'email@example.com', 16 | password: 'password', 17 | name: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/users/list-memberships.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->listMemberships( 14 | userId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-transaction.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateTransaction( 14 | transactionId: '', 15 | commit: false, // optional 16 | rollback: false // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/functions/create-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->createVariable( 14 | functionId: '', 15 | key: '', 16 | value: '', 17 | secret: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list-columns.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->listColumns( 14 | databaseId: '', 15 | tableId: '', 16 | queries: [], // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list-indexes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->listIndexes( 14 | databaseId: '', 15 | tableId: '', 16 | queries: [], // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /src/Appwrite/ID.php: -------------------------------------------------------------------------------- 1 | 0) { 11 | $bytes = \random_bytes(\max(1, (int)\ceil(($padding / 2)))); // one byte expands to two chars 12 | $uniqid .= \substr(\bin2hex($bytes), 0, $padding); 13 | } 14 | 15 | return $uniqid; 16 | } 17 | 18 | public static function custom(string $id): string 19 | { 20 | return $id; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/examples/avatars/get-initials.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $avatars = new Avatars($client); 12 | 13 | $result = $avatars->getInitials( 14 | name: '', // optional 15 | width: 0, // optional 16 | height: 0, // optional 17 | background: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/storage/list-files.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $storage = new Storage($client); 12 | 13 | $result = $storage->listFiles( 14 | bucketId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-rows.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createRows( 14 | databaseId: '', 15 | tableId: '', 16 | rows: [], 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/upsert-rows.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->upsertRows( 14 | databaseId: '', 15 | tableId: '', 16 | rows: [], 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/teams/list-memberships.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->listMemberships( 14 | teamId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list-tables.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->listTables( 14 | databaseId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/teams/update-membership-status.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->updateMembershipStatus( 14 | teamId: '', 15 | membershipId: '', 16 | userId: '', 17 | secret: '' 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list-indexes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->listIndexes( 14 | databaseId: '', 15 | collectionId: '', 16 | queries: [], // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-flag.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $avatars = new Avatars($client); 13 | 14 | $result = $avatars->getFlag( 15 | code: Flag::AFGHANISTAN(), 16 | width: 0, // optional 17 | height: 0, // optional 18 | quality: -1 // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/functions/create-duplicate-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->createDuplicateDeployment( 14 | functionId: '', 15 | deploymentId: '', 16 | buildId: '' // optional 17 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/list-subscribers.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->listSubscribers( 14 | topicId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/sites/update-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $sites = new Sites($client); 12 | 13 | $result = $sites->updateVariable( 14 | siteId: '', 15 | variableId: '', 16 | key: '', 17 | value: '', // optional 18 | secret: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-row.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteRow( 14 | databaseId: '', 15 | tableId: '', 16 | rowId: '', 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/delete-rows.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->deleteRows( 14 | databaseId: '', 15 | tableId: '', 16 | queries: [], // optional 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list-attributes.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->listAttributes( 14 | databaseId: '', 15 | collectionId: '', 16 | queries: [], // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list-collections.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->listCollections( 14 | databaseId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/functions/list-deployments.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->listDeployments( 14 | functionId: '', 15 | queries: [], // optional 16 | search: '', // optional 17 | total: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-fcm-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createFCMProvider( 14 | providerId: '', 15 | name: '', 16 | serviceAccountJSON: [], // optional 17 | enabled: false // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-point-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createPointColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [1, 2] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/users/create.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->create( 14 | userId: '', 15 | email: 'email@example.com', // optional 16 | phone: '+12065550100', // optional 17 | password: '', // optional 18 | name: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/account/create-o-auth-2-token.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject(''); // Your project ID 10 | 11 | $account = new Account($client); 12 | 13 | $result = $account->createOAuth2Token( 14 | provider: OAuthProvider::AMAZON(), 15 | success: 'https://example.com', // optional 16 | failure: 'https://example.com', // optional 17 | scopes: [] // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-browser.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $avatars = new Avatars($client); 13 | 14 | $result = $avatars->getBrowser( 15 | code: Browser::AVANTBROWSER(), 16 | width: 0, // optional 17 | height: 0, // optional 18 | quality: -1 // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-documents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createDocuments( 14 | databaseId: '', 15 | collectionId: '', 16 | documents: [], 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/upsert-documents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->upsertDocuments( 14 | databaseId: '', 15 | collectionId: '', 16 | documents: [], 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-fcm-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateFCMProvider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | serviceAccountJSON: [] // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-ip-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateIpColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-documents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteDocuments( 14 | databaseId: '', 15 | collectionId: '', 16 | queries: [], // optional 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-line-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createLineColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [[1, 2], [3, 4], [5, 6]] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/avatars/get-credit-card.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setSession(''); // The user session to authenticate with 11 | 12 | $avatars = new Avatars($client); 13 | 14 | $result = $avatars->getCreditCard( 15 | code: CreditCard::AMERICANEXPRESS(), 16 | width: 0, // optional 17 | height: 0, // optional 18 | quality: -1 // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-point-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createPointAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [1, 2] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/functions/update-variable.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $functions = new Functions($client); 12 | 13 | $result = $functions->updateVariable( 14 | functionId: '', 15 | variableId: '', 16 | key: '', 17 | value: '', // optional 18 | secret: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/sites/get-deployment-download.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $sites = new Sites($client); 13 | 14 | $result = $sites->getDeploymentDownload( 15 | siteId: '', 16 | deploymentId: '', 17 | type: DeploymentDownloadType::SOURCE() // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/get-row.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->getRow( 14 | databaseId: '', 15 | tableId: '', 16 | rowId: '', 17 | queries: [], // optional 18 | transactionId: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-boolean-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateBooleanColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: false, 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-datetime-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateDatetimeColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-rows.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateRows( 14 | databaseId: '', 15 | tableId: '', 16 | data: [], // optional 17 | queries: [], // optional 18 | transactionId: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/users/update-target.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $users = new Users($client); 12 | 13 | $result = $users->updateTarget( 14 | userId: '', 15 | targetId: '', 16 | identifier: '', // optional 17 | providerId: '', // optional 18 | name: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/delete-document.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->deleteDocument( 14 | databaseId: '', 15 | collectionId: '', 16 | documentId: '', 17 | transactionId: '' // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/sites/create-vcs-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $sites = new Sites($client); 13 | 14 | $result = $sites->createVcsDeployment( 15 | siteId: '', 16 | type: VCSReferenceType::BRANCH(), 17 | reference: '', 18 | activate: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-ip-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createIpColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: '', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-ip-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateIpAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-polygon-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createPolygonColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/list-rows.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->listRows( 14 | databaseId: '', 15 | tableId: '', 16 | queries: [], // optional 17 | transactionId: '', // optional 18 | total: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-email-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateEmailColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: 'email@example.com', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-point-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updatePointColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [1, 2], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-url-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateUrlColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: 'https://example.com', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-line-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createLineAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [[1, 2], [3, 4], [5, 6]] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-boolean-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createBooleanColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: false, // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-datetime-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createDatetimeColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: '', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-datetime-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateDatetimeAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-ip-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createIpAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: '', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-boolean-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateBooleanAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: false, 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-documents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateDocuments( 14 | databaseId: '', 15 | collectionId: '', 16 | data: [], // optional 17 | queries: [], // optional 18 | transactionId: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-email-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createEmailColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: 'email@example.com', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-url-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createUrlColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: 'https://example.com', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-enum-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateEnumColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | elements: [], 18 | required: false, 19 | default: '', 20 | newKey: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-line-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateLineColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [[1, 2], [3, 4], [5, 6]], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-polygon-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createPolygonAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-point-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updatePointAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [1, 2], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-url-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateUrlAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: 'https://example.com', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/functions/create-vcs-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $functions = new Functions($client); 13 | 14 | $result = $functions->createVcsDeployment( 15 | functionId: '', 16 | type: VCSReferenceType::BRANCH(), 17 | reference: '', 18 | activate: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/functions/get-deployment-download.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $functions = new Functions($client); 13 | 14 | $result = $functions->getDeploymentDownload( 15 | functionId: '', 16 | deploymentId: '', 17 | type: DeploymentDownloadType::SOURCE() // optional 18 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-boolean-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createBooleanAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: false, // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-datetime-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createDatetimeAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: '', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/get-document.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->getDocument( 14 | databaseId: '', 15 | collectionId: '', 16 | documentId: '', 17 | queries: [], // optional 18 | transactionId: '' // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/list-documents.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->listDocuments( 14 | databaseId: '', 15 | collectionId: '', 16 | queries: [], // optional 17 | transactionId: '', // optional 18 | total: false // optional 19 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-email-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateEmailAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: 'email@example.com', 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/storage/update-file.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 10 | ->setProject('') // Your project ID 11 | ->setSession(''); // The user session to authenticate with 12 | 13 | $storage = new Storage($client); 14 | 15 | $result = $storage->updateFile( 16 | bucketId: '', 17 | fileId: '', 18 | name: '', // optional 19 | permissions: [Permission::read(Role::any())] // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-string-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateStringColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | size: 1, // optional 20 | newKey: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-sha-user.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $users = new Users($client); 13 | 14 | $result = $users->createSHAUser( 15 | userId: '', 16 | email: 'email@example.com', 17 | password: 'password', 18 | passwordVersion: PasswordHash::SHA1(), // optional 19 | name: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/graphql.md: -------------------------------------------------------------------------------- 1 | # Graphql Service 2 | 3 | 4 | ```http request 5 | POST https://cloud.appwrite.io/v1/graphql 6 | ``` 7 | 8 | ** Execute a GraphQL mutation. ** 9 | 10 | ### Parameters 11 | 12 | | Field Name | Type | Description | Default | 13 | | --- | --- | --- | --- | 14 | | query | object | The query or queries to execute. | {} | 15 | 16 | 17 | ```http request 18 | POST https://cloud.appwrite.io/v1/graphql/mutation 19 | ``` 20 | 21 | ** Execute a GraphQL mutation. ** 22 | 23 | ### Parameters 24 | 25 | | Field Name | Type | Description | Default | 26 | | --- | --- | --- | --- | 27 | | query | object | The query or queries to execute. | {} | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-enum-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createEnumColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | elements: [], 18 | required: false, 19 | default: '', // optional 20 | array: false // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-email-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createEmailAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: 'email@example.com', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-url-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createUrlAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: 'https://example.com', // optional 19 | array: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-enum-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateEnumAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | elements: [], 18 | required: false, 19 | default: '', 20 | newKey: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-polygon-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updatePolygonColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-line-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateLineAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [[1, 2], [3, 4], [5, 6]], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-string-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateStringAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: '', 19 | size: 1, // optional 20 | newKey: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-sms.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createSMS( 14 | messageId: '', 15 | content: '', 16 | topics: [], // optional 17 | users: [], // optional 18 | targets: [], // optional 19 | draft: false, // optional 20 | scheduledAt: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-enum-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createEnumAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | elements: [], 18 | required: false, 19 | default: '', // optional 20 | array: false // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $tablesDB = new TablesDB($client); 13 | 14 | $result = $tablesDB->createIndex( 15 | databaseId: '', 16 | tableId: '', 17 | key: '', 18 | type: IndexType::KEY(), 19 | columns: [], 20 | orders: [], // optional 21 | lengths: [] // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-float-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateFloatColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: null, 19 | min: null, // optional 20 | max: null, // optional 21 | newKey: '' // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-relationship-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $tablesDB = new TablesDB($client); 13 | 14 | $result = $tablesDB->updateRelationshipColumn( 15 | databaseId: '', 16 | tableId: '', 17 | key: '', 18 | onDelete: RelationMutate::CASCADE(), // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-polygon-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updatePolygonAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/functions/create-deployment.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $functions = new Functions($client); 13 | 14 | $result = $functions->createDeployment( 15 | functionId: '', 16 | code: InputFile::withPath('file.png'), 17 | activate: false, 18 | entrypoint: '', // optional 19 | commands: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-sms.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateSMS( 14 | messageId: '', 15 | topics: [], // optional 16 | users: [], // optional 17 | targets: [], // optional 18 | content: '', // optional 19 | draft: false, // optional 20 | scheduledAt: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/update-integer-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->updateIntegerColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | default: null, 19 | min: null, // optional 20 | max: null, // optional 21 | newKey: '' // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-vonage-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createVonageProvider( 14 | providerId: '', 15 | name: '', 16 | from: '+12065550100', // optional 17 | apiKey: '', // optional 18 | apiSecret: '', // optional 19 | enabled: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-index.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $databases = new Databases($client); 13 | 14 | $result = $databases->createIndex( 15 | databaseId: '', 16 | collectionId: '', 17 | key: '', 18 | type: IndexType::KEY(), 19 | attributes: [], 20 | orders: [], // optional 21 | lengths: [] // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-msg-91-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createMsg91Provider( 14 | providerId: '', 15 | name: '', 16 | templateId: '', // optional 17 | senderId: '', // optional 18 | authKey: '', // optional 19 | enabled: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-telesign-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createTelesignProvider( 14 | providerId: '', 15 | name: '', 16 | from: '+12065550100', // optional 17 | customerId: '', // optional 18 | apiKey: '', // optional 19 | enabled: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-textmagic-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createTextmagicProvider( 14 | providerId: '', 15 | name: '', 16 | from: '+12065550100', // optional 17 | username: '', // optional 18 | apiKey: '', // optional 19 | enabled: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-vonage-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateVonageProvider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | apiKey: '', // optional 18 | apiSecret: '', // optional 19 | from: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/storage/create-file.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 11 | ->setProject('') // Your project ID 12 | ->setSession(''); // The user session to authenticate with 13 | 14 | $storage = new Storage($client); 15 | 16 | $result = $storage->createFile( 17 | bucketId: '', 18 | fileId: '', 19 | file: InputFile::withPath('file.png'), 20 | permissions: [Permission::read(Role::any())] // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-float-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createFloatColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | min: null, // optional 19 | max: null, // optional 20 | default: null, // optional 21 | array: false // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-string-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createStringColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | size: 1, 18 | required: false, 19 | default: '', // optional 20 | array: false, // optional 21 | encrypt: false // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/decrement-row-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->decrementRowColumn( 14 | databaseId: '', 15 | tableId: '', 16 | rowId: '', 17 | column: '', 18 | value: null, // optional 19 | min: null, // optional 20 | transactionId: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/increment-row-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->incrementRowColumn( 14 | databaseId: '', 15 | tableId: '', 16 | rowId: '', 17 | column: '', 18 | value: null, // optional 19 | max: null, // optional 20 | transactionId: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-float-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateFloatAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: null, 19 | min: null, // optional 20 | max: null, // optional 21 | newKey: '' // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-relationship-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $databases = new Databases($client); 13 | 14 | $result = $databases->updateRelationshipAttribute( 15 | databaseId: '', 16 | collectionId: '', 17 | key: '', 18 | onDelete: RelationMutate::CASCADE(), // optional 19 | newKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/create-twilio-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->createTwilioProvider( 14 | providerId: '', 15 | name: '', 16 | from: '+12065550100', // optional 17 | accountSid: '', // optional 18 | authToken: '', // optional 19 | enabled: false // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-telesign-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateTelesignProvider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | customerId: '', // optional 18 | apiKey: '', // optional 19 | from: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-textmagic-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateTextmagicProvider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | username: '', // optional 18 | apiKey: '', // optional 19 | from: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/tablesdb/create-integer-column.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $tablesDB = new TablesDB($client); 12 | 13 | $result = $tablesDB->createIntegerColumn( 14 | databaseId: '', 15 | tableId: '', 16 | key: '', 17 | required: false, 18 | min: null, // optional 19 | max: null, // optional 20 | default: null, // optional 21 | array: false // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/databases/update-integer-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->updateIntegerAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | default: null, 19 | min: null, // optional 20 | max: null, // optional 21 | newKey: '' // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-twilio-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateTwilioProvider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | accountSid: '', // optional 18 | authToken: '', // optional 19 | from: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/teams/create-membership.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setSession(''); // The user session to authenticate with 10 | 11 | $teams = new Teams($client); 12 | 13 | $result = $teams->createMembership( 14 | teamId: '', 15 | roles: [], 16 | email: 'email@example.com', // optional 17 | userId: '', // optional 18 | phone: '+12065550100', // optional 19 | url: 'https://example.com', // optional 20 | name: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/messaging/update-msg-91-provider.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $messaging = new Messaging($client); 12 | 13 | $result = $messaging->updateMsg91Provider( 14 | providerId: '', 15 | name: '', // optional 16 | enabled: false, // optional 17 | templateId: '', // optional 18 | senderId: '', // optional 19 | authKey: '' // optional 20 | ); -------------------------------------------------------------------------------- /docs/examples/users/create-target.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 9 | ->setProject('') // Your project ID 10 | ->setKey(''); // Your secret API key 11 | 12 | $users = new Users($client); 13 | 14 | $result = $users->createTarget( 15 | userId: '', 16 | targetId: '', 17 | providerType: MessagingProviderType::EMAIL(), 18 | identifier: '', 19 | providerId: '', // optional 20 | name: '' // optional 21 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-float-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createFloatAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | required: false, 18 | min: null, // optional 19 | max: null, // optional 20 | default: null, // optional 21 | array: false // optional 22 | ); -------------------------------------------------------------------------------- /docs/examples/databases/create-string-attribute.md: -------------------------------------------------------------------------------- 1 | setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint 8 | ->setProject('') // Your project ID 9 | ->setKey(''); // Your secret API key 10 | 11 | $databases = new Databases($client); 12 | 13 | $result = $databases->createStringAttribute( 14 | databaseId: '', 15 | collectionId: '', 16 | key: '', 17 | size: 1, 18 | required: false, 19 | default: '', // optional 20 | array: false, // optional 21 | encrypt: false // optional 22 | ); --------------------------------------------------------------------------------