Merge branch 'main' into init-3
@@ -15,7 +15,7 @@ The Appwrite Website has been built with the following frameworks:
|
||||
|
||||
## Development
|
||||
|
||||
_If this is your first time setting up the repository, please run `pnpm install` inside the repo's directory._
|
||||
_If this is your first time setting up the repository, please run `pnpm install` inside the repo's directory and create a `.env` file based on `.env.example`._
|
||||
|
||||
To get the repo up and running in your local environment, use the following command:
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
"dependencies": {
|
||||
"@number-flow/svelte": "^0.3.3",
|
||||
"h3": "^1.14.0",
|
||||
"melt": "^0.28.2",
|
||||
"posthog-js": "^1.210.2",
|
||||
"sharp": "^0.33.5"
|
||||
},
|
||||
@@ -36,7 +35,7 @@
|
||||
"@appwrite.io/console": "^0.6.4",
|
||||
"@appwrite.io/pink": "~0.26.0",
|
||||
"@appwrite.io/pink-icons": "~0.26.0",
|
||||
"@appwrite.io/repo": "github:appwrite/appwrite#1.6.x",
|
||||
"@appwrite.io/repo": "github:appwrite/appwrite#feat-multi-region-docs",
|
||||
"@eslint/compat": "^1.2.7",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@fingerprintjs/fingerprintjs": "^4.5.1",
|
||||
@@ -56,6 +55,7 @@
|
||||
"@types/morgan": "^1.9.9",
|
||||
"analytics": "^0.8.16",
|
||||
"appwrite": "^17.0.1",
|
||||
"bits-ui": "^1.3.19",
|
||||
"clsx": "^2.1.1",
|
||||
"cva": "npm:class-variance-authority@^0.7.1",
|
||||
"date-fns": "^3.6.0",
|
||||
@@ -73,6 +73,7 @@
|
||||
"jsdom": "^26.0.0",
|
||||
"markdown-it": "^14.1.0",
|
||||
"meilisearch": "^0.37.0",
|
||||
"melt": "^0.29.2",
|
||||
"motion": "^10.18.0",
|
||||
"node-appwrite": "^15.0.1",
|
||||
"node-fetch": "^3.3.2",
|
||||
|
||||
75
pnpm-lock.yaml
generated
@@ -14,9 +14,6 @@ importers:
|
||||
h3:
|
||||
specifier: ^1.14.0
|
||||
version: 1.15.1
|
||||
melt:
|
||||
specifier: ^0.28.2
|
||||
version: 0.28.2(@floating-ui/dom@1.6.13)(svelte@5.25.6)
|
||||
posthog-js:
|
||||
specifier: ^1.210.2
|
||||
version: 1.230.4
|
||||
@@ -34,8 +31,8 @@ importers:
|
||||
specifier: ~0.26.0
|
||||
version: 0.26.0
|
||||
'@appwrite.io/repo':
|
||||
specifier: github:appwrite/appwrite#1.6.x
|
||||
version: https://codeload.github.com/appwrite/appwrite/tar.gz/2c803b262cbf62b499df28ff11d2ca40e16ab909
|
||||
specifier: github:appwrite/appwrite#feat-multi-region-docs
|
||||
version: https://codeload.github.com/appwrite/appwrite/tar.gz/4d81a901cbc48b94a720392a2611da028ea934b9
|
||||
'@eslint/compat':
|
||||
specifier: ^1.2.7
|
||||
version: 1.2.7(eslint@9.22.0(jiti@2.4.2))
|
||||
@@ -93,6 +90,9 @@ importers:
|
||||
appwrite:
|
||||
specifier: ^17.0.1
|
||||
version: 17.0.1
|
||||
bits-ui:
|
||||
specifier: ^1.3.19
|
||||
version: 1.3.19(svelte@5.25.6)
|
||||
clsx:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1
|
||||
@@ -144,6 +144,9 @@ importers:
|
||||
meilisearch:
|
||||
specifier: ^0.37.0
|
||||
version: 0.37.0(encoding@0.1.13)
|
||||
melt:
|
||||
specifier: ^0.29.2
|
||||
version: 0.29.2(@floating-ui/dom@1.6.13)(svelte@5.25.6)
|
||||
motion:
|
||||
specifier: ^10.18.0
|
||||
version: 10.18.0
|
||||
@@ -281,8 +284,8 @@ packages:
|
||||
'@appwrite.io/pink@0.26.0':
|
||||
resolution: {integrity: sha512-iPeGE56pauzxuIXt15ZswjKCErwp3QdF3XOlJZfyYY7J2nirra85JNTL+3lWuFIf8yYWL7NbvCjhf8ig79TgwA==}
|
||||
|
||||
'@appwrite.io/repo@https://codeload.github.com/appwrite/appwrite/tar.gz/2c803b262cbf62b499df28ff11d2ca40e16ab909':
|
||||
resolution: {tarball: https://codeload.github.com/appwrite/appwrite/tar.gz/2c803b262cbf62b499df28ff11d2ca40e16ab909}
|
||||
'@appwrite.io/repo@https://codeload.github.com/appwrite/appwrite/tar.gz/4d81a901cbc48b94a720392a2611da028ea934b9':
|
||||
resolution: {tarball: https://codeload.github.com/appwrite/appwrite/tar.gz/4d81a901cbc48b94a720392a2611da028ea934b9}
|
||||
version: 0.0.0
|
||||
|
||||
'@asamuzakjp/css-color@3.1.1':
|
||||
@@ -663,6 +666,9 @@ packages:
|
||||
'@internationalized/date@3.5.0':
|
||||
resolution: {integrity: sha512-nw0Q+oRkizBWMioseI8+2TeUPEyopJVz5YxoYVzR0W1v+2YytiYah7s/ot35F149q/xAg4F1gT/6eTd+tsUpFQ==}
|
||||
|
||||
'@internationalized/date@3.8.0':
|
||||
resolution: {integrity: sha512-J51AJ0fEL68hE4CwGPa6E0PO6JDaVLd8aln48xFCSy7CZkZc96dGEGmLs2OEEbBxcsVZtfrqkXJwI2/MSG8yKw==}
|
||||
|
||||
'@isaacs/cliui@8.0.2':
|
||||
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -1762,6 +1768,12 @@ packages:
|
||||
bindings@1.5.0:
|
||||
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
|
||||
|
||||
bits-ui@1.3.19:
|
||||
resolution: {integrity: sha512-2blb6dkgedHUsDXqCjvmtUi4Advgd9MhaJDT8r7bEWDzHI8HGsOoYsLeh8CxpEWWEYPrlGN+7k+kpxRhIDdFrQ==}
|
||||
engines: {node: '>=18', pnpm: '>=8.7.0'}
|
||||
peerDependencies:
|
||||
svelte: ^5.11.0
|
||||
|
||||
bmp-js@0.1.0:
|
||||
resolution: {integrity: sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==}
|
||||
|
||||
@@ -2554,6 +2566,9 @@ packages:
|
||||
resolution: {integrity: sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw==}
|
||||
engines: {node: ^18.17.0 || >=20.5.0}
|
||||
|
||||
inline-style-parser@0.2.4:
|
||||
resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
|
||||
|
||||
ip-address@9.0.5:
|
||||
resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==}
|
||||
engines: {node: '>= 12'}
|
||||
@@ -2841,8 +2856,8 @@ packages:
|
||||
meilisearch@0.37.0:
|
||||
resolution: {integrity: sha512-LdbK6JmRghCawrmWKJSEQF0OiE82md+YqJGE/U2JcCD8ROwlhTx0KM6NX4rQt0u0VpV0QZVG9umYiu3CSSIJAQ==}
|
||||
|
||||
melt@0.28.2:
|
||||
resolution: {integrity: sha512-55DGQ4B3bHKnDnK1ECJ46D+xythNKvuil60k0RXWJ3eEY5XsGjT6WZPVpRooYLfMlAki2J7JCWglCMYzvXwxVw==}
|
||||
melt@0.29.2:
|
||||
resolution: {integrity: sha512-x0qR8yE8+x2Bu6s1DRJNAxPBN295ANfTVJ/8UcWsNm/hb7M14ws9G64OFpRExZcI45kdh2KZb1LwHFmNsLwUbQ==}
|
||||
peerDependencies:
|
||||
'@floating-ui/dom': ^1.6.0
|
||||
svelte: ^5.0.0
|
||||
@@ -3570,6 +3585,9 @@ packages:
|
||||
resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
style-to-object@1.0.8:
|
||||
resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==}
|
||||
|
||||
sucrase@3.35.0:
|
||||
resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
@@ -3613,6 +3631,12 @@ packages:
|
||||
peerDependencies:
|
||||
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0-next.1
|
||||
|
||||
svelte-toolbelt@0.7.1:
|
||||
resolution: {integrity: sha512-HcBOcR17Vx9bjaOceUvxkY3nGmbBmCBBbuWLLEWO6jtmWH8f/QoWmbyUfQZrpDINH39en1b8mptfPQT9VKQ1xQ==}
|
||||
engines: {node: '>=18', pnpm: '>=8.7.0'}
|
||||
peerDependencies:
|
||||
svelte: ^5.0.0
|
||||
|
||||
svelte@5.25.6:
|
||||
resolution: {integrity: sha512-RGkaeAXDuJdvhA1fdSM5GgD++vYfJYijZL0uN6kM2s/TRJ663jktBhZlF0qjzAJGR/34PtaeT3G8MKJY1EKeqg==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -4131,7 +4155,7 @@ snapshots:
|
||||
normalize.css: 8.0.1
|
||||
the-new-css-reset: 1.11.3
|
||||
|
||||
'@appwrite.io/repo@https://codeload.github.com/appwrite/appwrite/tar.gz/2c803b262cbf62b499df28ff11d2ca40e16ab909': {}
|
||||
'@appwrite.io/repo@https://codeload.github.com/appwrite/appwrite/tar.gz/4d81a901cbc48b94a720392a2611da028ea934b9': {}
|
||||
|
||||
'@asamuzakjp/css-color@3.1.1':
|
||||
dependencies:
|
||||
@@ -4402,6 +4426,10 @@ snapshots:
|
||||
dependencies:
|
||||
'@swc/helpers': 0.5.15
|
||||
|
||||
'@internationalized/date@3.8.0':
|
||||
dependencies:
|
||||
'@swc/helpers': 0.5.15
|
||||
|
||||
'@isaacs/cliui@8.0.2':
|
||||
dependencies:
|
||||
string-width: 5.1.2
|
||||
@@ -5540,6 +5568,17 @@ snapshots:
|
||||
dependencies:
|
||||
file-uri-to-path: 1.0.0
|
||||
|
||||
bits-ui@1.3.19(svelte@5.25.6):
|
||||
dependencies:
|
||||
'@floating-ui/core': 1.6.9
|
||||
'@floating-ui/dom': 1.6.13
|
||||
'@internationalized/date': 3.8.0
|
||||
esm-env: 1.2.2
|
||||
runed: 0.23.4(svelte@5.25.6)
|
||||
svelte: 5.25.6
|
||||
svelte-toolbelt: 0.7.1(svelte@5.25.6)
|
||||
tabbable: 6.2.0
|
||||
|
||||
bmp-js@0.1.0: {}
|
||||
|
||||
boolbase@1.0.0: {}
|
||||
@@ -6411,6 +6450,8 @@ snapshots:
|
||||
|
||||
ini@5.0.0: {}
|
||||
|
||||
inline-style-parser@0.2.4: {}
|
||||
|
||||
ip-address@9.0.5:
|
||||
dependencies:
|
||||
jsbn: 1.1.0
|
||||
@@ -6720,9 +6761,10 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
melt@0.28.2(@floating-ui/dom@1.6.13)(svelte@5.25.6):
|
||||
melt@0.29.2(@floating-ui/dom@1.6.13)(svelte@5.25.6):
|
||||
dependencies:
|
||||
'@floating-ui/dom': 1.6.13
|
||||
dequal: 2.0.3
|
||||
jest-axe: 9.0.0
|
||||
nanoid: 5.1.3
|
||||
runed: 0.23.4(svelte@5.25.6)
|
||||
@@ -7400,6 +7442,10 @@ snapshots:
|
||||
'@tokenizer/token': 0.3.0
|
||||
peek-readable: 4.1.0
|
||||
|
||||
style-to-object@1.0.8:
|
||||
dependencies:
|
||||
inline-style-parser: 0.2.4
|
||||
|
||||
sucrase@3.35.0:
|
||||
dependencies:
|
||||
'@jridgewell/gen-mapping': 0.3.8
|
||||
@@ -7461,6 +7507,13 @@ snapshots:
|
||||
dependencies:
|
||||
svelte: 5.25.6
|
||||
|
||||
svelte-toolbelt@0.7.1(svelte@5.25.6):
|
||||
dependencies:
|
||||
clsx: 2.1.1
|
||||
runed: 0.23.4(svelte@5.25.6)
|
||||
style-to-object: 1.0.8
|
||||
svelte: 5.25.6
|
||||
|
||||
svelte@5.25.6:
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
|
||||
32
src/app.css
@@ -87,12 +87,14 @@
|
||||
/* Animations */
|
||||
--animate-scale-in: scale-in 200ms ease-out forwards;
|
||||
--animate-caret-blink: caret-blink 1s ease-in-out infinite;
|
||||
--animate-text:
|
||||
fade 0.75s ease-in-out both, blur 0.75s ease-in-out both, up 0.75s ease-in-out both;
|
||||
--animate-enter:
|
||||
fade-in 0.75s ease-in-out both, blur 0.75s ease-in-out both, up 0.75s ease-in-out both;
|
||||
--animate-scroll: scroll 60s linear infinite;
|
||||
--animate-fade-in: fade-in 0.5s ease-in-out both;
|
||||
--animate-marquee: marquee var(--speed, 30s) linear infinite var(--direction, forwards);
|
||||
--animate-lighting: lighting 1.25s ease-out forwards;
|
||||
--animate-menu-in: menu-in 0.25s ease-out forwards;
|
||||
--animate-menu-out: menu-out 0.25s ease-out forwards;
|
||||
|
||||
/* Keyframes */
|
||||
@keyframes scale-in {
|
||||
@@ -171,6 +173,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes menu-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
filter: blur(2px);
|
||||
transform: translateY(8px);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
filter: blur(0px);
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes menu-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
filter: blur(0px);
|
||||
transform: translateY(0px);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
filter: blur(2px);
|
||||
transform: translateY(8px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Fonts */
|
||||
--font-sans: 'Inter', arial, sans-serif;
|
||||
--font-mono: 'Fira Code', monospace;
|
||||
|
||||
1
src/icons/optimized/edge.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.925 4.028 C 9.521 4.066,8.877 4.204,8.524 4.328 C 8.123 4.469,7.392 4.849,7.035 5.101 C 6.608 5.403,5.892 6.119,5.591 6.545 C 5.321 6.929,4.984 7.584,4.835 8.018 C 4.401 9.277,4.401 10.708,4.835 11.967 C 5.340 13.435,6.497 14.723,7.918 15.400 C 10.018 16.401,12.497 16.102,14.298 14.630 C 14.650 14.342,15.135 13.821,15.408 13.438 C 15.675 13.063,16.010 12.412,16.165 11.967 C 16.599 10.715,16.599 9.270,16.165 8.018 C 15.445 5.946,13.523 4.360,11.374 4.065 C 10.964 4.009,10.306 3.992,9.925 4.028 M11.305 5.269 C 12.589 5.477,13.793 6.266,14.514 7.372 C 15.950 9.575,15.343 12.526,13.153 13.986 C 12.377 14.505,11.454 14.781,10.500 14.781 C 9.605 14.781,8.772 14.552,8.033 14.104 C 6.863 13.395,6.055 12.239,5.786 10.891 C 5.702 10.471,5.702 9.514,5.786 9.094 C 6.040 7.821,6.785 6.700,7.840 6.005 C 8.366 5.658,9.088 5.368,9.663 5.271 C 10.068 5.204,10.894 5.203,11.305 5.269 " fill="currentColor" stroke="none" fill-rule="evenodd"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
1
src/icons/optimized/pop-locations.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.167 4.438 C 7.692 4.591,6.489 5.403,5.845 6.679 C 5.665 7.034,5.490 7.548,5.417 7.933 C 5.388 8.089,5.357 8.248,5.349 8.287 C 5.336 8.348,5.303 8.360,5.098 8.379 C 4.540 8.431,3.888 8.622,3.350 8.890 C 2.026 9.551,1.337 10.768,1.411 12.317 C 1.497 14.133,2.739 15.301,4.866 15.565 C 5.255 15.613,14.745 15.613,15.134 15.565 C 16.701 15.370,17.807 14.676,18.307 13.574 C 18.646 12.826,18.689 11.790,18.416 10.950 C 17.980 9.610,16.649 8.644,14.885 8.388 L 14.621 8.349 14.529 8.031 C 14.275 7.147,13.888 6.448,13.316 5.840 C 12.290 4.750,10.850 4.264,9.167 4.438 M10.305 5.635 C 11.168 5.723,11.851 6.047,12.419 6.638 C 13.064 7.309,13.425 8.176,13.517 9.275 L 13.539 9.533 13.995 9.533 C 15.366 9.534,16.567 10.061,17.063 10.881 C 17.464 11.544,17.505 12.528,17.158 13.178 C 16.817 13.817,16.071 14.239,15.057 14.366 C 14.685 14.412,5.315 14.412,4.943 14.366 C 3.718 14.212,2.914 13.644,2.677 12.763 C 2.593 12.452,2.602 11.738,2.694 11.395 C 2.917 10.563,3.522 10.006,4.519 9.717 C 4.960 9.589,5.406 9.533,5.983 9.533 L 6.500 9.533 6.501 9.275 C 6.501 8.850,6.561 8.267,6.631 7.994 C 7.068 6.287,8.387 5.440,10.305 5.635 " stroke="none" fill-rule="evenodd" fill="black"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/icons/optimized/regions.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.468 2.484 C 8.358 2.664,7.422 3.046,6.510 3.690 C 6.111 3.973,5.323 4.766,5.030 5.180 C 4.233 6.306,3.806 7.818,3.917 9.119 C 4.093 11.169,5.147 13.050,7.302 15.155 C 8.143 15.977,9.253 16.888,10.023 17.390 C 10.274 17.554,10.317 17.570,10.500 17.570 C 10.683 17.570,10.726 17.554,10.977 17.390 C 12.355 16.491,14.197 14.796,15.194 13.510 C 17.213 10.907,17.631 8.361,16.431 5.968 C 16.114 5.334,15.817 4.930,15.261 4.374 C 14.350 3.464,13.397 2.924,12.145 2.609 C 11.339 2.406,10.262 2.356,9.468 2.484 M11.242 3.657 C 13.450 3.949,15.235 5.489,15.746 7.543 C 15.985 8.501,15.920 9.509,15.557 10.483 C 14.974 12.050,13.662 13.713,11.765 15.290 C 11.209 15.752,10.560 16.240,10.500 16.240 C 10.438 16.240,9.772 15.737,9.196 15.256 C 6.995 13.419,5.618 11.502,5.214 9.713 C 5.070 9.073,5.086 8.182,5.255 7.528 C 5.915 4.961,8.494 3.294,11.242 3.657 M9.929 6.459 C 9.106 6.623,8.309 7.338,8.034 8.158 C 7.955 8.395,7.933 8.535,7.920 8.873 C 7.899 9.410,7.958 9.706,8.177 10.150 C 8.317 10.433,8.391 10.533,8.677 10.819 C 8.968 11.110,9.059 11.177,9.346 11.316 C 10.097 11.678,10.903 11.678,11.654 11.316 C 11.941 11.177,12.032 11.110,12.323 10.819 C 12.609 10.532,12.683 10.433,12.823 10.150 C 13.018 9.755,13.089 9.445,13.089 8.995 C 13.089 8.131,12.734 7.431,12.023 6.892 C 11.475 6.477,10.672 6.311,9.929 6.459 M11.085 7.733 C 11.957 8.142,12.162 9.297,11.482 9.976 C 11.296 10.163,11.095 10.277,10.833 10.347 C 10.371 10.471,9.871 10.329,9.518 9.976 C 8.977 9.435,8.975 8.556,9.514 8.018 C 9.701 7.830,9.970 7.678,10.197 7.629 C 10.456 7.574,10.841 7.619,11.085 7.733 " stroke="none" fill-rule="evenodd" fill="black"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
14
src/icons/svg/edge.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
width="21"
|
||||
height="20"
|
||||
viewBox="0 0 21 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M10.5 14.8C13.151 14.8 15.3 12.651 15.3 10C15.3 7.34903 13.151 5.2 10.5 5.2C7.84903 5.2 5.7 7.34903 5.7 10C5.7 12.651 7.84903 14.8 10.5 14.8ZM10.5 16C13.8137 16 16.5 13.3137 16.5 10C16.5 6.68629 13.8137 4 10.5 4C7.18629 4 4.5 6.68629 4.5 10C4.5 13.3137 7.18629 16 10.5 16Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 509 B |
13
src/icons/svg/pop-locations.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M9.82222 5C6.69333 5 5.91111 7.49542 5.91111 8.92137C5.55556 8.92137 2 8.92137 2 12.1298C2 14.6965 4.60741 15.1005 5.91111 14.9817H14.0889C15.3926 15.1005 18 14.6965 18 12.1298C18 9.56305 15.3926 8.92137 14.0889 8.92137C13.9704 7.61425 12.9511 5 9.82222 5Z"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.2"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 466 B |
8
src/icons/svg/regions.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M16.5 8.72727C16.5 13.1818 10.5 17 10.5 17C10.5 17 4.5 13.1818 4.5 8.72727C4.5 7.20831 5.13214 5.75155 6.25736 4.67748C7.38258 3.60341 8.9087 3 10.5 3C12.0913 3 13.6174 3.60341 14.7426 4.67748C15.8679 5.75155 16.5 7.20831 16.5 8.72727Z"
|
||||
stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M10.5 11C11.6046 11 12.5 10.1046 12.5 9C12.5 7.89543 11.6046 7 10.5 7C9.39543 7 8.5 7.89543 8.5 9C8.5 10.1046 9.39543 11 10.5 11Z"
|
||||
stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 710 B |
21
src/lib/actions/animate-in-view.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { inView, type InViewOptions } from 'motion';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const useAnimateInView = ({ options }: { options?: InViewOptions }) => {
|
||||
let animate = writable<boolean>(false);
|
||||
|
||||
const action = (node: HTMLElement) => {
|
||||
inView(
|
||||
node,
|
||||
() => {
|
||||
animate.set(true);
|
||||
},
|
||||
{ ...options }
|
||||
);
|
||||
};
|
||||
|
||||
return {
|
||||
animate,
|
||||
action
|
||||
};
|
||||
};
|
||||
34
src/lib/actions/mouse-position.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { inView } from 'motion';
|
||||
import { type Writable, writable } from 'svelte/store';
|
||||
|
||||
export const useMousePosition = () => {
|
||||
let position = writable<{ x: number; y: number }>({
|
||||
x: 0,
|
||||
y: 0
|
||||
});
|
||||
|
||||
const action = (node: HTMLElement) => {
|
||||
const handleMouseMove = (event: MouseEvent) => {
|
||||
position.set({
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
});
|
||||
};
|
||||
|
||||
inView(
|
||||
node,
|
||||
() => {
|
||||
node.addEventListener('mousemove', handleMouseMove);
|
||||
},
|
||||
{ amount: 'all' }
|
||||
);
|
||||
|
||||
return {
|
||||
destroy() {
|
||||
node.removeEventListener('mousemove', handleMouseMove);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return { action, position };
|
||||
};
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="relative">
|
||||
{#each words as word, i}
|
||||
<span
|
||||
class="animate-text mr-2 inline-block"
|
||||
class="animate-enter mr-2 inline-block"
|
||||
style:animation-delay="{i * 75}ms
|
||||
">{word}</span
|
||||
>
|
||||
607
src/lib/components/appwrite-network/data/pins.ts
Normal file
@@ -0,0 +1,607 @@
|
||||
export const pins = {
|
||||
'pop-locations': [
|
||||
{
|
||||
lat: 39.04,
|
||||
lng: -77.49,
|
||||
city: 'Ashburn',
|
||||
code: 'ASH',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 33.75,
|
||||
lng: -84.39,
|
||||
city: 'Atlanta',
|
||||
code: 'ATL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 42.36,
|
||||
lng: -71.06,
|
||||
city: 'Boston',
|
||||
code: 'BOS',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 51.05,
|
||||
lng: -114.07,
|
||||
city: 'Calgary',
|
||||
code: 'CAL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 41.88,
|
||||
lng: -87.63,
|
||||
city: 'Chicago',
|
||||
code: 'CHI',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 39.96,
|
||||
lng: -82.99,
|
||||
city: 'Columbus',
|
||||
code: 'COL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 32.78,
|
||||
lng: -96.8,
|
||||
city: 'Dallas',
|
||||
code: 'DAL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 39.74,
|
||||
lng: -104.99,
|
||||
city: 'Denver',
|
||||
code: 'DEN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 42.33,
|
||||
lng: -83.05,
|
||||
city: 'Detroit',
|
||||
code: 'DET',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 21.31,
|
||||
lng: -157.86,
|
||||
city: 'Honolulu',
|
||||
code: 'HNL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 29.76,
|
||||
lng: -95.37,
|
||||
city: 'Houston',
|
||||
code: 'HOU',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 30.33,
|
||||
lng: -81.66,
|
||||
city: 'Jacksonville',
|
||||
code: 'JAX',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 39.1,
|
||||
lng: -94.58,
|
||||
city: 'Kansas City',
|
||||
code: 'KC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 34.05,
|
||||
lng: -118.24,
|
||||
city: 'Los Angeles',
|
||||
code: 'LA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 25.77,
|
||||
lng: -80.19,
|
||||
city: 'Miami',
|
||||
code: 'MIA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 44.98,
|
||||
lng: -93.27,
|
||||
city: 'Minneapolis',
|
||||
code: 'MIN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 45.5,
|
||||
lng: -73.57,
|
||||
city: 'Montreal',
|
||||
code: 'MTL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 40.71,
|
||||
lng: -74.01,
|
||||
city: 'New York',
|
||||
code: 'NYC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 33.45,
|
||||
lng: -112.07,
|
||||
city: 'Phoenix',
|
||||
code: 'PHX',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 45.52,
|
||||
lng: -122.68,
|
||||
city: 'Portland',
|
||||
code: 'PDX',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 37.34,
|
||||
lng: -121.89,
|
||||
city: 'San Jose',
|
||||
code: 'SJ',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 47.61,
|
||||
lng: -122.33,
|
||||
city: 'Seattle',
|
||||
code: 'SEA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 38.63,
|
||||
lng: -90.2,
|
||||
city: 'St Louis',
|
||||
code: 'STL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 43.65,
|
||||
lng: -79.38,
|
||||
city: 'Toronto',
|
||||
code: 'TOR',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 49.28,
|
||||
lng: -123.12,
|
||||
city: 'Vancouver',
|
||||
code: 'VAN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 4.71,
|
||||
lng: -74.07,
|
||||
city: 'Bogota',
|
||||
code: 'BOG',
|
||||
available: true,
|
||||
x: -0.5
|
||||
},
|
||||
{
|
||||
lat: -34.61,
|
||||
lng: -58.38,
|
||||
city: 'Buenos Aires',
|
||||
code: 'BUE',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -25.43,
|
||||
lng: -49.27,
|
||||
city: 'Curitiba',
|
||||
code: 'CUR',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -3.73,
|
||||
lng: -38.52,
|
||||
city: 'Fortaleza',
|
||||
code: 'FOR',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -12.05,
|
||||
lng: -77.04,
|
||||
city: 'Lima',
|
||||
code: 'LIM',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -23.55,
|
||||
lng: -46.63,
|
||||
city: 'São Paulo',
|
||||
code: 'SAO',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -33.45,
|
||||
lng: -70.67,
|
||||
city: 'Santiago',
|
||||
code: 'SCL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -22.91,
|
||||
lng: -43.17,
|
||||
city: 'Rio de Janeiro',
|
||||
code: 'RIO',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 52.37,
|
||||
lng: 4.89,
|
||||
city: 'Amsterdam',
|
||||
code: 'AMS',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 55.68,
|
||||
lng: 12.57,
|
||||
city: 'Copenhagen',
|
||||
code: 'CPH',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 50.85,
|
||||
lng: 4.35,
|
||||
city: 'Brussels',
|
||||
code: 'BRU',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 53.35,
|
||||
lng: -6.26,
|
||||
city: 'Dublin',
|
||||
code: 'DUB',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 50.11,
|
||||
lng: 8.68,
|
||||
city: 'Frankfurt',
|
||||
code: 'FRA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 60.17,
|
||||
lng: 24.94,
|
||||
city: 'Helsinki',
|
||||
code: 'HEL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 38.72,
|
||||
lng: -9.14,
|
||||
city: 'Lisbon',
|
||||
code: 'LIS',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 51.51,
|
||||
lng: -0.13,
|
||||
city: 'London',
|
||||
code: 'LON',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 40.42,
|
||||
lng: -3.7,
|
||||
city: 'Madrid',
|
||||
code: 'MAD',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 53.48,
|
||||
lng: -2.24,
|
||||
city: 'Manchester',
|
||||
code: 'MAN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 43.3,
|
||||
lng: 5.37,
|
||||
city: 'Marseille',
|
||||
code: 'MRS',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 45.46,
|
||||
lng: 9.19,
|
||||
city: 'Milan',
|
||||
code: 'MIL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 48.14,
|
||||
lng: 11.58,
|
||||
city: 'Munich',
|
||||
code: 'MUN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 59.91,
|
||||
lng: 10.75,
|
||||
city: 'Oslo',
|
||||
code: 'OSL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 38.12,
|
||||
lng: 13.36,
|
||||
city: 'Palermo',
|
||||
code: 'PAL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 48.86,
|
||||
lng: 2.35,
|
||||
city: 'Paris',
|
||||
code: 'PAR',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 41.9,
|
||||
lng: 12.5,
|
||||
city: 'Rome',
|
||||
code: 'ROM',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 42.7,
|
||||
lng: 23.32,
|
||||
city: 'Sofia',
|
||||
code: 'SOF',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 59.33,
|
||||
lng: 18.07,
|
||||
city: 'Stockholm',
|
||||
code: 'STO',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 48.21,
|
||||
lng: 16.37,
|
||||
city: 'Vienna',
|
||||
code: 'VIE',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 5.56,
|
||||
lng: -0.2,
|
||||
city: 'Accra',
|
||||
code: 'ACC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -33.93,
|
||||
lng: 18.42,
|
||||
city: 'Cape Town',
|
||||
code: 'CPT',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -26.2,
|
||||
lng: 28.05,
|
||||
city: 'Johannesburg',
|
||||
code: 'JHB',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 13.75,
|
||||
lng: 100.5,
|
||||
city: 'Bangkok',
|
||||
code: 'BKK',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 13.08,
|
||||
lng: 80.28,
|
||||
city: 'Chennai',
|
||||
code: 'CHE',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 25.27,
|
||||
lng: 55.3,
|
||||
city: 'Dubai',
|
||||
code: 'DXB',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 25.12,
|
||||
lng: 56.33,
|
||||
city: 'Fujairah',
|
||||
code: 'FUJ',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 22.32,
|
||||
lng: 114.17,
|
||||
city: 'Hong Kong',
|
||||
code: 'HK',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 17.38,
|
||||
lng: 78.48,
|
||||
city: 'Hyderabad',
|
||||
code: 'HYD',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 22.57,
|
||||
lng: 88.36,
|
||||
city: 'Kolkata',
|
||||
code: 'KOL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 3.14,
|
||||
lng: 101.69,
|
||||
city: 'Kuala Lumpur',
|
||||
code: 'KL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 14.6,
|
||||
lng: 120.98,
|
||||
city: 'Manila',
|
||||
code: 'MNL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 19.08,
|
||||
lng: 72.88,
|
||||
city: 'Mumbai',
|
||||
code: 'MUM',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 28.61,
|
||||
lng: 77.21,
|
||||
city: 'New Delhi',
|
||||
code: 'DEL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 34.69,
|
||||
lng: 135.5,
|
||||
city: 'Osaka',
|
||||
code: 'OSA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 37.57,
|
||||
lng: 126.98,
|
||||
city: 'Seoul',
|
||||
code: 'SEL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 1.35,
|
||||
lng: 103.82,
|
||||
city: 'Singapore',
|
||||
code: 'SIN',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 35.69,
|
||||
lng: 139.69,
|
||||
city: 'Tokyo',
|
||||
code: 'TYO',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -34.93,
|
||||
lng: 138.6,
|
||||
city: 'Adelaide',
|
||||
code: 'ADL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -36.85,
|
||||
lng: 174.76,
|
||||
city: 'Auckland',
|
||||
code: 'AKL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -27.47,
|
||||
lng: 153.03,
|
||||
city: 'Brisbane',
|
||||
code: 'BNE',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -43.53,
|
||||
lng: 172.64,
|
||||
city: 'Christchurch',
|
||||
code: 'CHC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -37.81,
|
||||
lng: 144.96,
|
||||
city: 'Melbourne',
|
||||
code: 'MEL',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -31.95,
|
||||
lng: 115.85,
|
||||
city: 'Perth',
|
||||
code: 'PER',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -33.87,
|
||||
lng: 151.21,
|
||||
city: 'Sydney',
|
||||
code: 'SYD',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -41.29,
|
||||
lng: 174.78,
|
||||
city: 'Wellington',
|
||||
code: 'WLG',
|
||||
available: true
|
||||
}
|
||||
],
|
||||
edges: [
|
||||
{
|
||||
lat: 40.71,
|
||||
lng: -74.01,
|
||||
city: 'New York',
|
||||
code: 'NYC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 50.11,
|
||||
lng: 8.68,
|
||||
city: 'Frankfurt',
|
||||
code: 'FRA',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: -33.87,
|
||||
lng: 151.21,
|
||||
city: 'Sydney',
|
||||
code: 'AUS',
|
||||
available: true
|
||||
}
|
||||
],
|
||||
regions: [
|
||||
{
|
||||
lat: 40.71,
|
||||
lng: -74.01,
|
||||
city: 'New York',
|
||||
code: 'NYC',
|
||||
available: true
|
||||
},
|
||||
{
|
||||
lat: 50.11,
|
||||
lng: 8.68,
|
||||
city: 'Frankfurt',
|
||||
code: 'FRA',
|
||||
available: true
|
||||
},
|
||||
|
||||
{
|
||||
lat: -33.87,
|
||||
lng: 151.21,
|
||||
city: 'Sydney',
|
||||
code: 'AUS',
|
||||
available: true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export type PinSegment = keyof typeof pins;
|
||||
90
src/lib/components/appwrite-network/map-marker.svelte
Normal file
@@ -0,0 +1,90 @@
|
||||
<script lang="ts">
|
||||
import { classNames } from '$lib/utils/classnames';
|
||||
import { slugify } from '$lib/utils/slugify';
|
||||
import { Tooltip } from 'bits-ui';
|
||||
|
||||
interface Props {
|
||||
city: string;
|
||||
code: string;
|
||||
index: number;
|
||||
lat: number;
|
||||
lng: number;
|
||||
position: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
bounds: {
|
||||
north: number;
|
||||
south: number;
|
||||
west: number;
|
||||
east: number;
|
||||
};
|
||||
available?: boolean;
|
||||
class?: string;
|
||||
animate?: boolean;
|
||||
isOpen: boolean;
|
||||
}
|
||||
|
||||
const {
|
||||
city,
|
||||
code,
|
||||
index = 0,
|
||||
position,
|
||||
available = false,
|
||||
class: className = '',
|
||||
animate = false,
|
||||
isOpen = false
|
||||
}: Props = $props();
|
||||
|
||||
let open = $state(isOpen);
|
||||
|
||||
$effect(() => {
|
||||
open = isOpen;
|
||||
});
|
||||
</script>
|
||||
|
||||
<Tooltip.Root bind:open>
|
||||
<Tooltip.Trigger
|
||||
class={classNames(
|
||||
'group absolute flex size-3 cursor-pointer items-center justify-center opacity-0 [animation-delay:var(--delay)]',
|
||||
{ 'animate-fade-in': animate }
|
||||
)}
|
||||
style="left:{position.x}%; top:{position.y}%; --delay:{index * 10}ms;"
|
||||
data-region={slugify(city)}
|
||||
data-active={isOpen}
|
||||
>
|
||||
<span
|
||||
class="from-accent/20 to-accent/10 border-gradient ease-spring absolute inline-flex h-5 w-5 rounded-full bg-gradient-to-b opacity-0 transition-opacity group-hover:animate-ping group-hover:opacity-75 before:rounded-full"
|
||||
style:animation-duration="1.5s"
|
||||
></span>
|
||||
<span class="bg-accent absolute inline-flex h-full w-full rounded-full"></span>
|
||||
<span class="absolute size-1/2 rounded-full bg-white/80 transition-all"></span>
|
||||
</Tooltip.Trigger>
|
||||
|
||||
<Tooltip.Content
|
||||
sideOffset={12}
|
||||
class={classNames(
|
||||
'bg-card/90 border-gradient relative z-100 flex w-[190px] flex-col gap-2 rounded-[10px] p-2 backdrop-blur-lg before:rounded-[10px] after:rounded-[10px]',
|
||||
'data-[state="closed"]:animate-menu-out data-[state="instant-open"]:animate-menu-in data-[state="delayed-open"]:animate-menu-in',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<span class="text-primary text-caption w-fit"
|
||||
>{city}
|
||||
({code})</span
|
||||
>
|
||||
{#if available}
|
||||
<div
|
||||
class="text-caption flex h-5 items-center justify-center place-self-start rounded-md bg-[#10B981]/24 p-1 text-center text-[#B4F8E2]"
|
||||
>
|
||||
<span class="text-micro -tracking-tight">Available now</span>
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
class="text-caption flex h-5 items-center justify-center place-self-start rounded-md bg-white/6 p-1 text-center text-white/60"
|
||||
>
|
||||
<span class="text-micro -tracking-tight">Planned</span>
|
||||
</div>
|
||||
{/if}
|
||||
</Tooltip.Content>
|
||||
</Tooltip.Root>
|
||||
55
src/lib/components/appwrite-network/map-nav.svelte
Normal file
@@ -0,0 +1,55 @@
|
||||
<script lang="ts">
|
||||
import { classNames } from '$lib/utils/classnames';
|
||||
import { Tabs } from 'bits-ui';
|
||||
|
||||
import type { IconType } from '../ui';
|
||||
import Icon from '../ui/icon';
|
||||
|
||||
type Props = {
|
||||
onValueChange: (value: string) => void;
|
||||
};
|
||||
|
||||
const { onValueChange }: Props = $props();
|
||||
|
||||
const navItems: Array<{ label: string; value: string; icon: IconType }> = [
|
||||
{
|
||||
label: 'PoP Locations',
|
||||
value: 'pop-locations',
|
||||
icon: 'pop-locations'
|
||||
},
|
||||
{
|
||||
label: 'Edges',
|
||||
value: 'edges',
|
||||
icon: 'edge'
|
||||
},
|
||||
{
|
||||
label: 'Regions',
|
||||
value: 'regions',
|
||||
icon: 'regions'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<Tabs.Root
|
||||
value={navItems[0].value}
|
||||
{onValueChange}
|
||||
class="flex flex-col items-center justify-center gap-12"
|
||||
>
|
||||
<Tabs.List
|
||||
class="border-smooth animate-fade-in bg-card relative grid w-full max-w-xl grid-cols-1 place-content-center gap-3 p-1 px-8 drop-shadow-md md:grid-cols-3 md:rounded-full md:border md:px-1"
|
||||
>
|
||||
{#each navItems as { label, icon, value }, index}
|
||||
<Tabs.Trigger
|
||||
{value}
|
||||
class={classNames(
|
||||
'text-caption animate-enter text-primary bg-smooth border-smooth flex h-8 cursor-pointer items-center justify-center gap-2 rounded-full border font-medium outline-0 transition-colors hover:border-white/12',
|
||||
'group data-[state="active"]:bg-accent/4 data-[state="active"]:border-accent/36 data-[state="active"]:text-white'
|
||||
)}
|
||||
style="animation-delay:{index * 75}ms;"
|
||||
>
|
||||
<Icon name={icon} class="group-data-[state='active']:text-accent -ml-2" />
|
||||
{label}</Tabs.Trigger
|
||||
>
|
||||
{/each}
|
||||
</Tabs.List>
|
||||
</Tabs.Root>
|
||||
140
src/lib/components/appwrite-network/map.svelte
Normal file
@@ -0,0 +1,140 @@
|
||||
<script lang="ts" module>
|
||||
export const MAP_BOUNDS = $state({
|
||||
west: -130,
|
||||
east: 180,
|
||||
north: 70,
|
||||
south: -65
|
||||
});
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import MapMarker from './map-marker.svelte';
|
||||
import { slugify } from '$lib/utils/slugify';
|
||||
import { classNames } from '$lib/utils/classnames';
|
||||
import { Tooltip } from 'bits-ui';
|
||||
import MapNav from './map-nav.svelte';
|
||||
import { useMousePosition } from '$lib/actions/mouse-position';
|
||||
import { useAnimateInView } from '$lib/actions/animate-in-view';
|
||||
import { pins, type PinSegment } from './data/pins';
|
||||
import { latLongToSvgPosition } from './utils/projections';
|
||||
|
||||
let dimensions = $state({
|
||||
width: 0,
|
||||
height: 0
|
||||
});
|
||||
|
||||
let activeRegion = $state<string | null>(null);
|
||||
let activeMarker: HTMLElement | null = null;
|
||||
let activeSegment = $state<string>('pop-locations');
|
||||
|
||||
const { action: mousePosition, position } = useMousePosition();
|
||||
const { action: inView, animate } = useAnimateInView({});
|
||||
|
||||
const scrollMarkerIntoView = (marker: HTMLElement) => {
|
||||
return new Promise<void>((resolve) => {
|
||||
marker.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'nearest',
|
||||
inline: 'center'
|
||||
});
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
if (entries[0].intersectionRatio > 0.5) {
|
||||
observer.disconnect();
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
{ threshold: [0, 0.25, 0.5, 0.75, 1] }
|
||||
);
|
||||
|
||||
observer.observe(marker);
|
||||
});
|
||||
};
|
||||
|
||||
const handleSetActiveMarker = async (city: string) => {
|
||||
const citySlug = slugify(city);
|
||||
|
||||
if (activeRegion === citySlug) {
|
||||
activeMarker = null;
|
||||
activeRegion = null;
|
||||
return;
|
||||
}
|
||||
|
||||
activeMarker = document.querySelector(`[data-region="${citySlug}"]`);
|
||||
|
||||
if (activeMarker) {
|
||||
await scrollMarkerIntoView(activeMarker);
|
||||
activeRegion = citySlug;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="w-full overflow-scroll [scrollbar-width:none]">
|
||||
<div
|
||||
class="sticky left-0 z-10 mb-8 hidden w-screen gap-2 overflow-scroll px-8 [scrollbar-width:none]"
|
||||
>
|
||||
{#each pins[activeSegment as PinSegment] as pin}
|
||||
<button
|
||||
class={classNames(
|
||||
'border-gradient grow rounded-full bg-gradient-to-br px-4 py-1 text-nowrap text-white backdrop-blur-lg transition-colors before:rounded-full after:rounded-full',
|
||||
{
|
||||
'from-accent to-accent/50': activeRegion === slugify(pin.city),
|
||||
'from-greyscale-800/30 to-greyscale-700/30':
|
||||
activeRegion !== slugify(pin.city)
|
||||
}
|
||||
)}
|
||||
onclick={() => handleSetActiveMarker(pin.city)}
|
||||
>
|
||||
{pin.city}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="relative container mx-auto flex h-full w-[250vw] flex-col justify-center overflow-scroll px-0 py-10 transition-all delay-250 duration-250 md:w-fit md:flex-row md:overflow-auto md:py-0"
|
||||
use:inView
|
||||
use:mousePosition
|
||||
>
|
||||
<div
|
||||
class="map relative w-full origin-bottom overflow-scroll transition-all [scrollbar-width:none]"
|
||||
bind:clientWidth={dimensions.width}
|
||||
bind:clientHeight={dimensions.height}
|
||||
>
|
||||
<div
|
||||
class="absolute inset-0 mask-[image:url('/images/regions/map.svg')] mask-contain mask-no-repeat"
|
||||
>
|
||||
<div
|
||||
class={classNames(
|
||||
'relative block aspect-square size-40 rounded-full blur-3xl transition-opacity',
|
||||
'from-accent bg-radial-[circle_at_center] via-white/70 to-white/70',
|
||||
'transform-[translate3d(calc(var(--mouse-x,_-100%)_*_1_-_16rem),_calc(var(--mouse-y,_-100%)_*_1_-_28rem),0)]'
|
||||
)}
|
||||
style:--mouse-x="{$position.x}px"
|
||||
style:--mouse-y="{$position.y}px"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<img
|
||||
src="/images/regions/map.svg"
|
||||
class="pointer-events-none relative -z-10 opacity-10"
|
||||
draggable="false"
|
||||
alt="Map of the world"
|
||||
/>
|
||||
|
||||
<Tooltip.Provider delayDuration={0} skipDelayDuration={500} disableCloseOnTriggerClick>
|
||||
{#each pins[activeSegment as PinSegment].map( (pin) => ({ ...pin, isOpen: activeRegion === slugify(pin.city), position: latLongToSvgPosition( { latitude: pin.lat, longitude: pin.lng, ...dimensions } ) }) ) as pin, index}
|
||||
<MapMarker
|
||||
{...pin}
|
||||
position={pin.position}
|
||||
animate={$animate}
|
||||
{index}
|
||||
bounds={MAP_BOUNDS}
|
||||
/>
|
||||
{/each}
|
||||
</Tooltip.Provider>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<MapNav onValueChange={(value) => (activeSegment = value)} />
|
||||
30
src/lib/components/appwrite-network/utils/projections.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { MAP_BOUNDS } from '../map.svelte';
|
||||
|
||||
type Coordinates = {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
};
|
||||
|
||||
export const latLongToSvgPosition = ({
|
||||
latitude,
|
||||
longitude,
|
||||
width,
|
||||
height
|
||||
}: Coordinates & { width: number; height: number }) => {
|
||||
const { west, east, north, south } = MAP_BOUNDS;
|
||||
|
||||
// Handle longitude wrapping for coordinates crossing the date line
|
||||
let lng = longitude;
|
||||
if (lng < west) lng += 360;
|
||||
else if (lng > east) lng -= 360;
|
||||
|
||||
// Calculate position as percentage of the map bounds
|
||||
const lngRatio = (lng - west) / (east - west);
|
||||
const latRatio = (north - latitude) / (north - south);
|
||||
|
||||
// Convert to percentages clamped between 0-100
|
||||
const x = Math.max(0, Math.min(100, lngRatio * 100));
|
||||
const y = Math.max(0, Math.min(100, latRatio * 100));
|
||||
|
||||
return { x, y };
|
||||
};
|
||||
@@ -1,9 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { classNames } from '$lib/utils/classnames';
|
||||
import type { Snippet } from 'svelte';
|
||||
import type { SvelteHTMLElements } from 'svelte/elements';
|
||||
|
||||
let className = '';
|
||||
type Props = {
|
||||
class?: string;
|
||||
children?: Snippet;
|
||||
} & SvelteHTMLElements['span'];
|
||||
|
||||
export { className as class };
|
||||
let { class: className = '', children, ...rest }: Props = $props();
|
||||
</script>
|
||||
|
||||
<span
|
||||
@@ -11,6 +16,7 @@
|
||||
'block bg-[linear-gradient(6deg,_#f8a1ba,_#fff_35%)] bg-clip-text text-transparent',
|
||||
className
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
<slot />
|
||||
{@render children?.()}
|
||||
</span>
|
||||
|
||||
|
Before Width: | Height: | Size: 83 KiB |
@@ -139,14 +139,6 @@
|
||||
fill-rule="evenodd"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="customize" stroke="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
d="M13.750 2.914 C 13.517 2.971,13.319 3.079,13.067 3.285 C 12.947 3.383,11.791 4.525,10.497 5.823 C 7.967 8.360,8.038 8.279,7.918 8.749 C 7.847 9.023,7.846 10.546,7.916 10.876 C 8.045 11.485,8.515 11.955,9.124 12.084 C 9.454 12.154,10.977 12.153,11.251 12.082 C 11.724 11.961,11.628 12.046,14.286 9.387 C 15.793 7.880,16.802 6.845,16.874 6.733 C 17.208 6.214,17.216 5.562,16.893 5.058 C 16.714 4.778,15.221 3.285,14.940 3.106 C 14.603 2.890,14.144 2.816,13.750 2.914 M14.321 4.138 C 14.468 4.249,15.656 5.429,15.803 5.611 C 15.994 5.848,15.984 5.940,15.737 6.224 C 15.628 6.348,15.400 6.589,15.228 6.758 L 14.916 7.066 13.924 6.074 L 12.933 5.083 13.342 4.681 C 13.903 4.128,13.980 4.067,14.113 4.067 C 14.175 4.067,14.267 4.099,14.321 4.138 M4.733 4.438 C 4.093 4.525,3.540 5.078,3.435 5.733 C 3.388 6.028,3.387 14.966,3.434 15.267 C 3.536 15.920,4.077 16.460,4.733 16.565 C 5.028 16.612,13.966 16.613,14.267 16.566 C 14.920 16.464,15.460 15.923,15.565 15.267 C 15.586 15.138,15.600 14.352,15.600 13.324 C 15.600 11.492,15.598 11.463,15.440 11.289 C 15.174 10.995,14.666 11.062,14.472 11.417 C 14.423 11.505,14.415 11.730,14.400 13.341 L 14.383 15.165 14.274 15.274 L 14.165 15.383 9.500 15.383 L 4.835 15.383 4.726 15.274 L 4.617 15.165 4.617 10.500 L 4.617 5.835 4.726 5.726 L 4.835 5.617 6.742 5.600 C 8.591 5.584,8.654 5.581,8.767 5.515 C 9.173 5.276,9.156 4.699,8.736 4.477 L 8.590 4.400 6.770 4.404 C 5.769 4.406,4.852 4.422,4.733 4.438 M12.593 9.390 C 11.782 10.201,11.079 10.881,11.031 10.901 C 10.894 10.958,9.338 10.931,9.247 10.870 C 9.092 10.767,9.085 10.725,9.072 9.890 C 9.066 9.453,9.070 9.056,9.082 9.006 C 9.097 8.948,9.622 8.398,10.593 7.425 L 12.083 5.933 13.075 6.925 L 14.067 7.916 12.593 9.390 "
|
||||
stroke="none"
|
||||
fill-rule="evenodd"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="daily-dev" stroke="currentColor" viewBox="0 0 40 40">
|
||||
<path
|
||||
d="M12.467 11.058 C 12.375 11.089,12.180 11.176,12.033 11.252 C 11.646 11.454,4.391 18.744,4.191 19.133 C 3.977 19.550,3.974 20.303,4.186 20.735 C 4.293 20.953,5.393 22.094,8.150 24.846 C 11.945 28.635,11.969 28.657,12.359 28.769 C 12.842 28.908,13.335 28.876,13.737 28.680 C 13.954 28.575,16.126 26.443,21.866 20.702 L 29.699 12.868 28.966 12.129 C 28.531 11.691,28.101 11.322,27.908 11.223 C 27.463 10.994,26.981 10.953,26.491 11.101 C 26.102 11.219,26.069 11.251,18.211 19.093 L 10.322 26.967 11.189 25.233 L 12.056 23.500 10.278 21.716 L 8.501 19.933 10.717 17.717 L 12.933 15.501 14.700 17.267 L 16.467 19.033 17.783 17.716 L 19.099 16.400 16.566 13.866 C 14.733 12.032,13.950 11.293,13.733 11.191 C 13.410 11.039,12.740 10.968,12.467 11.058 M28.844 14.711 L 27.989 16.422 29.761 18.195 L 31.533 19.967 28.532 22.967 C 26.392 25.105,25.489 26.053,25.385 26.266 C 25.191 26.665,25.188 27.313,25.379 27.739 C 25.681 28.413,26.326 28.829,27.067 28.829 C 27.884 28.829,27.776 28.919,31.907 24.780 C 36.005 20.674,35.947 20.743,35.953 19.967 C 35.959 19.197,35.961 19.199,32.715 15.950 C 31.094 14.327,29.752 13.000,29.733 13.000 C 29.714 13.000,29.314 13.770,28.844 14.711 "
|
||||
@@ -187,6 +179,14 @@
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="edge" stroke="currentColor" viewBox="0 0 21 20">
|
||||
<path
|
||||
d="M9.925 4.028 C 9.521 4.066,8.877 4.204,8.524 4.328 C 8.123 4.469,7.392 4.849,7.035 5.101 C 6.608 5.403,5.892 6.119,5.591 6.545 C 5.321 6.929,4.984 7.584,4.835 8.018 C 4.401 9.277,4.401 10.708,4.835 11.967 C 5.340 13.435,6.497 14.723,7.918 15.400 C 10.018 16.401,12.497 16.102,14.298 14.630 C 14.650 14.342,15.135 13.821,15.408 13.438 C 15.675 13.063,16.010 12.412,16.165 11.967 C 16.599 10.715,16.599 9.270,16.165 8.018 C 15.445 5.946,13.523 4.360,11.374 4.065 C 10.964 4.009,10.306 3.992,9.925 4.028 M11.305 5.269 C 12.589 5.477,13.793 6.266,14.514 7.372 C 15.950 9.575,15.343 12.526,13.153 13.986 C 12.377 14.505,11.454 14.781,10.500 14.781 C 9.605 14.781,8.772 14.552,8.033 14.104 C 6.863 13.395,6.055 12.239,5.786 10.891 C 5.702 10.471,5.702 9.514,5.786 9.094 C 6.040 7.821,6.785 6.700,7.840 6.005 C 8.366 5.658,9.088 5.368,9.663 5.271 C 10.068 5.204,10.894 5.203,11.305 5.269 "
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
fill-rule="evenodd"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="ext-link" stroke="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
d="M9.814 6.600 L 6.578 6.617 6.460 6.706 C 6.133 6.956,6.164 7.490,6.517 7.690 L 6.650 7.766 9.175 7.766 C 10.564 7.766,11.700 7.778,11.700 7.791 C 11.700 7.805,10.486 9.031,9.002 10.516 C 7.492 12.027,6.288 13.258,6.268 13.311 C 6.213 13.459,6.227 13.690,6.300 13.833 C 6.436 14.100,6.816 14.213,7.093 14.069 C 7.162 14.033,8.403 12.817,9.900 11.319 L 12.583 8.633 12.600 11.208 L 12.617 13.783 12.694 13.892 C 12.934 14.229,13.477 14.205,13.685 13.849 L 13.764 13.715 13.768 10.360 C 13.772 6.725,13.781 6.918,13.594 6.743 C 13.485 6.641,13.289 6.565,13.159 6.575 C 13.099 6.579,11.594 6.590,9.814 6.600 "
|
||||
@@ -345,6 +345,14 @@
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="pop-locations" stroke="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
d="M9.167 4.438 C 7.692 4.591,6.489 5.403,5.845 6.679 C 5.665 7.034,5.490 7.548,5.417 7.933 C 5.388 8.089,5.357 8.248,5.349 8.287 C 5.336 8.348,5.303 8.360,5.098 8.379 C 4.540 8.431,3.888 8.622,3.350 8.890 C 2.026 9.551,1.337 10.768,1.411 12.317 C 1.497 14.133,2.739 15.301,4.866 15.565 C 5.255 15.613,14.745 15.613,15.134 15.565 C 16.701 15.370,17.807 14.676,18.307 13.574 C 18.646 12.826,18.689 11.790,18.416 10.950 C 17.980 9.610,16.649 8.644,14.885 8.388 L 14.621 8.349 14.529 8.031 C 14.275 7.147,13.888 6.448,13.316 5.840 C 12.290 4.750,10.850 4.264,9.167 4.438 M10.305 5.635 C 11.168 5.723,11.851 6.047,12.419 6.638 C 13.064 7.309,13.425 8.176,13.517 9.275 L 13.539 9.533 13.995 9.533 C 15.366 9.534,16.567 10.061,17.063 10.881 C 17.464 11.544,17.505 12.528,17.158 13.178 C 16.817 13.817,16.071 14.239,15.057 14.366 C 14.685 14.412,5.315 14.412,4.943 14.366 C 3.718 14.212,2.914 13.644,2.677 12.763 C 2.593 12.452,2.602 11.738,2.694 11.395 C 2.917 10.563,3.522 10.006,4.519 9.717 C 4.960 9.589,5.406 9.533,5.983 9.533 L 6.500 9.533 6.501 9.275 C 6.501 8.850,6.561 8.267,6.631 7.994 C 7.068 6.287,8.387 5.440,10.305 5.635 "
|
||||
stroke="none"
|
||||
fill-rule="evenodd"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="product-hunt" stroke="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
d="M9.224 1.033 C 7.407 1.209,5.791 1.860,4.351 2.994 C 3.967 3.296,3.138 4.154,2.822 4.575 C 0.394 7.814,0.393 12.182,2.821 15.425 C 3.205 15.937,4.063 16.795,4.575 17.179 C 7.818 19.607,12.182 19.607,15.425 17.179 C 15.937 16.795,16.795 15.937,17.179 15.425 C 19.607 12.182,19.606 7.814,17.178 4.575 C 16.862 4.154,16.033 3.296,15.649 2.994 C 14.353 1.973,12.898 1.338,11.312 1.100 C 10.789 1.022,9.699 0.987,9.224 1.033 M11.963 5.594 C 12.737 5.799,13.399 6.272,13.823 6.922 C 14.180 7.470,14.333 7.988,14.333 8.650 C 14.333 9.309,14.180 9.831,13.827 10.372 C 13.404 11.020,12.748 11.493,11.976 11.708 C 11.731 11.776,11.634 11.781,10.175 11.792 L 8.633 11.804 8.633 13.152 L 8.633 14.500 7.750 14.500 L 6.867 14.500 6.867 9.999 L 6.867 5.497 9.275 5.508 C 11.639 5.520,11.688 5.521,11.963 5.594 M8.633 8.648 L 8.633 10.000 9.993 10.000 C 11.492 10.000,11.607 9.988,11.905 9.797 C 12.386 9.488,12.630 8.934,12.519 8.402 C 12.425 7.950,12.166 7.624,11.741 7.423 L 11.517 7.317 10.075 7.307 L 8.633 7.297 8.633 8.648 "
|
||||
@@ -361,6 +369,14 @@
|
||||
fill-rule="evenodd"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="regions" stroke="currentColor" viewBox="0 0 21 20">
|
||||
<path
|
||||
d="M9.468 2.484 C 8.358 2.664,7.422 3.046,6.510 3.690 C 6.111 3.973,5.323 4.766,5.030 5.180 C 4.233 6.306,3.806 7.818,3.917 9.119 C 4.093 11.169,5.147 13.050,7.302 15.155 C 8.143 15.977,9.253 16.888,10.023 17.390 C 10.274 17.554,10.317 17.570,10.500 17.570 C 10.683 17.570,10.726 17.554,10.977 17.390 C 12.355 16.491,14.197 14.796,15.194 13.510 C 17.213 10.907,17.631 8.361,16.431 5.968 C 16.114 5.334,15.817 4.930,15.261 4.374 C 14.350 3.464,13.397 2.924,12.145 2.609 C 11.339 2.406,10.262 2.356,9.468 2.484 M11.242 3.657 C 13.450 3.949,15.235 5.489,15.746 7.543 C 15.985 8.501,15.920 9.509,15.557 10.483 C 14.974 12.050,13.662 13.713,11.765 15.290 C 11.209 15.752,10.560 16.240,10.500 16.240 C 10.438 16.240,9.772 15.737,9.196 15.256 C 6.995 13.419,5.618 11.502,5.214 9.713 C 5.070 9.073,5.086 8.182,5.255 7.528 C 5.915 4.961,8.494 3.294,11.242 3.657 M9.929 6.459 C 9.106 6.623,8.309 7.338,8.034 8.158 C 7.955 8.395,7.933 8.535,7.920 8.873 C 7.899 9.410,7.958 9.706,8.177 10.150 C 8.317 10.433,8.391 10.533,8.677 10.819 C 8.968 11.110,9.059 11.177,9.346 11.316 C 10.097 11.678,10.903 11.678,11.654 11.316 C 11.941 11.177,12.032 11.110,12.323 10.819 C 12.609 10.532,12.683 10.433,12.823 10.150 C 13.018 9.755,13.089 9.445,13.089 8.995 C 13.089 8.131,12.734 7.431,12.023 6.892 C 11.475 6.477,10.672 6.311,9.929 6.459 M11.085 7.733 C 11.957 8.142,12.162 9.297,11.482 9.976 C 11.296 10.163,11.095 10.277,10.833 10.347 C 10.371 10.471,9.871 10.329,9.518 9.976 C 8.977 9.435,8.975 8.556,9.514 8.018 C 9.701 7.830,9.970 7.678,10.197 7.629 C 10.456 7.574,10.841 7.619,11.085 7.733 "
|
||||
stroke="none"
|
||||
fill-rule="evenodd"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</symbol>
|
||||
<symbol id="rest" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path
|
||||
d="M4.640 2.425 C 4.589 2.435,4.499 2.466,4.440 2.494 C 4.316 2.553,3.392 3.456,2.373 4.511 C 1.626 5.286,1.627 5.285,1.627 5.597 C 1.627 5.875,1.814 6.169,2.080 6.310 C 2.215 6.382,2.612 6.380,2.760 6.307 C 2.820 6.278,3.113 6.012,3.432 5.698 L 3.998 5.140 4.006 7.470 L 4.013 9.800 4.075 9.926 C 4.204 10.188,4.528 10.400,4.800 10.400 C 5.072 10.400,5.396 10.188,5.525 9.926 L 5.587 9.800 5.594 7.471 L 5.602 5.141 6.181 5.711 C 6.513 6.037,6.807 6.304,6.867 6.333 C 6.935 6.366,7.048 6.389,7.178 6.395 C 7.353 6.404,7.404 6.396,7.527 6.340 C 7.903 6.168,8.088 5.754,7.968 5.354 C 7.925 5.209,7.538 4.795,6.303 3.571 C 5.480 2.757,5.264 2.556,5.146 2.500 C 4.987 2.425,4.787 2.395,4.640 2.425 M11.027 5.623 C 10.785 5.686,10.570 5.861,10.471 6.076 C 10.414 6.199,10.413 6.210,10.406 8.530 L 10.398 10.861 9.872 10.341 C 9.248 9.725,9.114 9.627,8.873 9.607 C 8.518 9.579,8.227 9.737,8.078 10.039 C 7.999 10.200,7.994 10.228,8.005 10.420 C 8.014 10.563,8.037 10.664,8.079 10.747 C 8.169 10.927,10.688 13.436,10.860 13.518 C 11.018 13.593,11.263 13.618,11.403 13.573 C 11.586 13.515,11.781 13.342,12.743 12.388 C 13.917 11.225,14.299 10.815,14.342 10.673 C 14.391 10.507,14.380 10.245,14.318 10.107 C 14.197 9.838,13.880 9.627,13.600 9.627 C 13.277 9.627,13.193 9.684,12.488 10.382 L 12.002 10.863 11.994 8.531 C 11.987 6.348,11.984 6.193,11.938 6.097 C 11.866 5.943,11.668 5.746,11.522 5.683 C 11.376 5.620,11.145 5.592,11.027 5.623 "
|
||||
|
||||
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 88 KiB |
@@ -22,6 +22,7 @@ export type IconType =
|
||||
| 'discord'
|
||||
| 'divider-vertical'
|
||||
| 'download'
|
||||
| 'edge'
|
||||
| 'ext-link'
|
||||
| 'firebase'
|
||||
| 'github'
|
||||
@@ -42,8 +43,10 @@ export type IconType =
|
||||
| 'platform'
|
||||
| 'play'
|
||||
| 'plus'
|
||||
| 'pop-locations'
|
||||
| 'product-hunt'
|
||||
| 'refine'
|
||||
| 'regions'
|
||||
| 'rest'
|
||||
| 'search'
|
||||
| 'sendgrid'
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { type Snippet } from 'svelte';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
children: Snippet;
|
||||
children?: import('svelte').Snippet;
|
||||
}
|
||||
|
||||
const { title, children }: Props = $props();
|
||||
@@ -12,5 +10,5 @@
|
||||
<div class="web-inline-info">
|
||||
<span class="icon-info" aria-hidden="true"></span>
|
||||
<h5 class="text-sub-body text-primary font-medium">{title}</h5>
|
||||
{@render children()}
|
||||
{@render children?.()}
|
||||
</div>
|
||||
|
||||
@@ -20,4 +20,5 @@
|
||||
export { default as Youtube } from './Youtube.svelte';
|
||||
export { default as Call_To_Action } from './Call_To_Action.svelte';
|
||||
export { default as Storage_Image } from './Storage_Image.svelte';
|
||||
export { default as Appwrite_Network_Map } from '../../lib/components/appwrite-network/map.svelte';
|
||||
</script>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<div class="my-12 lg:my-[7.5rem]">
|
||||
<section class="container pb-0">
|
||||
<a
|
||||
href="/blog/post/what-is-mcp"
|
||||
href="/blog/post/the-appwrite-network"
|
||||
class="web-hero-banner-button mb-4"
|
||||
on:click={() => trackEvent({ plausible: { name: 'Banner button click' } })}
|
||||
>
|
||||
@@ -142,7 +142,7 @@
|
||||
<span class="text-caption shrink-0 font-medium">New</span>
|
||||
<div class="web-hero-banner-button-sep"></div>
|
||||
<span class="text-caption web-u-trim-1"
|
||||
>Announcing new Appwrite MCP server</span
|
||||
>Announcing The Appwrite Network</span
|
||||
>
|
||||
<span class="web-icon-arrow-right shrink-0" aria-hidden="true"></span>
|
||||
</a>
|
||||
|
||||
@@ -51,7 +51,7 @@ Browsers have a default font size that users can change via the browser setting.
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -31,7 +31,7 @@ Now, in your Flutter app, you can use these mock numbers for authentication:
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
@@ -46,7 +46,7 @@ import { Client, Account } from "appwrite";
|
||||
const client = new Client();
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -37,7 +37,7 @@ Here is what this would look like using Swift.
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
@@ -66,7 +66,7 @@ You can send SMS messages using a Server SDK. To send SMS messages immediately,
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
@@ -174,7 +174,7 @@ import { Client, Account } from "appwrite";
|
||||
const client = new Client();
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -243,7 +243,7 @@ One of the most common examples of SDK Enums is OAuth providers. To log in with
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -91,7 +91,7 @@ import { Appwrite, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Appwrite();
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('articles-demo'); // Your project ID
|
||||
const databases = new Databases(client);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ import { Client, Account, ID } from 'react-native-appwrite';
|
||||
const client = new Client();
|
||||
|
||||
client
|
||||
.setEndpoint('http://cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setProject('455x34dfkj') // Your project ID
|
||||
.setPlatform('com.example.myappwriteapp'); // Your application ID or bundle ID
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ We then entered the application directory, installed the Appwrite Web SDK and Pi
|
||||
```js
|
||||
// ./src/lib/constants.js
|
||||
|
||||
export const APPWRITE_ENDPOINT = 'https://cloud.appwrite.io/v1';
|
||||
export const APPWRITE_ENDPOINT = 'https://<REGION>.cloud.appwrite.io/v1';
|
||||
|
||||
export const APPWRITE_PROJECT = '<PROJECT_ID>';
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
---
|
||||
layout: post
|
||||
title: How to change regions in Appwrite Cloud using migrations
|
||||
description: Learn how to migrate your Appwrite Cloud project from one region to another.
|
||||
date: 2025-04-15
|
||||
cover: /images/blog/change-regions-with-migrations/cover.png
|
||||
timeToRead: 10
|
||||
author: ebenezer-don
|
||||
category: tutorial
|
||||
featured: false
|
||||
---
|
||||
|
||||
With the launch of the **Appwrite Network**, Appwrite Cloud now gives you the ability to choose where your project is hosted. This means that you can bring your backend closer to your users, reducing latency, improving responsiveness, and aligning with local data residency laws if needed.
|
||||
|
||||
But what if you've already built and launched your app in one region, and now you need to move it to another? Currently, there's no simple toggle to switch regions, but Appwrite provides a built-in migration tool that allows you to create a new project in your target region and move your data and services to it.
|
||||
|
||||
In this guide, we'll walk through the process of migrating your Appwrite Cloud project to a new region, along with the steps to take after the migration is complete.
|
||||
|
||||
## What you need before starting
|
||||
|
||||
Before we get started, make sure a few things are in place:
|
||||
|
||||
- You have an Appwrite [Cloud account](https://cloud.appwrite.io/).
|
||||
- You have a project in Appwrite Cloud that's currently hosted in a region you want to move from. This is your **source project**.
|
||||
- You have permission to create new projects, and full access to the source project's settings.
|
||||
|
||||
Once you've got all that, we can get started.
|
||||
|
||||
## Step 1: Create your destination project
|
||||
|
||||
To get started, head over to the Appwrite Cloud console and create a new project. This is the one that will live in your new region.
|
||||
|
||||
Give it a name that distinguishes it from the original, especially if you want to keep both projects running side-by-side for a while.
|
||||
|
||||
When prompted to choose a region, pick the one you want to migrate into. This is where your project will be hosted going forward.
|
||||
|
||||
Once you've finished setting it up, you'll have a clean project ready to receive everything from your current environment.
|
||||
|
||||
## Step 2: Set up the destination project for import
|
||||
|
||||
Inside your new project, go to **Settings**, and look for the **Migrations** tab.
|
||||
|
||||

|
||||
|
||||
There you'll find the option to **Import project data**. Click the button to open the migration configuration screen.
|
||||
|
||||
This is where you'll enter the credentials from your source project, so Appwrite can pull everything over.
|
||||
|
||||
But first, we need to get those credentials.
|
||||
|
||||
## Step 3: Collect your source project credentials
|
||||
|
||||
Back in the Appwrite Cloud console, switch over to your source project.
|
||||
|
||||
You'll need three things from here:
|
||||
|
||||
1. A dedicated **API key** for migration.
|
||||
2. The **Project ID** of the source project.
|
||||
3. The **API endpoint** of the source project.
|
||||
|
||||
Here's how to get each one:
|
||||
|
||||
### Create an API key
|
||||
|
||||
From your source project, go to **Settings → API Keys** and create a new key. Give it a name that'll make it easy to identify later.
|
||||
|
||||

|
||||
|
||||
Set an expiration date. Since this key is likely to have access to a lot of data, you don't want it hanging around forever.
|
||||
|
||||
When assigning scopes, either select them all, or make sure to include at least: `users.read`, `databases.read`, `storage.read`, `functions.read`, and anything else you know your app uses.
|
||||
|
||||
Once the key is created, copy the secret for migration.
|
||||
|
||||
### Copy the Project ID and API endpoint
|
||||
|
||||
Still in the source project, head to **Settings**, and in the **Overview** tab, **API Credentials**.
|
||||
|
||||
Here, you'll find:
|
||||
|
||||
- The **Project ID**.
|
||||
- The **API Endpoint**
|
||||
|
||||
With this, you have your API key, project ID, and API endpoint. These are the three things you'll need to migrate your project.
|
||||
|
||||
## Step 4: Start the migration
|
||||
|
||||
Go back to your destination project, and in the **Settings** page, go to the **Migrations** tab. In **Migrations**, select **Import data** in the **Import project data** section.
|
||||
|
||||
Choose **Appwrite** as the source platform.
|
||||
|
||||

|
||||
|
||||
Then fill in the details from the source project:
|
||||
|
||||
- **Endpoint** → Paste the API endpoint URL.
|
||||
- **Project ID** → Paste the source project's ID.
|
||||
- **API Key** → Paste the secret key you created earlier.
|
||||
|
||||
Click **Next**.
|
||||
|
||||
Appwrite will now reach into the source project, check what's available, and return a list of resources it found: users, databases, collections, documents, storage buckets, files, functions, and so on.
|
||||
|
||||
You'll be prompted to choose what you want to bring over.
|
||||
|
||||
If you're planning to fully migrate the project, click **Select all**. You can also check top-level resources (like "Users", "Functions", "Databases") and then decide whether to include things like documents, teams, and environment variables.
|
||||
|
||||
When ready, click **Create**.
|
||||
|
||||
Now, Appwrite begins the actual data transfer.
|
||||
|
||||
## Step 5: Let the migration run and wait for it to complete
|
||||
|
||||
You'll see a progress indicator as the migration runs.
|
||||
|
||||
How long this takes depends on your data. If your project is lightweight, it might finish in under a minute. But if you have thousands of documents or large media files, it might take longer.
|
||||
|
||||
When the migration is complete, you'll see an indication in the console.
|
||||
|
||||

|
||||
|
||||
## After migration: what to verify
|
||||
|
||||
Once the migration is done, you can inspect the destination project to ensure everything transferred correctly.
|
||||
|
||||
Here are some things to check (if applicable):
|
||||
|
||||
- **Auth** → Confirm that users and teams are present.
|
||||
- **Databases** → Can you see your collections and documents?
|
||||
- **Storage** → Look inside your buckets and confirm that files are present.
|
||||
- **Functions** → Are your functions listed, and do they include deployments and any environment variables you selected?
|
||||
|
||||
Spend a few minutes to confirm that the migration worked as expected.
|
||||
|
||||
## What Appwrite doesn't migrate and what to do next
|
||||
|
||||
The migration tool brings over the majority of your project's data and config, but there are a few things you'll need to handle manually:
|
||||
|
||||
### Update your app code
|
||||
|
||||
This is an important step, since your app is still communicating with the *old* project.
|
||||
|
||||
Update your codebase to point to the **new Project ID** and **new API Endpoint** from the destination region. That means updating SDK initialization code across your frontend, mobile app, backend scripts, or wherever your app communicates with Appwrite.
|
||||
|
||||
Without this change, your app will continue talking to the source project.
|
||||
|
||||
### Recreate any needed API keys
|
||||
|
||||
The migration-specific API key doesn't stick around, and other existing keys are not carried over.
|
||||
|
||||
So if your app uses long-lived API keys for backend access or integrations, you'll need to recreate them in the destination project. Then update your environments accordingly.
|
||||
|
||||
### Re-register your platforms
|
||||
|
||||
Your registered platforms (iOS, Android, Web, Flutter, etc.) also aren't migrated automatically. You'll need to add them again from **Overview → Integrations → Platforms** in the destination project.
|
||||
|
||||
Pay close attention to this, especially if you use OAuth, custom domains, or push notifications.
|
||||
|
||||
### Check project-level settings
|
||||
|
||||
Some other configurations might also need to be manually re-applied, like:
|
||||
|
||||
- SMTP settings for emails
|
||||
- Custom domains
|
||||
- Function execution permissions
|
||||
- Service limits (if you had them changed)
|
||||
|
||||
It's worth going through the Settings page of both projects side-by-side to spot anything missing.
|
||||
|
||||
## Some final thoughts before you switch
|
||||
|
||||
You don't need to shut down your source project immediately. You might want to run both in parallel for a short time while you test the migrated version.
|
||||
|
||||
When you're ready to switch, make sure your app has been fully updated to use the new configuration, and that everything behaves as expected.
|
||||
|
||||
Schedule a short maintenance window if needed, especially if you're updating backend services or deployment pipelines that rely on Appwrite.
|
||||
|
||||
And as always, test thoroughly. Auth flows, file uploads, database reads/writes, scheduled functions need to be checked.
|
||||
|
||||
## Wrapping up
|
||||
|
||||
Migrating a project between regions in Appwrite Cloud is quite straightforward once you know the steps. The import tool handles the heavy lifting, and with the right preparation (API key, project ID, endpoint) it can move most of your app's backend in minutes.
|
||||
|
||||
Once the migration is complete, you'll have your Appwrite backend running where you want it, aligned with your new requirements, and ready to scale in the right place.
|
||||
|
||||
If you run into issues, the Appwrite docs and Discord community are solid places to troubleshoot and get support.
|
||||
@@ -61,7 +61,7 @@ The admin client must be set with an API key that has the necessary scopes in or
|
||||
|
||||
```jsx
|
||||
const adminClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>')
|
||||
.setKey('<API_KEY>')
|
||||
```
|
||||
@@ -90,7 +90,7 @@ The session client accepts the generated session secret and sets it using the `c
|
||||
|
||||
```jsx
|
||||
const sessionClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>')
|
||||
```
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ With the latest release of Appwrite, we have taken steps to improve type safety
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -78,7 +78,7 @@ With the latest release of Appwrite, we have taken steps to improve type safety
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -65,7 +65,7 @@ To define scopes in the Appwrite console, navigate to your function's settings a
|
||||
|
||||
```jsx
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Hardcoded API endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Hardcoded API endpoint
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY) // Static API key
|
||||
```
|
||||
|
||||
@@ -194,7 +194,7 @@ def main(context):
|
||||
|
||||
client = (
|
||||
Client()
|
||||
.set_endpoint("https://cloud.appwrite.io/v1")
|
||||
.set_endpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.set_project(os.environ["APPWRITE_FUNCTION_PROJECT_ID"])
|
||||
.set_key(os.environ["APPWRITE_API_KEY"])
|
||||
)
|
||||
|
||||
@@ -73,7 +73,7 @@ First, we initialize the login process by sending an email with the magic URL. I
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -103,7 +103,7 @@ First, we initialize the login process by sending an email. If the email has nev
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -138,7 +138,7 @@ First, we initialize the login process by sending an SMS. If the phone number ha
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
|
||||
@@ -70,7 +70,7 @@ import { Client, Account, ID } from 'react-native-appwrite';
|
||||
const client = new Client();
|
||||
|
||||
client
|
||||
.setEndpoint('http://cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setProject('455x34dfkj') // Your project ID
|
||||
.setPlatform('com.example.myappwriteapp'); // Your application ID or bundle ID
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Bringing along benefits such as massively reducing friction when using routes th
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -75,7 +75,7 @@ The admin client will need to be initialized with an API key in order to bypass
|
||||
import { Client } from "node-appwrite"
|
||||
|
||||
const adminClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>')
|
||||
.setKey('<YOUR_API_KEY>')
|
||||
```
|
||||
@@ -86,7 +86,7 @@ A session client will allow us to make requests as an authenticated end-user wit
|
||||
|
||||
```jsx
|
||||
const sessionClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>')
|
||||
|
||||
const session = req.cookies.session
|
||||
|
||||
@@ -58,7 +58,7 @@ Here’s an example of how you would programmatically send an SMS to a topic usi
|
||||
const sdk = require('node-appwrite');
|
||||
|
||||
const client = new sdk.Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ import { Client, Account } from 'appwrite'
|
||||
|
||||
// Initialize Appwrite client
|
||||
const client = new Client()
|
||||
client.setEndpoint('https://cloud.appwrite.io/v1').setProject('<PROJECT_ID>')
|
||||
client.setEndpoint('https://<REGION>.cloud.appwrite.io/v1').setProject('<PROJECT_ID>')
|
||||
|
||||
// Initialize Account
|
||||
const account = new Account(client)
|
||||
|
||||
@@ -94,7 +94,7 @@ Once that is done, you can use any of the Appwrite client SDKs to implement OAut
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -80,7 +80,7 @@ Appwrite Authentication also leverages password hashing algorithms to allow deve
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
91
src/routes/blog/post/product-update-march-2025/+page.markdoc
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
layout: post
|
||||
title: "March product update: Product Hunt launch, Appwrite MCP server, and faster backups."
|
||||
description: Get a full recap of products, features and programs we released in the month of March.
|
||||
date: 2025-04-11
|
||||
cover: /images/blog/product-update-march-2025/cover-image.png
|
||||
timeToRead: 10
|
||||
author: dennis-ivy
|
||||
category: product
|
||||
featured: false
|
||||
callToAction: true
|
||||
---
|
||||
|
||||
Welcome back to the March product update. Here’s what happened the past month:
|
||||
|
||||
- Launched the Appwrite MCP server
|
||||
- Key optimizations to Appwrite cloud backups
|
||||
- Update to budget limits in Appwrite Cloud
|
||||
|
||||
Plus, we've got something exciting to share with you. Let’s dive in.
|
||||
|
||||

|
||||
|
||||
# Big announcement coming soon
|
||||
|
||||
We’ve got a major announcement on the way. This time, we’re bringing the heat to Product Hunt. The Appwrite community is the first to know!
|
||||
|
||||
Visit our ‘Coming Soon’ page and click Notify Me to get an email when we go live. We can't wait to share what we’ve been working on.
|
||||
|
||||
[Go to Product Hunt](https://www.producthunt.com/products/appwrite)
|
||||
|
||||

|
||||
|
||||
# Appwrite MCP server
|
||||
|
||||
Did you know that Appwrite has launched its own MCP server? This means you can now let AI agents like Cursor or Windsurf analyze database records, access the User API, or perform actions directly on your Appwrite project.
|
||||
|
||||
Not sure where to start? No worries, we’ve got you covered.
|
||||
|
||||
- [Appwrite MCP documentation](https://appwrite.io/docs/tooling/mcp)
|
||||
- [Appwrite MCP server practical applications](https://www.youtube.com/watch?v=83rNS6W2Nu8)
|
||||
- [Learn more about MCP and how it works under the hood](https://appwrite.io/blog/post/what-is-mcp)
|
||||
|
||||
The Appwrite MCP server opens up infinite possibilities, and this is just the beginning. We can't wait to see how you’ll use it in your projects.
|
||||
|
||||

|
||||
|
||||
# Appwrite Cloud backups are now faster
|
||||
|
||||
Appwrite Cloud backups are now significantly faster. We’ve made key optimizations to our infrastructure, reducing backup times by up to 7x. With quicker data recovery and improved reliability, you can spend less time waiting and more time building.
|
||||
|
||||
[Learn more](https://appwrite.io/changelog/entry/2025-03-27)
|
||||
|
||||
# Update to budget limits in Appwrite Cloud
|
||||
|
||||
We’ve improved budget limits in Appwrite Cloud to give you better control over your organization’s scaling.
|
||||
|
||||
Now, setting the budget to 0 means your organization will not exceed its allocated resources, while null will explicitly disable the budget. This update ensures clearer budget management and better control over scaling.
|
||||
|
||||
[Learn more](https://appwrite.io/changelog/entry/2025-03-19)
|
||||
|
||||

|
||||
|
||||
# Community recognitions
|
||||
|
||||
This month, we’re excited to feature Geohash as part of our Monthly Community recognitions.
|
||||
|
||||
The Geohash application demonstrates how to implement geolocation-based user search with Appwrite.
|
||||
|
||||
A big shout-out to [Clément](https://github.com/clementg13). Check out their product, Geohash, [here](https://github.com/clementg13/Appwrite-Nearby-GeoLocation).
|
||||
|
||||
If you'd like to participate in next month's Community Recognitions, [join our Discord server](https://appwrite.io/discord) to showcase your project.
|
||||
|
||||
# Engineering resources
|
||||
|
||||
**Read**
|
||||
- [Lynx by ByteDance vs React Native](https://appwrite.io/blog/post/bytedance-lynx-vs-react-native)
|
||||
- [What exactly is MCP, and why is it trending?](https://appwrite.io/blog/post/what-is-mcp)
|
||||
- [Image transformation with Appwrite Storage](https://appwrite.io/blog/post/image-transformation-with-appwrite-storage)
|
||||
- [Building a backendless application with Angular and Appwrite](https://angular.love/building-a-backendless-application-with-angular-appwrite)
|
||||
|
||||
**Watch**
|
||||
- [Appwrite vs Supabase performance results](https://youtu.be/zWLfLxq2Ws4?si=7NaoZPb-JbDpNVfG)
|
||||
- [Appwrite MCP server practical examples](https://youtu.be/83rNS6W2Nu8?si=gJUMP4VisK_kG0nE)
|
||||
- [Appwrite MCP server setup with Cursor](https://www.youtube.com/watch?v=Qzikjm5H7wM)
|
||||
|
||||
# What's to come
|
||||
|
||||
That’s a wrap for March. We have a lot to come in the coming weeks, starting with new Cloud regions!
|
||||
|
||||
Follow us on [X](https://x.com/appwrite) and check our [Changelog](https://appwrite.io/changelog) regularly, as we will release more information in the coming weeks.
|
||||
@@ -62,7 +62,7 @@ const client = new sdk.Client();
|
||||
const messaging = new sdk.Messaging(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ All of the Appwrite client SDKs for Web, Flutter, iOS, or Android come with buil
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('<https://cloud.appwrite.io/v1>')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
client.subscribe('account', response => {
|
||||
|
||||
@@ -101,7 +101,7 @@ import { Client, Account, OAuthProvider } from 'appwrite'
|
||||
|
||||
const client = new Client()
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')// The Appwrite API endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')// The Appwrite API endpoint
|
||||
.setProject('project-id')// Your Appwrite project IDexport const account = new Account(client)
|
||||
export { OAuthProvider }
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ First, we initialize the login process by sending an email with the magic URL. I
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -100,7 +100,7 @@ First, we initialize the login process by sending an email. If the email has nev
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -135,7 +135,7 @@ First, we initialize the login process by sending an SMS. If the phone number ha
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
|
||||
@@ -79,7 +79,7 @@ const client = new sdk.Client();
|
||||
const messaging = new sdk.Messaging(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
98
src/routes/blog/post/the-appwrite-network/+page.markdoc
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Announcing the Appwrite Network: Appwrite’s vision for a global cloud infrastructure"
|
||||
description: Announcing more regions for Cloud, and many more to come with the introduction of the Appwrite Network.
|
||||
date: 2025-04-15
|
||||
cover: /images/blog/the-appwrite-network/network-cover-image.png
|
||||
timeToRead: 05
|
||||
author: christy-jacob
|
||||
category: product
|
||||
featured: true
|
||||
callToAction: true
|
||||
---
|
||||
|
||||
We are happy to announce the launch of the Appwrite Network, a network of cloud regions and edge locations (edges) to improve Appwrite Cloud availability, performance, and compliance with local regulations. This will provide Appwrite developers and teams with the best tools and infrastructure to build, deploy, and scale your applications. This brings us closer to the Appwrite mission of making software development more accessible and enjoyable for all developers.
|
||||
|
||||
Starting today, all Pro users have access to three regions of choice, including our two new regions in **New York City** ('NYC'), and **Sydney** ('SYD') that are joining our first region in **Frankfurt** ('FRA'). In the next few weeks, this will be available to all Cloud users, with more regions to come.
|
||||
|
||||
# The plan
|
||||
|
||||
The Appwrite Cloud beta journey began with a single region in Frankfurt, which allowed us to focus on delivering the highest quality and performance on a smaller scale. As we approach the General Availability (GA) of Appwrite Cloud, and with a growing number of developers, projects, and organizations on the platform, we are excited to share the plans to expand the network to include additional regions and edges across the globe.
|
||||
|
||||
| Region | Status | Region | Edge | Timeline |
|
||||
|---------------------|-----------------------|--------|------|---------------|
|
||||
| Frankfurt (`FRA`) | Ready and operational | Yes | Yes | Available Now |
|
||||
| Sydney (`SYD`) | Ready and operational | Yes | Yes | Available Now |
|
||||
| New York City (`NYC`) | Ready and operational | Yes | Yes | Available Now |
|
||||
| Singapore (`SGP`) | In work | Yes | Yes | Q4 2025 |
|
||||
| San Francisco (`SFO`) | In work | Yes | Yes | Q4 2025 |
|
||||
| Bangalore (`BLR`) | In plans | Yes | Yes | TBD |
|
||||
| Amsterdam (`AMS`) | In plans | Yes | Yes | TBD |
|
||||
| London (`LON`) | In plans | Yes | Yes | TBD |
|
||||
| Toronto (`TOR`) | In plans | Yes | Yes | TBD |
|
||||
|
||||

|
||||
|
||||
# Addressing the latency problem
|
||||
|
||||
Latency is a critical factor in the performance of both web and mobile applications. High latency can lead to slow response times, poor user experience, and ultimately, loss of revenue. There are several primary causes of latency:
|
||||
|
||||
- **Physical distance:** The further the data has to travel, the longer it takes. This is known as propagation delay.
|
||||
- **Network congestion:** Overloaded networks can slow down data transmission.
|
||||
- **Routing and switching:** Each hop a packet takes through the network can add delays.
|
||||
- **Server processing time:** The time it takes for a server to process a request and send a response.
|
||||
|
||||
Establishing a global network of regions and edges can significantly reduce latency. For example, without a global network, a request from a user in Sydney to a server in New York could experience latency upwards of 250 milliseconds. With a global network, routing that same request through an edge in Singapore and a region in Frankfurt can reduce latency to under 100 milliseconds.
|
||||
|
||||
A global network allows us to distribute data and processing power closer to the end-users, minimizing the distance that data needs to travel and thus reducing the time it takes for requests and responses to be processed. This results in faster load times, improved performance, and a better overall user experience.
|
||||
|
||||
# Why build the Appwrite Network?
|
||||
|
||||
Building a fully fledged network from scratch is not a decision we take lightly. Here are the key reasons behind this approach:
|
||||
|
||||
**1. Innovation and quality**: By owning the network, we can innovate and optimize in ways that would be impossible with off-the-shelf solutions. This control allows us to deliver a superior developer experience explicitly tailored to your needs.
|
||||
|
||||
**2. Security and trust**: Maintaining control over the infrastructure to ensure the highest standards of security and privacy for Appwrite developers. This helps us ensure you always own and control your data.
|
||||
|
||||
**3. Flexibility and customization**: Having a network allows us to be more agile and responsive to the evolving needs of Appwrite developers. We can quickly adapt and introduce new features and improvements without being constrained by third-party limitations.
|
||||
|
||||
**4. Cost efficiency**: By building and managing the network, we can reduce costs and pass those savings on to Appwrite developers. By maintaining independence, we can ensure predictable costs for compute, and this helps us make Appwrite more affordable for teams of all sizes.
|
||||
|
||||
**5. It’s fun**: At the core of Appwrite, we are geeks who love technology and building stuff from scratch, so you don’t have to. Building a network is not just a business decision but also a passion. It's an opportunity to push the boundaries of what's possible and share that excitement with the Appwrite community of developers.
|
||||
|
||||
# Regions vs Edges vs PoPs
|
||||
|
||||

|
||||
|
||||
In Appwrite, Regions are where all your core data and services live. This includes your databases, auth, functions, messaging, and storage. Regions are the source of truth, handling heavy workloads and ensuring your application runs reliably while keeping your data compliant with local regulations.
|
||||
|
||||
Edges are about speed. They process requests closer to your users using smart geo-routing, reducing latency by handling compute tasks at the nearest edge location. Edges are perfect for serving cached content, executing lightweight computations, and optimizing user interactions.
|
||||
|
||||
Our global CDN leverages strategically positioned Points of Presence (PoPs) to cache and deliver your content from locations nearest to your users, ensuring rapid load times and enhanced performance.
|
||||
|
||||
In short, a region hosts your data, and the edge executes your functions close to your users. Both regions and edges take advantage of the Appwrite CDN to optimize delivery and security.
|
||||
|
||||
# Data storage and global availability
|
||||
|
||||
One of the key features of the Appwrite Network is the ability to choose where your project's data is stored. You can select your preferred region, ensuring compliance with local data regulations and optimizing performance for your primary user base. However, thanks to the global network of edges, your data will be accessible worldwide on the Appwrite network, ensuring fast and reliable access for users regardless of their location.
|
||||
|
||||
Each region will also function as an edge for other regions, enhancing network coverage and reducing latency. This interconnected approach ensures that we can deliver the best possible performance and reliability for all Appwrite developers and your end-users.
|
||||
|
||||
# Global CDN with integrated DDoS protection
|
||||
|
||||
All Appwrite’s Cloud projects are served by Appwrite’s built-in CDN. Our new global CDN is designed to serve your content rapidly and reliably worldwide. By leveraging a network of strategically located points of presence (PoPs), the CDN ensures that every user request is delivered from the closest possible location, drastically reducing latency and enhancing the overall user experience.
|
||||
|
||||
Moreover, the CDN includes integrated DDoS protection that combines standard traffic analysis, rate limiting, and filtering techniques to help mitigate potential threats in real time. This balanced approach helps maintain solid performance while providing a reliable level of security for your applications.
|
||||
|
||||
# Web application firewall (WAF)
|
||||
|
||||
Our [Web Application Firewall](/docs/products/network/waf) (WAF) is now available exclusively to enterprise customers, providing a crucial protective layer for your applications. Operating at OSI Layer 7, the WAF inspects and filters all HTTP/HTTPS traffic in real time, effectively blocking common web vulnerabilities such as SQL injection, XSS, and CSRF, while also mitigating application-level DDoS attacks.
|
||||
|
||||
Customizable rulesets allow you to tailor the WAF to your application's specific needs, with detailed analysis of request headers, payloads, and query strings to identify and neutralize threats before they reach your infrastructure. Setup and configuration are managed through your dedicated Appwrite success manager, ensuring that the WAF adapts to evolving security challenges and compliance requirements. To learn more about our enterprise plan, you can [contact us](/contact-us/enterprise).
|
||||
|
||||
# The road ahead
|
||||
|
||||
We welcome you to visit the docs to learn more about the [Appwrite Network](/docs/products/network) and how Appwrite handle's other topics like [secure transportation](/docs/products/network/tls), [compression](/docs/products/network/compression), [caching](/docs/products/network/caching) and more.
|
||||
|
||||
We are excited about the future of the Appwrite network and the endless possibilities it will unlock for developers worldwide. Stay tuned for more updates as we continue to build and expand the network. Thank you for being part of the Appwrite community and for your ongoing support. Together, we are building the future of cloud platforms designed for developers.
|
||||
|
||||
@@ -77,7 +77,7 @@ One of the data retrieval APIs the Appwrite Database offers is a list documents
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
|
||||
@@ -7,7 +7,8 @@ cover: /images/blog/what-is-mcp/cover.png
|
||||
timeToRead: 7
|
||||
author: ebenezer-don
|
||||
category: tutorial
|
||||
featured: true
|
||||
featured: false
|
||||
callToAction: true
|
||||
---
|
||||
|
||||
If you've ever tried using an AI assistant for something practical, like pulling real data from your work files, checking a database, or sending a message, then you've probably hit a frustrating wall.
|
||||
|
||||
22
src/routes/changelog/(entries)/2025-04-15.markdoc
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
layout: changelog
|
||||
title: "Announcing the Appwrite Network: Appwrite’s vision for a global cloud infrastructure"
|
||||
date: 2025-04-15
|
||||
cover: /images/changelog/2025-04-15.png
|
||||
---
|
||||
|
||||
We’re excited to launch the **Appwrite Network**, a global network of cloud regions and edge locations designed to enhance Appwrite Cloud’s availability, performance, and regulatory compliance.
|
||||
|
||||
Starting today, all Pro users can access three regions: **Frankfurt (FRA)**, our first region, and two new regions in **New York City (NYC)** and **Sydney (SYD)**. These new regions will be available to all Cloud users in the coming weeks, with more regions to follow.
|
||||
|
||||
# Key features of the Appwrite Network
|
||||
|
||||
- **Reduced latency with global coverage:** By distributing regions and edge locations worldwide, we minimize physical distance and routing delays, ensuring faster response times and better user experiences.
|
||||
|
||||
- **Regional data control with global access:** Choose where your data resides to meet local regulations and optimize for performance, while still ensuring global availability through Appwrite’s interconnected network.
|
||||
|
||||
- **Global CDN with built-in DDoS protection:** Deliver content faster with our CDN powered by strategically placed PoPs, and stay secure with integrated DDoS mitigation that filters threats in real-time.
|
||||
|
||||
We’re just getting started with the Appwrite Network and can’t wait to share what’s next. Thanks for being part of the journey, together, we’re shaping the future of cloud platforms for developers.
|
||||
|
||||
[Read the announcement to learn more](/blog/post/the-appwrite-network).
|
||||
@@ -271,6 +271,28 @@
|
||||
<p class="text-sub-body mt-1">Respond to server events in realtime.</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/docs/products/network" class="web-card is-normal">
|
||||
<img
|
||||
src="/images/icons/illustrated/dark/network.png"
|
||||
alt=""
|
||||
class="web-u-only-dark"
|
||||
width="40"
|
||||
height="40"
|
||||
/>
|
||||
<img
|
||||
src="/images/icons/illustrated/light/network.png"
|
||||
alt=""
|
||||
class="web-u-only-light"
|
||||
width="40"
|
||||
height="40"
|
||||
/>
|
||||
<h4 class="text-sub-body text-primary mt-2 font-medium">Network</h4>
|
||||
<p class="text-sub-body mt-1">
|
||||
Global infrastructure for serverless compute.
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
icon: 'icon-cog'
|
||||
},
|
||||
{
|
||||
label: 'API reference',
|
||||
label: 'API references',
|
||||
href: '/docs/references',
|
||||
icon: 'icon-document',
|
||||
isParent: true
|
||||
@@ -65,6 +65,13 @@
|
||||
icon: 'icon-folder',
|
||||
isParent: true
|
||||
},
|
||||
{
|
||||
label: 'Network',
|
||||
href: '/docs/products/network',
|
||||
icon: 'icon-share',
|
||||
isParent: true,
|
||||
new: true
|
||||
},
|
||||
{
|
||||
label: 'AI',
|
||||
href: '/docs/products/ai',
|
||||
|
||||
@@ -73,7 +73,7 @@ Coming soon.
|
||||
{% /cards_item %}
|
||||
|
||||
{% cards_item href="/docs/advanced/platform/enterprise" title="Enterprise" %}
|
||||
Coming soon.
|
||||
Learn about Appwrite Enterprise, for large organizations with advanced needs.
|
||||
{% /cards_item %}
|
||||
|
||||
{% cards_item href="/docs/advanced/platform/oss" title="Open source" %}
|
||||
|
||||
@@ -7,4 +7,4 @@ description: How Appwrite can accelerate enterprise development teams and provid
|
||||
Enterprise development teams face unique challenges and have unique needs.
|
||||
Appwrite can provide tailored solutions for enterprise customers with custom hosting, training, and support needs.
|
||||
|
||||
If you're interested to learn about what Appwrite can do for your enterprise development teams, [contact us](https://appwrite.io/contact-us) for more details.
|
||||
If you're interested to learn about what Appwrite can do for your enterprise development teams, [contact us](https://appwrite.io/contact-us/enterprise) for more details.
|
||||
@@ -130,7 +130,7 @@ const client = new Client();
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setLocale('fr') // Your locale
|
||||
;
|
||||
@@ -152,7 +152,7 @@ void main() { // Init SDK
|
||||
Account account = Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setLocale('fr') // Your locale
|
||||
;
|
||||
@@ -172,7 +172,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setLocale('fr') // Your locale
|
||||
|
||||
@@ -185,7 +185,7 @@ val response = account.createVerification('https://example.com')
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setLocale('fr') // Your locale
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ In the following example, we are creating a document that can be read by anyone,
|
||||
import { Client, Databases, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -104,7 +104,7 @@ In the following example, we are creating a document that can be read by members
|
||||
import { Client, Databases, Permission, Role } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
|
||||
@@ -6,7 +6,7 @@ description: Leverage webhooks in the Appwrite platform for real-time updates. L
|
||||
|
||||
Webhooks allow you to build or set up integrations which subscribe to certain events on Appwrite. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks can be used to purge cache from CDN, calculate data or send a Slack notification. You're only limited by your imagination.
|
||||
|
||||
# Add your webhook {% #addWebhook %}
|
||||
# Getting started {% #getting-started %}
|
||||
|
||||
You can set your webhook by adding it from your Appwrite project dashboard. You can access your webhooks settings from your project dashboard or on the left navigation panel. Click the 'Add Webhook' button and choose your webhook name and the events that should trigger it. You can also set an optional basic HTTP authentication username and password to protect your endpoint from unauthorized access.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Redirected requests will show a `301` response status.
|
||||
```http
|
||||
HTTP/1.1 301 Moved Permanently
|
||||
Content-Type: application/json
|
||||
Location: https://cloud.appwrite.io/v1/<ENDPOINT>
|
||||
Location: https://<REGION>.cloud.appwrite.io/v1/<ENDPOINT>
|
||||
```
|
||||
|
||||
Appwrite Cloud does not support HTTP, which is a common practice in modern development, because unencrypted
|
||||
|
||||
@@ -237,7 +237,7 @@ Appwrite SDKs also support GraphQL in addition to the REST services.
|
||||
import { Client, Graphql } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const graphql = new Graphql(client);
|
||||
@@ -274,7 +274,7 @@ mutation.then(response => {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your Appwrite Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final graphql = Graphql(client);
|
||||
@@ -311,7 +311,7 @@ mutation.then((response) {
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let graphql = Graphql(client)
|
||||
@@ -352,7 +352,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Graphql
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val graphql = Graphql(client)
|
||||
|
||||
@@ -15,7 +15,7 @@ This lets you build an interactive and responsive user experience by providing i
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
// Subscribe to files channel
|
||||
@@ -31,7 +31,7 @@ client.subscribe('files', response => {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final realtime = Realtime(client);
|
||||
@@ -52,7 +52,7 @@ import Appwrite
|
||||
import AppwriteModels
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let realtime = Realtime(client)
|
||||
@@ -71,7 +71,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Realtime
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val realtime = Realtime(client)
|
||||
@@ -117,7 +117,7 @@ In this example we are subscribing to all updates related to our account by usin
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
client.subscribe('account', response => {
|
||||
@@ -130,7 +130,7 @@ client.subscribe('account', response => {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final realtime = Realtime(client);
|
||||
@@ -148,7 +148,7 @@ import Appwrite
|
||||
import AppwriteModels
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let realtime = Realtime(client)
|
||||
@@ -164,7 +164,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Realtime
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val realtime = Realtime(client)
|
||||
@@ -188,7 +188,7 @@ In this example we are listening to the document A and all files by subscribing
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
client.subscribe(['collections.A.documents.A', 'files'], response => {
|
||||
@@ -201,7 +201,7 @@ client.subscribe(['collections.A.documents.A', 'files'], response => {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final realtime = Realtime(client);
|
||||
@@ -219,7 +219,7 @@ import Appwrite
|
||||
import AppwriteModels
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let realtime = Realtime(client)
|
||||
@@ -235,7 +235,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Realtime
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
val realtime = Realtime(client)
|
||||
|
||||
@@ -256,7 +256,7 @@ If you no longer want to receive updates from a subscription, you can unsubscrib
|
||||
import { Client } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const unsubscribe = client.subscribe('files', response => {
|
||||
@@ -272,7 +272,7 @@ unsubscribe();
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final realtime = Realtime(client);
|
||||
@@ -308,7 +308,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Realtime
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val realtime = Realtime(client)
|
||||
@@ -466,35 +466,35 @@ A list of all channels available you can subscribe to. IDs cannot be wildcards.
|
||||
|
||||
The SDK will guess the endpoint of the Realtime API when setting the endpoint of your Appwrite instance. If you are running Appwrite with a custom proxy and changed the route of the Realtime API, you can call the `setEndpointRealtime` method on the Client SDK and set your new endpoint value.
|
||||
|
||||
By default the endpoint is `wss://cloud.appwrite.io/v1/realtime`.
|
||||
By default the endpoint is `wss://<REGION>.cloud.appwrite.io/v1/realtime`.
|
||||
|
||||
{% multicode %}
|
||||
```client-web
|
||||
import { Client } from "appwrite";
|
||||
const client = new Client();
|
||||
|
||||
client.setEndpointRealtime('wss://cloud.appwrite.io/v1/realtime');
|
||||
client.setEndpointRealtime('wss://<REGION>.cloud.appwrite.io/v1/realtime');
|
||||
```
|
||||
|
||||
```client-flutter
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client();
|
||||
client.setEndpointRealtime('wss://cloud.appwrite.io/v1/realtime');
|
||||
client.setEndpointRealtime('wss://<REGION>.cloud.appwrite.io/v1/realtime');
|
||||
```
|
||||
|
||||
```client-apple
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
client.setEndpointRealtime("wss://cloud.appwrite.io/v1/realtime")
|
||||
client.setEndpointRealtime("wss://<REGION>.cloud.appwrite.io/v1/realtime")
|
||||
```
|
||||
|
||||
```client-android-kotlin
|
||||
import io.appwrite.Client
|
||||
|
||||
val client = Client(context)
|
||||
client.setEndpointRealtime("wss://cloud.appwrite.io/v1/realtime")
|
||||
client.setEndpointRealtime("wss://<REGION>.cloud.appwrite.io/v1/realtime")
|
||||
```
|
||||
|
||||
{% /multicode %}
|
||||
|
||||
@@ -209,7 +209,7 @@ Next add code to validate the body of the request and initialize the Appwrite SD
|
||||
|
||||
```js
|
||||
const client = new Client()
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1")
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ export default class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -216,7 +216,7 @@ import Speech from 'lmnt-node';
|
||||
Next, add code to validate the body of the request and initialize the Appwrite SDK also within `main.js` following the previously added GET handler:
|
||||
|
||||
```js
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1";
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint(endpoint)
|
||||
|
||||
@@ -205,7 +205,7 @@ Add code to validate the body of the request and initialize the Appwrite SDK:
|
||||
|
||||
```js
|
||||
const client = new Client()
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://cloud.appwrite.io/v1")
|
||||
.setEndpoint(process.env.APPWRITE_ENDPOINT ?? "https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ export default class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -285,7 +285,7 @@ let resJson = await response.json();
|
||||
|
||||
// Upload image to Appwrite Storage and return URL
|
||||
if (req.body.type === 'image') {
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT || 'https://cloud.appwrite.io/v1'
|
||||
const endpoint = process.env.APPWRITE_ENDPOINT || 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint(endpoint)
|
||||
|
||||
@@ -119,7 +119,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -102,7 +102,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -57,7 +57,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -58,7 +58,7 @@ class AppwriteService {
|
||||
const client = new Client();
|
||||
client
|
||||
.setEndpoint(
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://cloud.appwrite.io/v1'
|
||||
process.env.APPWRITE_ENDPOINT ?? 'https://<REGION>.cloud.appwrite.io/v1'
|
||||
)
|
||||
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
|
||||
.setKey(process.env.APPWRITE_API_KEY);
|
||||
|
||||
@@ -31,7 +31,7 @@ Preferences are stored as a key-value JSON object. The maximum allowed size for
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -48,7 +48,7 @@ promise.then(function (response) {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -64,7 +64,7 @@ final user = await account.updatePrefs(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -81,7 +81,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -115,7 +115,7 @@ After a user's preferences are updated, they can be retrieved using the [get acc
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -132,7 +132,7 @@ promise.then(function (response) {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -144,7 +144,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -155,7 +155,7 @@ val prefs = account.getPrefs()
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
@@ -17,7 +17,7 @@ Create an anonymous session with [Create Anonymous Session](/docs/references/clo
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -34,7 +34,7 @@ promise.then(function (response) {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -45,7 +45,7 @@ final user = await account.createAnonymousSession();
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -57,7 +57,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
@@ -17,7 +17,7 @@ Once you have your server endpoint prepared either in an Appwrite Function or a
|
||||
import { Client, Users } from "node-appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
.setKey('<API_KEY>'); // Your project API key
|
||||
|
||||
@@ -32,7 +32,7 @@ use Appwrite\Client;
|
||||
use Appwrite\Users;
|
||||
|
||||
$client = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('<API_KEY>'); // Your project API key
|
||||
|
||||
@@ -49,7 +49,7 @@ from appwrite.users import Users
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('<API_KEY>') # Your project API key
|
||||
)
|
||||
@@ -66,7 +66,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('<API_KEY>') # Your project API key
|
||||
|
||||
@@ -80,7 +80,7 @@ secret = token['secret']
|
||||
import { Client, Users } from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('<API_KEY>'); // Your project API key
|
||||
|
||||
@@ -94,7 +94,7 @@ const secret = token.secret;
|
||||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('<API_KEY>'); // Your project API key
|
||||
|
||||
@@ -109,7 +109,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.Users
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("<API_KEY>") // Your project API key
|
||||
|
||||
@@ -123,7 +123,7 @@ val secret = token.secret
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("<API_KEY>") // Your project API key
|
||||
|
||||
@@ -137,7 +137,7 @@ let secret = token.secret
|
||||
using Appwrite;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey("<API_KEY>"); // Your project API key
|
||||
|
||||
@@ -166,7 +166,7 @@ Once the client receives a token secret, we can use it to authenticate the user
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -181,7 +181,7 @@ const session = await account.createSession(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
@@ -195,7 +195,7 @@ final session = await account.createSession(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
let account = Account(client);
|
||||
@@ -211,7 +211,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
val account = Account(client);
|
||||
|
||||
@@ -30,7 +30,7 @@ Send an an email to initiate the authentication process. A **new account** will
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -47,7 +47,7 @@ const userId = sessionToken.userId;
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
@@ -63,7 +63,7 @@ final userId = sessionToken.userId;
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
let account = Account(client);
|
||||
@@ -82,7 +82,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
val account = Account(client);
|
||||
@@ -117,7 +117,7 @@ After initiating the email OTP authentication process, the returned user ID and
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -132,7 +132,7 @@ const session = await account.createSession(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
@@ -146,7 +146,7 @@ final session = await account.createSession(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
let account = Account(client);
|
||||
@@ -162,7 +162,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
val account = Account(client);
|
||||
@@ -199,7 +199,7 @@ By default, security phrases are disabled. To enable a security phrase in Email
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -27,7 +27,7 @@ You can generate a JWT like this on a [Client SDK](/docs/sdks#client).
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -38,7 +38,7 @@ const user = await account.createJWT();
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -49,7 +49,7 @@ final jwt = await account.createJWT();
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -61,7 +61,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -85,7 +85,7 @@ Use JWTs tokens like this in a [Server SDK](/docs/sdks#server).
|
||||
const { Client } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
```
|
||||
@@ -94,7 +94,7 @@ const client = new Client()
|
||||
use Appwrite\Client;
|
||||
|
||||
$client = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
```
|
||||
@@ -105,7 +105,7 @@ from appwrite.client import Client
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token
|
||||
)
|
||||
@@ -117,7 +117,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token
|
||||
```
|
||||
@@ -126,7 +126,7 @@ client = Client.new
|
||||
import { Client } from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
let client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
```
|
||||
@@ -135,7 +135,7 @@ let client = new Client()
|
||||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
```
|
||||
@@ -144,7 +144,7 @@ final client = Client()
|
||||
import io.appwrite.Client
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token
|
||||
```
|
||||
@@ -153,7 +153,7 @@ val client = Client()
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token
|
||||
```
|
||||
@@ -162,7 +162,7 @@ let client = Client()
|
||||
using Appwrite;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetJWT("eyJJ9.eyJ...886ca"); // Your secret JSON Web Token
|
||||
```
|
||||
@@ -194,7 +194,7 @@ If you're authenticated on the client-side as `user-a` and created a JWT `'eyJJ9
|
||||
const { Client } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
|
||||
@@ -210,7 +210,7 @@ const documents = await databases.listDocuments(
|
||||
use Appwrite\Client;
|
||||
|
||||
$client = (new Client())
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Tokens
|
||||
|
||||
@@ -228,7 +228,7 @@ from appwrite.client import Client
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token
|
||||
)
|
||||
@@ -247,7 +247,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token
|
||||
|
||||
@@ -263,7 +263,7 @@ documents = databases.list_documents(
|
||||
import { Client } from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
let client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
|
||||
@@ -279,7 +279,7 @@ let documents = await databases.listDocuments(
|
||||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
|
||||
|
||||
@@ -295,7 +295,7 @@ final documents = await databases.listDocuments(
|
||||
import io.appwrite.Client
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token
|
||||
|
||||
@@ -311,7 +311,7 @@ val documents = databases.listDocuments(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token
|
||||
|
||||
@@ -329,7 +329,7 @@ using Appwrite.Services;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetJWT("eyJJ9.eyJ...886ca"); // Your secret JSON Web Token
|
||||
|
||||
@@ -372,7 +372,7 @@ If the same request is made where the [Server SDK](/docs/sdks#server)'s `client`
|
||||
const { Client } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -389,7 +389,7 @@ const documents = await databases.listDocuments(
|
||||
use Appwrite\Client;
|
||||
|
||||
$client = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -407,7 +407,7 @@ from appwrite.client import Client
|
||||
|
||||
client = Client()
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') // Your project ID
|
||||
.set_key('98fd4...a2ad2') // Your secret API key
|
||||
)
|
||||
@@ -426,7 +426,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('98fd4...a2ad2') # Your secret API key
|
||||
|
||||
@@ -442,7 +442,7 @@ documents = databases.list_documents(
|
||||
import { Client } from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
let client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -458,7 +458,7 @@ let documents = await databases.listDocuments(
|
||||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -474,7 +474,7 @@ final documents = await databases.listDocuments(
|
||||
import io.appwrite.Client
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -490,7 +490,7 @@ val documents = databases.listDocuments(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -508,7 +508,7 @@ using Appwrite.Services;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Labels are a good way to categorize a user to grant them access to resources. Fo
|
||||
const sdk = require('node-appwrite');
|
||||
|
||||
const client = new sdk.Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -37,7 +37,7 @@ use Appwrite\Role;
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -57,7 +57,7 @@ from appwrite.role import Role
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('98fd4...a2ad2') # Your secret API key
|
||||
)
|
||||
@@ -75,7 +75,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('98fd4...a2ad2') # Your secret API key
|
||||
|
||||
@@ -91,7 +91,7 @@ response = users.update_labels(
|
||||
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
let client = new sdk.Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -112,7 +112,7 @@ promise.then(function (response) {
|
||||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('98fd4...a2ad2'); // Your secret API key
|
||||
|
||||
@@ -129,7 +129,7 @@ import io.appwrite.Role
|
||||
import io.appwrite.services.Users
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("98fd4...a2ad2") // Your secret API key
|
||||
|
||||
@@ -145,7 +145,7 @@ val response = users.updateLabels(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("98fd4...a2ad2") // Your secret API key
|
||||
|
||||
@@ -161,7 +161,7 @@ let response = try await users.updateLabels(
|
||||
using Appwrite;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey("98fd4...a2ad2"); // Your secret API key
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Initialize the log in process with the [Create Magic URL Token](/docs/references
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -58,7 +58,7 @@ After the user clicks the magic link in their email, they will be redirected to
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
@@ -32,7 +32,7 @@ const account = new Account(client);
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
```
|
||||
@@ -46,7 +46,7 @@ void main() { // Init SDK
|
||||
Avatars avatars = Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ void main() { // Init SDK
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -68,7 +68,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
@@ -28,7 +28,7 @@ Before using OAuth 2 login, you need to enable and configure an OAuth 2 login pr
|
||||
|
||||
To initialize the OAuth 2 login process, use the [Create OAuth 2 Session](/docs/references/cloud/client-web/account#createOAuth2Session) route.
|
||||
|
||||
OAuth2 sessions allow you to specify the scope of the access you want to request from the OAuth2 provider.
|
||||
OAuth2 sessions allow you to specify the scope of the access you want to request from the OAuth2 provider.
|
||||
The requested scopes describe which resources a session can access.
|
||||
|
||||
You can pass the scopes to request through the `scopes` parameter when creating a session.
|
||||
@@ -40,7 +40,7 @@ The scope is provider-specific and can be found in the provider's documentation.
|
||||
import { Client, Account, OAuthProvider } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -78,7 +78,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
import 'package:appwrite/enums.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -126,7 +126,7 @@ import Appwrite
|
||||
import AppwriteEnums
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -140,7 +140,7 @@ try await account.createOAuth2Session(
|
||||
{% /tabsitem %}
|
||||
|
||||
{% tabsitem #android title="Android" %}
|
||||
For Android, add the following activity inside the `<application>` tag in your `AndroidManifest.xml`.
|
||||
For Android, add the following activity inside the `<application>` tag in your `AndroidManifest.xml`.
|
||||
Replace `<PROJECT_ID>` with your actual Appwrite project ID.
|
||||
|
||||
```xml
|
||||
@@ -160,7 +160,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.enums.OAuthProvider
|
||||
|
||||
val client = Client(context) // Activity or application context
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -259,7 +259,7 @@ console.log(session.providerAccessToken);
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -277,7 +277,7 @@ print(session.providerAccessToken);
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -296,7 +296,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -326,13 +326,13 @@ You can use the `providerAccessToken` to make requests to your OAuth 2 provider.
|
||||
|
||||
# Refresh tokens {% #refresh-tokens %}
|
||||
|
||||
OAuth 2 sessions expire to protect from security risks.
|
||||
OAuth 2 sessions expire to protect from security risks.
|
||||
This means the OAuth 2 session with a provider may expire, even when an Appwrite session remains active.
|
||||
OAuth 2 sessions should be refreshed periodically so access tokens don't expire.
|
||||
OAuth 2 sessions should be refreshed periodically so access tokens don't expire.
|
||||
|
||||
Check the value of `providerAccessTokenExpiry` to know if the token is expired or is about to expire.
|
||||
Check the value of `providerAccessTokenExpiry` to know if the token is expired or is about to expire.
|
||||
You can refresh the provider session by calling the [Update OAuth Session](/docs/references/cloud/client-web/account#updateSession) endpoint whenever your user visits your app.
|
||||
Avoid refreshing before every request, which might cause rate limit problems.
|
||||
Avoid refreshing before every request, which might cause rate limit problems.
|
||||
|
||||
{% multicode %}
|
||||
```client-web
|
||||
@@ -348,7 +348,7 @@ promise.then(function (response) {
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
Account account = Account(client);
|
||||
@@ -361,7 +361,7 @@ final result = await account.updateSession(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -375,7 +375,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
@@ -24,7 +24,7 @@ Send an SMS message to initiate the authentication process. A **new account** wi
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -41,7 +41,7 @@ const userId = token.userId;
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
@@ -57,7 +57,7 @@ final userId = token.userId;
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
let account = Account(client);
|
||||
@@ -76,7 +76,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
val account = Account(client);
|
||||
@@ -112,7 +112,7 @@ After initiating the phone authentication process, the returned user ID and secr
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -127,7 +127,7 @@ const session = await account.createSession(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final account = Account(client);
|
||||
@@ -141,7 +141,7 @@ final session = await account.createSession(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
let account = Account(client);
|
||||
@@ -157,7 +157,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
val account = Account(client);
|
||||
|
||||
@@ -14,7 +14,7 @@ You can use the Appwrite [Client SDKs](/docs/sdks#client) to create an account u
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -29,7 +29,7 @@ const user = await account.create(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final account = Account(client);
|
||||
@@ -44,7 +44,7 @@ final user = await account.create(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
@@ -61,7 +61,7 @@ import io.appwrite.services.Account
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
@@ -85,7 +85,7 @@ mutation {
|
||||
```client-react-native
|
||||
import { Client, Account, ID } from "appwrite";
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const account = new Account(client);
|
||||
@@ -501,7 +501,7 @@ class Appwrite {
|
||||
|
||||
public init() {
|
||||
self.client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
self.account = Account(client)
|
||||
@@ -571,7 +571,7 @@ You can find a version of this example in the [Appwrite Android tutorial](/docs/
|
||||
//... imports
|
||||
|
||||
object Appwrite {
|
||||
private const val ENDPOINT = "https://cloud.appwrite.io/v1"
|
||||
private const val ENDPOINT = "https://<REGION>.cloud.appwrite.io/v1"
|
||||
private const val PROJECT_ID = "<PROJECT_ID>"
|
||||
|
||||
private lateinit var client: Client
|
||||
|
||||
@@ -58,7 +58,7 @@ The API key should have the following scope in order to perform authentication:
|
||||
import { Client } from "node-appwrite"; // Using the server SDK
|
||||
|
||||
const adminClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('<YOUR_API_KEY>'); // Your secret API key
|
||||
```
|
||||
@@ -67,7 +67,7 @@ use Appwrite\Client;
|
||||
use Appwrite\Services\Account;
|
||||
|
||||
$adminClient = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('<YOUR_API_KEY>'); // Your secret API key
|
||||
|
||||
@@ -87,7 +87,7 @@ You should create a new client for each request and **never** share the client b
|
||||
{% multicode %}
|
||||
```server-nodejs
|
||||
const sessionClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const session = req.cookies.session; // Get the session cookie from the request
|
||||
@@ -97,7 +97,7 @@ if (session) {
|
||||
```
|
||||
```php
|
||||
$sessionClient = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
$session = $_COOKIE['session']; // Get the session cookie from the request
|
||||
@@ -290,7 +290,7 @@ const client = new sdk.Client();
|
||||
const account = new sdk.Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
|
||||
@@ -311,7 +311,7 @@ use Appwrite\Services\Account;
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
|
||||
@@ -346,7 +346,7 @@ Create an initial endpoint that redirects the user to the OAuth2 provider's auth
|
||||
import { Client, Account, OAuthProvider } from "node-appwrite"; // Using the server SDK
|
||||
|
||||
const adminClient = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('<API_KEY>'); // Your secret API key
|
||||
|
||||
@@ -369,7 +369,7 @@ use Appwrite\Services\Account;
|
||||
use Appwrite\Enums\OAuthProvider;
|
||||
|
||||
$adminClient = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('<API_KEY>'); // Your secret API key
|
||||
|
||||
@@ -420,7 +420,7 @@ use Appwrite\Client;
|
||||
use Appwrite\Services\Account;
|
||||
|
||||
$adminClient = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('<API_KEY>'); // Your secret API key
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const client = new Client();
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
|
||||
@@ -48,7 +48,7 @@ void main() { // Init SDK
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
Future result = teams.create(
|
||||
@@ -69,7 +69,7 @@ void main() { // Init SDK
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let teams = Teams(client)
|
||||
@@ -85,7 +85,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Teams
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val teams = Teams(client)
|
||||
@@ -112,7 +112,7 @@ const client = new Client();
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
|
||||
@@ -136,7 +136,7 @@ void main() { // Init SDK
|
||||
Teams teams = Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
;
|
||||
Future result = teams.createMembership(
|
||||
@@ -157,7 +157,7 @@ void main() { // Init SDK
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let teams = Teams(client)
|
||||
@@ -173,7 +173,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Teams
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val teams = Teams(client)
|
||||
|
||||
@@ -31,7 +31,7 @@ const client = new sdk.Client();
|
||||
const databases = new sdk.Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -53,7 +53,7 @@ let client = new sdk.Client();
|
||||
let databases = new sdk.Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -76,7 +76,7 @@ use Appwrite\Services\Databases;
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -92,7 +92,7 @@ from appwrite.services.databases import Databases
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
)
|
||||
@@ -107,7 +107,7 @@ require 'Appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
|
||||
@@ -123,7 +123,7 @@ using Appwrite.Services;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -142,7 +142,7 @@ void main() { // Init SDK
|
||||
Databases databases = Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -166,7 +166,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
@@ -184,7 +184,7 @@ import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -208,7 +208,7 @@ databases.createCollection(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ const client = new sdk.Client();
|
||||
const databases = new sdk.Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -48,7 +48,7 @@ let client = new sdk.Client();
|
||||
let databases = new sdk.Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -71,7 +71,7 @@ use Appwrite\Services\Databases;
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -87,7 +87,7 @@ from appwrite.services.databases import Databases
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
)
|
||||
@@ -102,7 +102,7 @@ require 'Appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
|
||||
@@ -118,7 +118,7 @@ using Appwrite.Services;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -136,7 +136,7 @@ void main() { // Init SDK
|
||||
Databases databases = Databases(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -159,7 +159,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
@@ -176,7 +176,7 @@ import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -199,7 +199,7 @@ databases.create(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ In most use cases, you will create documents programmatically.
|
||||
import { Client, Databases, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -42,7 +42,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -65,7 +65,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -88,7 +88,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
@@ -148,7 +148,7 @@ You can change this through [pagination](/docs/products/databases/pagination).
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -172,7 +172,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -196,7 +196,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -221,7 +221,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -17,7 +17,7 @@ you can specify the order of the documents returned using the `Query.orderAsc()`
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -36,7 +36,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -61,7 +61,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -86,7 +86,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -24,7 +24,7 @@ The `Query.offset()` is number of records you wish to skip before selecting reco
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -54,7 +54,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -84,7 +84,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -115,7 +115,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
@@ -160,7 +160,7 @@ Pass the first document's ID into the `Query.cursorBefore(firstId)` query method
|
||||
import { Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>");
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -192,7 +192,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -224,7 +224,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -258,7 +258,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -28,7 +28,7 @@ You can change this through [pagination](/docs/products/databases/pagination).
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -47,7 +47,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -72,7 +72,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -98,7 +98,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -33,7 +33,7 @@ Then, in the `My books` collection, copy the collection ID, and replace `<COLLEC
|
||||
import { Client, Databases, ID } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -56,7 +56,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -79,7 +79,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -102,7 +102,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
@@ -146,7 +146,7 @@ Like the previous step, replace `<PROJECT_ID>`, `<DATABASE_ID>`, and`<COLLECTION
|
||||
import { Client, Databases, Query } from "appwrite";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -170,7 +170,7 @@ import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() async {
|
||||
final client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -194,7 +194,7 @@ import AppwriteModels
|
||||
|
||||
func main() async throws{
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -219,7 +219,7 @@ import io.appwrite.services.Databases
|
||||
|
||||
suspend fun main() {
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -87,7 +87,7 @@ A relationship attribute with the key `reviews` is added to the movies collectio
|
||||
const { Client, Databases } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -110,7 +110,7 @@ use \Appwrite\Client;
|
||||
use \Appwrite\Services\Databases;
|
||||
|
||||
$client = (new Client())
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
$databases = new Databases($client);
|
||||
@@ -133,7 +133,7 @@ from appwrite.client import Client
|
||||
from appwrite.services.databases import Databases
|
||||
|
||||
client = (Client()
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>')) # Your project ID
|
||||
|
||||
databases = Databases(client)
|
||||
@@ -157,7 +157,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1')# Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1')# Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
|
||||
databases = Databases.new(client)
|
||||
@@ -179,7 +179,7 @@ databases.create_relationship_attribute(
|
||||
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>"); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -201,7 +201,7 @@ databases.createRelationshipAttribute(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -224,7 +224,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
@@ -246,7 +246,7 @@ databases.createRelationshipAttribute(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Databases(client)
|
||||
@@ -271,7 +271,7 @@ using Appwrite;
|
||||
using Appwrite.Services;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndpoint("https://cloud.appwrite.io/v1")
|
||||
.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.SetProject("<PROJECT_ID>");
|
||||
|
||||
var databases = new Databases(client);
|
||||
@@ -303,7 +303,7 @@ You can create both the **parent** and **child** at once in a relationship by ne
|
||||
const { Client, Databases, ID } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -327,7 +327,7 @@ await databases.createDocument(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -351,7 +351,7 @@ await databases.createDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Database(client: client)
|
||||
@@ -377,7 +377,7 @@ import io.appwrite.services.Database
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Database(client)
|
||||
@@ -412,7 +412,7 @@ Here's an example connecting reviews to a movie.
|
||||
const { Client, Databases, ID } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -436,7 +436,7 @@ await databases.createDocument(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -460,7 +460,7 @@ await databases.createDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
let databases = Database(client: client)
|
||||
@@ -486,7 +486,7 @@ import io.appwrite.services.Database
|
||||
import io.appwrite.ID
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Database(client)
|
||||
@@ -520,7 +520,7 @@ Relationships can be updated by updating the relationship attribute.
|
||||
const { Client, Databases } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -544,7 +544,7 @@ await databases.updateDocument(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -568,7 +568,7 @@ await databases.updateDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Database(client: client)
|
||||
@@ -593,7 +593,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Database(client)
|
||||
@@ -639,7 +639,7 @@ If the on-delete behavior is **cascade**, deleting the parent documents also del
|
||||
const { Client, Databases } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -655,7 +655,7 @@ await databases.deleteDocument(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -671,7 +671,7 @@ await databases.deleteDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Database(client: client)
|
||||
@@ -688,7 +688,7 @@ import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
val client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
val databases = Database(client)
|
||||
@@ -715,7 +715,7 @@ You can also provide explicit permissions to the child document if they should b
|
||||
const { Client, Databases, ID } = require('node-appwrite');
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>'); // Your project ID
|
||||
|
||||
const databases = new Databases(client);
|
||||
@@ -743,7 +743,7 @@ await databases.createDocument(
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1')
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
|
||||
.setProject('<PROJECT_ID>');
|
||||
|
||||
final databases = Databases(client);
|
||||
@@ -771,7 +771,7 @@ await databases.createDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Database(client: client)
|
||||
@@ -799,7 +799,7 @@ databases.createDocument(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1")
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1")
|
||||
.setProject("<PROJECT_ID>")
|
||||
|
||||
let databases = Database(client: client)
|
||||
|
||||
@@ -659,7 +659,7 @@ mutation {
|
||||
|
||||
|
||||
```http
|
||||
POST https://cloud.appwrite.io/v1/functions/<FUNCTION_ID>/executions HTTP/1.1
|
||||
POST https://<REGION>.cloud.appwrite.io/v1/functions/<FUNCTION_ID>/executions HTTP/1.1
|
||||
X-Appwrite-Project: "<PROJECT_ID>"
|
||||
X-Appwrite-Response-Format: 1.5.0
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -110,7 +110,7 @@ const client = new sdk.Client();
|
||||
const messaging = new sdk.Messaging(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -134,7 +134,7 @@ let client = new sdk.Client();
|
||||
let messaging = new sdk.Messaging(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -158,7 +158,7 @@ use Appwrite\Services\Messaging;
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
->setProject('<PROJECT_ID>') // Your project ID
|
||||
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -182,7 +182,7 @@ from appwrite.services.messaging import Messaging
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
)
|
||||
@@ -205,7 +205,7 @@ require 'appwrite'
|
||||
include Appwrite
|
||||
|
||||
client = Client.new
|
||||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
.set_project('<PROJECT_ID>') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
|
||||
@@ -229,7 +229,7 @@ using Appwrite.Services;
|
||||
using Appwrite.Models;
|
||||
|
||||
var client = new Client()
|
||||
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<PROJECT_ID>") // Your project ID
|
||||
.SetKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -254,7 +254,7 @@ void main() async { // Init SDK
|
||||
Messaging messaging = Messaging(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<PROJECT_ID>') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
@@ -283,7 +283,7 @@ import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Messaging;
|
||||
|
||||
Client client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -313,7 +313,7 @@ import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Messaging;
|
||||
|
||||
Client client = new Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
|
||||
|
||||
@@ -341,7 +341,7 @@ messaging.updateApnsProvider(
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<PROJECT_ID>") // Your project ID
|
||||
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
|
||||