Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions examples/1.9.x/client-android/java/account/delete-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.deleteConsentToken(
"<CONSENT_ID>", // consentId
"<TOKEN_ID>", // tokenId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
24 changes: 24 additions & 0 deletions examples/1.9.x/client-android/java/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.deleteConsent(
"<CONSENT_ID>", // consentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
25 changes: 25 additions & 0 deletions examples/1.9.x/client-android/java/account/get-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.getConsentToken(
"<CONSENT_ID>", // consentId
"<TOKEN_ID>", // tokenId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
24 changes: 24 additions & 0 deletions examples/1.9.x/client-android/java/account/get-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.getConsent(
"<CONSENT_ID>", // consentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
26 changes: 26 additions & 0 deletions examples/1.9.x/client-android/java/account/list-consent-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.listConsentTokens(
"<CONSENT_ID>", // consentId
List.of(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
25 changes: 25 additions & 0 deletions examples/1.9.x/client-android/java/account/list-consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Account account = new Account(client);

account.listConsents(
List.of(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.deleteConsentToken(
consentId = "<CONSENT_ID>",
tokenId = "<TOKEN_ID>",
)
```
15 changes: 15 additions & 0 deletions examples/1.9.x/client-android/kotlin/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.deleteConsent(
consentId = "<CONSENT_ID>",
)
```
16 changes: 16 additions & 0 deletions examples/1.9.x/client-android/kotlin/account/get-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.getConsentToken(
consentId = "<CONSENT_ID>",
tokenId = "<TOKEN_ID>",
)
```
15 changes: 15 additions & 0 deletions examples/1.9.x/client-android/kotlin/account/get-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.getConsent(
consentId = "<CONSENT_ID>",
)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.listConsentTokens(
consentId = "<CONSENT_ID>",
queries = listOf(), // (optional)
total = false, // (optional)
)
```
16 changes: 16 additions & 0 deletions examples/1.9.x/client-android/kotlin/account/list-consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```kotlin
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

val account = Account(client)

val result = account.listConsents(
queries = listOf(), // (optional)
total = false, // (optional)
)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let result = try await account.deleteConsentToken(
consentId: "<CONSENT_ID>",
tokenId: "<TOKEN_ID>"
)

```
14 changes: 14 additions & 0 deletions examples/1.9.x/client-apple/examples/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let result = try await account.deleteConsent(
consentId: "<CONSENT_ID>"
)

```
15 changes: 15 additions & 0 deletions examples/1.9.x/client-apple/examples/account/get-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let oauth2ConsentToken = try await account.getConsentToken(
consentId: "<CONSENT_ID>",
tokenId: "<TOKEN_ID>"
)

```
14 changes: 14 additions & 0 deletions examples/1.9.x/client-apple/examples/account/get-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let oauth2Consent = try await account.getConsent(
consentId: "<CONSENT_ID>"
)

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let oauth2ConsentTokenList = try await account.listConsentTokens(
consentId: "<CONSENT_ID>",
queries: [], // optional
total: false // optional
)

```
15 changes: 15 additions & 0 deletions examples/1.9.x/client-apple/examples/account/list-consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```swift
import Appwrite

let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID

let account = Account(client)

let oauth2ConsentList = try await account.listConsents(
queries: [], // optional
total: false // optional
)

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

await account.deleteConsentToken(
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>',
);
```
13 changes: 13 additions & 0 deletions examples/1.9.x/client-flutter/examples/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```dart
import 'package:appwrite/appwrite.dart';

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

await account.deleteConsent(
consentId: '<CONSENT_ID>',
);
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

Account account = Account(client);

Oauth2ConsentToken result = await account.getConsentToken(
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>',
);
```
Loading