mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
Add 1.8.x support
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Document result = await databases.decrementDocumentAttribute(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
attribute: '',
|
||||
value: 0, // optional
|
||||
min: 0, // optional
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Document result = await databases.incrementDocumentAttribute(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
attribute: '',
|
||||
value: 0, // optional
|
||||
max: 0, // optional
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
TablesDb tablesDb = TablesDb(client);
|
||||
|
||||
Row result = await tablesDb.decrementRowColumn(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
column: '',
|
||||
value: 0, // optional
|
||||
min: 0, // optional
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
TablesDb tablesDb = TablesDb(client);
|
||||
|
||||
Row result = await tablesDb.incrementRowColumn(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
column: '',
|
||||
value: 0, // optional
|
||||
max: 0, // optional
|
||||
);
|
||||
Reference in New Issue
Block a user