-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
3,497 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...examples/functions/list-specifications.md → ...examples/account/create-payment-method.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { Client, Functions } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const functions = new Functions(client); | ||
const account = new Account(client); | ||
|
||
const result = await functions.listSpecifications(); | ||
const result = await account.createPaymentMethod(); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.deletePaymentMethod( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.getBillingAddress( | ||
'<BILLING_ADDRESS_ID>' // billingAddressId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.getPaymentMethod( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
8 changes: 4 additions & 4 deletions
8
docs/examples/functions/get-template.md → ...xamples/account/list-billing-addresses.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { Client, Functions } from "@appwrite.io/console"; | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const functions = new Functions(client); | ||
const account = new Account(client); | ||
|
||
const result = await functions.getTemplate( | ||
'<TEMPLATE_ID>' // templateId | ||
const result = await account.listBillingAddresses( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listCredits( | ||
'<ORGANIZATION_ID>', // organizationId | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listInvoices( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listPaymentMethods( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
13 changes: 13 additions & 0 deletions
13
docs/examples/account/update-payment-method-mandate-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethodMandateOptions( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethodProvider( | ||
'<PAYMENT_METHOD_ID>', // paymentMethodId | ||
'<PROVIDER_METHOD_ID>', // providerMethodId | ||
'<NAME>' // name | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethod( | ||
'<PAYMENT_METHOD_ID>', // paymentMethodId | ||
1, // expiryMonth | ||
2024 // expiryYear | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createArchive( | ||
[], // services | ||
'<RESOURCE_ID>' // resourceId (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createPolicy( | ||
'<POLICY_ID>', // policyId | ||
[], // services | ||
1, // retention | ||
'', // schedule | ||
'<NAME>', // name (optional) | ||
'<RESOURCE_ID>', // resourceId (optional) | ||
false // enabled (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createRestoration( | ||
'<ARCHIVE_ID>', // archiveId | ||
[], // services | ||
'<NEW_RESOURCE_ID>', // newResourceId (optional) | ||
'<NEW_RESOURCE_NAME>' // newResourceName (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.deleteArchive( | ||
'<ARCHIVE_ID>' // archiveId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.deletePolicy( | ||
'<POLICY_ID>' // policyId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getArchive( | ||
'<ARCHIVE_ID>' // archiveId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getPolicy( | ||
'<POLICY_ID>' // policyId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getRestoration( | ||
'<RESTORATION_ID>' // restorationId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listArchives( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listPolicies( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listRestorations( | ||
'' // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.updatePolicy( | ||
'<POLICY_ID>', // policyId | ||
'<NAME>', // name (optional) | ||
1, // retention (optional) | ||
'', // schedule (optional) | ||
false // enabled (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Client, Console } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const console = new Console(client); | ||
|
||
const result = await console.createSource( | ||
'<REF>', // ref (optional) | ||
'https://example.com', // referrer (optional) | ||
'<UTM_SOURCE>', // utmSource (optional) | ||
'<UTM_CAMPAIGN>', // utmCampaign (optional) | ||
'<UTM_MEDIUM>' // utmMedium (optional) | ||
); | ||
|
||
console.log(result); |
Oops, something went wrong.