mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
Merge pull request #5339 from appwrite/feat-add-version
Add versioned specs and examples
This commit is contained in:
commit
07b8f0fe3f
2699 changed files with 41937 additions and 1 deletions
1
app/config/specs/open-api3-1.3.x-client.json
Normal file
1
app/config/specs/open-api3-1.3.x-client.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/open-api3-1.3.x-console.json
Normal file
1
app/config/specs/open-api3-1.3.x-console.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/open-api3-1.3.x-server.json
Normal file
1
app/config/specs/open-api3-1.3.x-server.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/swagger2-1.3.x-client.json
Normal file
1
app/config/specs/swagger2-1.3.x-client.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/swagger2-1.3.x-console.json
Normal file
1
app/config/specs/swagger2-1.3.x-console.json
Normal file
File diff suppressed because one or more lines are too long
1
app/config/specs/swagger2-1.3.x-server.json
Normal file
1
app/config/specs/swagger2-1.3.x-server.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -33,7 +33,7 @@ $cli
|
||||||
$production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false;
|
$production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false;
|
||||||
$message = ($git) ? Console::confirm('Please enter your commit message:') : '';
|
$message = ($git) ? Console::confirm('Please enter your commit message:') : '';
|
||||||
|
|
||||||
if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', 'latest'])) {
|
if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', '1.3.x', 'latest'])) {
|
||||||
throw new Exception('Unknown version given');
|
throw new Exception('Unknown version given');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createEmailSession(
|
||||||
|
"email@example.com",
|
||||||
|
"password"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createJWT(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createMagicURLSession(
|
||||||
|
"[USER_ID]",
|
||||||
|
"email@example.com",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createOAuth2Session(
|
||||||
|
"amazon",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createPhoneSession(
|
||||||
|
"[USER_ID]",
|
||||||
|
"+12065550100"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createPhoneVerification(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createRecovery(
|
||||||
|
"email@example.com",
|
||||||
|
"https://example.com"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.createVerification(
|
||||||
|
"https://example.com"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
23
docs/examples/1.3.x/client-android/java/account/create.md
Normal file
23
docs/examples/1.3.x/client-android/java/account/create.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.create(
|
||||||
|
"[USER_ID]",
|
||||||
|
"email@example.com",
|
||||||
|
"",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.deleteSession(
|
||||||
|
"[SESSION_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.deleteSessions(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
18
docs/examples/1.3.x/client-android/java/account/get-prefs.md
Normal file
18
docs/examples/1.3.x/client-android/java/account/get-prefs.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.getPrefs(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.getSession(
|
||||||
|
"[SESSION_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
18
docs/examples/1.3.x/client-android/java/account/get.md
Normal file
18
docs/examples/1.3.x/client-android/java/account/get.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.get(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
20
docs/examples/1.3.x/client-android/java/account/list-logs.md
Normal file
20
docs/examples/1.3.x/client-android/java/account/list-logs.md
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.listLogs(
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.listSessions(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateEmail(
|
||||||
|
"email@example.com",
|
||||||
|
"password"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateMagicURLSession(
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateName(
|
||||||
|
"[NAME]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updatePassword(
|
||||||
|
"",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updatePhoneSession(
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updatePhoneVerification(
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updatePhone(
|
||||||
|
"+12065550100",
|
||||||
|
"password"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updatePrefs(
|
||||||
|
mapOf( "a" to "b" )
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateRecovery(
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]",
|
||||||
|
"password",
|
||||||
|
"password"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateSession(
|
||||||
|
"[SESSION_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateStatus(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Account;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Account account = new Account(client);
|
||||||
|
|
||||||
|
account.updateVerification(
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getBrowser(
|
||||||
|
"aa",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getCreditCard(
|
||||||
|
"amex",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getFavicon(
|
||||||
|
"https://example.com"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/avatars/get-flag.md
Normal file
21
docs/examples/1.3.x/client-android/java/avatars/get-flag.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getFlag(
|
||||||
|
"af",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/avatars/get-image.md
Normal file
21
docs/examples/1.3.x/client-android/java/avatars/get-image.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getImage(
|
||||||
|
"https://example.com",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getInitials(
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/avatars/get-q-r.md
Normal file
21
docs/examples/1.3.x/client-android/java/avatars/get-q-r.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Avatars;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
|
avatars.getQR(
|
||||||
|
"[TEXT]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
|
databases.createDocument(
|
||||||
|
"[DATABASE_ID]",
|
||||||
|
"[COLLECTION_ID]",
|
||||||
|
"[DOCUMENT_ID]",
|
||||||
|
mapOf( "a" to "b" ),
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
|
databases.deleteDocument(
|
||||||
|
"[DATABASE_ID]",
|
||||||
|
"[COLLECTION_ID]",
|
||||||
|
"[DOCUMENT_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
|
databases.getDocument(
|
||||||
|
"[DATABASE_ID]",
|
||||||
|
"[COLLECTION_ID]",
|
||||||
|
"[DOCUMENT_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
|
databases.listDocuments(
|
||||||
|
"[DATABASE_ID]",
|
||||||
|
"[COLLECTION_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
|
databases.updateDocument(
|
||||||
|
"[DATABASE_ID]",
|
||||||
|
"[COLLECTION_ID]",
|
||||||
|
"[DOCUMENT_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Functions;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Functions functions = new Functions(client);
|
||||||
|
|
||||||
|
functions.createExecution(
|
||||||
|
"[FUNCTION_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Functions;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Functions functions = new Functions(client);
|
||||||
|
|
||||||
|
functions.getExecution(
|
||||||
|
"[FUNCTION_ID]",
|
||||||
|
"[EXECUTION_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Functions;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Functions functions = new Functions(client);
|
||||||
|
|
||||||
|
functions.listExecutions(
|
||||||
|
"[FUNCTION_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/graphql/mutation.md
Normal file
21
docs/examples/1.3.x/client-android/java/graphql/mutation.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Graphql;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
|
graphql.mutation(
|
||||||
|
mapOf( "a" to "b" )
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/graphql/query.md
Normal file
21
docs/examples/1.3.x/client-android/java/graphql/query.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Graphql;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
|
graphql.query(
|
||||||
|
mapOf( "a" to "b" )
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
18
docs/examples/1.3.x/client-android/java/locale/get.md
Normal file
18
docs/examples/1.3.x/client-android/java/locale/get.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.get(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listContinents(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listCountriesEU(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listCountries(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listCurrencies(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Locale;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Locale locale = new Locale(client);
|
||||||
|
|
||||||
|
locale.listLanguages(new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null)
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
}));
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.models.InputFile;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.createFile(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]",
|
||||||
|
InputFile.fromPath("file.png"),
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.deleteFile(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.getFileDownload(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.getFilePreview(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.getFileView(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
22
docs/examples/1.3.x/client-android/java/storage/get-file.md
Normal file
22
docs/examples/1.3.x/client-android/java/storage/get-file.md
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.getFile(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.listFiles(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Storage storage = new Storage(client);
|
||||||
|
|
||||||
|
storage.updateFile(
|
||||||
|
"[BUCKET_ID]",
|
||||||
|
"[FILE_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.createMembership(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
listOf(),
|
||||||
|
"https://example.com",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
22
docs/examples/1.3.x/client-android/java/teams/create.md
Normal file
22
docs/examples/1.3.x/client-android/java/teams/create.md
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.create(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[NAME]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.deleteMembership(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[MEMBERSHIP_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/teams/delete.md
Normal file
21
docs/examples/1.3.x/client-android/java/teams/delete.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.delete(
|
||||||
|
"[TEAM_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.getMembership(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[MEMBERSHIP_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/teams/get-prefs.md
Normal file
21
docs/examples/1.3.x/client-android/java/teams/get-prefs.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.getPrefs(
|
||||||
|
"[TEAM_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
21
docs/examples/1.3.x/client-android/java/teams/get.md
Normal file
21
docs/examples/1.3.x/client-android/java/teams/get.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.get(
|
||||||
|
"[TEAM_ID]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.listMemberships(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
20
docs/examples/1.3.x/client-android/java/teams/list.md
Normal file
20
docs/examples/1.3.x/client-android/java/teams/list.md
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.list(
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.updateMembershipRoles(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[MEMBERSHIP_ID]",
|
||||||
|
listOf()
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.updateMembershipStatus(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[MEMBERSHIP_ID]",
|
||||||
|
"[USER_ID]",
|
||||||
|
"[SECRET]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
22
docs/examples/1.3.x/client-android/java/teams/update-name.md
Normal file
22
docs/examples/1.3.x/client-android/java/teams/update-name.md
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.updateName(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
"[NAME]"
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import io.appwrite.Client;
|
||||||
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
|
import io.appwrite.services.Teams;
|
||||||
|
|
||||||
|
Client client = new Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2"); // Your project ID
|
||||||
|
|
||||||
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
|
teams.updatePrefs(
|
||||||
|
"[TEAM_ID]",
|
||||||
|
mapOf( "a" to "b" )
|
||||||
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
if (error != null) {
|
||||||
|
error.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Appwrite", result.toString());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createAnonymousSession()
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createEmailSession(
|
||||||
|
email = "email@example.com",
|
||||||
|
password = "password"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createJWT()
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createMagicURLSession(
|
||||||
|
userId = "[USER_ID]",
|
||||||
|
email = "email@example.com",
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
account.createOAuth2Session(
|
||||||
|
provider = "amazon",
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createPhoneSession(
|
||||||
|
userId = "[USER_ID]",
|
||||||
|
phone = "+12065550100"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createPhoneVerification()
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createRecovery(
|
||||||
|
email = "email@example.com",
|
||||||
|
url = "https://example.com"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.createVerification(
|
||||||
|
url = "https://example.com"
|
||||||
|
)
|
||||||
14
docs/examples/1.3.x/client-android/kotlin/account/create.md
Normal file
14
docs/examples/1.3.x/client-android/kotlin/account/create.md
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.create(
|
||||||
|
userId = "[USER_ID]",
|
||||||
|
email = "email@example.com",
|
||||||
|
password = "",
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.deleteSession(
|
||||||
|
sessionId = "[SESSION_ID]"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.deleteSessions()
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.getPrefs()
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.getSession(
|
||||||
|
sessionId = "[SESSION_ID]"
|
||||||
|
)
|
||||||
10
docs/examples/1.3.x/client-android/kotlin/account/get.md
Normal file
10
docs/examples/1.3.x/client-android/kotlin/account/get.md
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.get()
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.listLogs(
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.listSessions()
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.updateEmail(
|
||||||
|
email = "email@example.com",
|
||||||
|
password = "password"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import io.appwrite.Client
|
||||||
|
import io.appwrite.services.Account
|
||||||
|
|
||||||
|
val client = Client(context)
|
||||||
|
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||||
|
.setProject("5df5acd0d48c2") // Your project ID
|
||||||
|
|
||||||
|
val account = Account(client)
|
||||||
|
|
||||||
|
val response = account.updateMagicURLSession(
|
||||||
|
userId = "[USER_ID]",
|
||||||
|
secret = "[SECRET]"
|
||||||
|
)
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue