Repository navigation
feat: SDK update for version 27.2.0 #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
199024c
chore: update Android SDK to 25.3.0
ChiragAgg5k 9fe9907
chore: update Android SDK to 25.3.0
ChiragAgg5k c5a3ef8
chore: update Android SDK to 26.0.0
ChiragAgg5k 97c9461
chore: update Android SDK to 26.0.0
ChiragAgg5k 236e085
chore: update Android SDK to 27.0.0
ChiragAgg5k c52edb8
chore: merge main into dev for the 27.0.0 release
ChiragAgg5k ea9b64a
chore: update Android SDK to 27.2.0
ChiragAgg5k 4bde5bc
chore: merge main into dev for the 27.2.0 release
ChiragAgg5k f19e2fa
docs: state the SDK targets Appwrite server version 2.0.x
ChiragAgg5k a438838
fix: regenerate with the latest sdk-generator and add auto image gravity
ChiragAgg5k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.Permission; | ||
| import io.appwrite.Role; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.createDocument( | ||
| "<DATABASE_ID>", // databaseId | ||
| "<COLLECTION_ID>", // collectionId | ||
| "<DOCUMENT_ID>", // documentId | ||
| Map.of( | ||
| "username", "walter.obrien", | ||
| "email", "walter.obrien@example.com", | ||
| "fullName", "Walter O'Brien", | ||
| "age", 30, | ||
| "isAdmin", false | ||
| ), // data | ||
| List.of(Permission.read(Role.any())), // permissions (optional) | ||
| "<TRANSACTION_ID>", // transactionId (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.createDocuments( | ||
| "<DATABASE_ID>", // databaseId | ||
| "<COLLECTION_ID>", // collectionId | ||
| List.of(), // documents | ||
| "<TRANSACTION_ID>", // transactionId (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.createOperations( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| List.of(Map.of( | ||
| "action", "create", | ||
| "databaseId", "<DATABASE_ID>", | ||
| "collectionId", "<COLLECTION_ID>", | ||
| "documentId", "<DOCUMENT_ID>", | ||
| "data", Map.of( | ||
| "name", "Walter O'Brien" | ||
| ) | ||
| )), // operations (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.createTransaction( | ||
| 60, // ttl (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
32 changes: 32 additions & 0 deletions
32
docs/examples/java/documentsdb/decrement-document-attribute.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.decrementDocumentAttribute( | ||
| "<DATABASE_ID>", // databaseId | ||
| "<COLLECTION_ID>", // collectionId | ||
| "<DOCUMENT_ID>", // documentId | ||
| "<ATTRIBUTE>", // attribute | ||
| 1, // value (optional) | ||
| 0, // min (optional) | ||
| "<TRANSACTION_ID>", // transactionId (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.deleteDocument( | ||
| "<DATABASE_ID>", // databaseId | ||
| "<COLLECTION_ID>", // collectionId | ||
| "<DOCUMENT_ID>", // documentId | ||
| "<TRANSACTION_ID>", // transactionId (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.deleteTransaction( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.getDocument( | ||
| "<DATABASE_ID>", // databaseId | ||
| "<COLLECTION_ID>", // collectionId | ||
| "<DOCUMENT_ID>", // documentId | ||
| List.of(), // queries (optional) | ||
| "<TRANSACTION_ID>", // transactionId (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ```java | ||
| import android.util.Log; | ||
|
|
||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.getTransaction( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.