Skip to content

Commit 0dd9c14

Browse files
committed
Add 1.7 support
1 parent fd924a3 commit 0dd9c14

File tree

3 files changed

+0
-54
lines changed

3 files changed

+0
-54
lines changed

docs/examples/databases/create-documents.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/services/databases.dart

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,6 @@ class Databases extends Service {
4848

4949
}
5050

51-
/// Create new Documents. Before using this route, you should create a new
52-
/// collection resource using either a [server
53-
/// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
54-
/// API or directly from your database console.
55-
Future<models.DocumentList> createDocuments({required String databaseId, required String collectionId, required List<Map> documents}) async {
56-
final String apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId);
57-
58-
final Map<String, dynamic> apiParams = {
59-
'documents': documents,
60-
};
61-
62-
final Map<String, String> apiHeaders = {
63-
'content-type': 'application/json',
64-
};
65-
66-
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
67-
68-
return models.DocumentList.fromMap(res.data);
69-
70-
}
71-
7251
/// Get a document by its unique ID. This endpoint response returns a JSON
7352
/// object with the document data.
7453
Future<models.Document> getDocument({required String databaseId, required String collectionId, required String documentId, List<String>? queries}) async {

test/services/databases_test.dart

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,6 @@ void main() {
9898

9999
});
100100

101-
test('test method createDocuments()', () async {
102-
final Map<String, dynamic> data = {
103-
'total': 5,
104-
'documents': [],};
105-
106-
107-
when(client.call(
108-
HttpMethod.post,
109-
)).thenAnswer((_) async => Response(data: data));
110-
111-
112-
final response = await databases.createDocuments(
113-
databaseId: '<DATABASE_ID>',
114-
collectionId: '<COLLECTION_ID>',
115-
documents: [],
116-
);
117-
expect(response, isA<models.DocumentList>());
118-
119-
});
120-
121101
test('test method getDocument()', () async {
122102
final Map<String, dynamic> data = {
123103
'\$id': '5e5ea5c16897e',

0 commit comments

Comments
 (0)