Skip to content

Commit 7c0a0f7

Browse files
committed
Add 1.7 support
1 parent abe16bc commit 7c0a0f7

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

docs/examples/databases/create-documents.md

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

src/services/databases.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -90,43 +90,6 @@ export class Databases {
9090
payload
9191
);
9292
}
93-
/**
94-
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
95-
*
96-
* @param {string} databaseId
97-
* @param {string} collectionId
98-
* @param {object[]} documents
99-
* @throws {AppwriteException}
100-
* @returns {Promise<Models.DocumentList<Document>>}
101-
*/
102-
createDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>> {
103-
if (typeof databaseId === 'undefined') {
104-
throw new AppwriteException('Missing required parameter: "databaseId"');
105-
}
106-
if (typeof collectionId === 'undefined') {
107-
throw new AppwriteException('Missing required parameter: "collectionId"');
108-
}
109-
if (typeof documents === 'undefined') {
110-
throw new AppwriteException('Missing required parameter: "documents"');
111-
}
112-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
113-
const payload: Payload = {};
114-
if (typeof documents !== 'undefined') {
115-
payload['documents'] = documents;
116-
}
117-
const uri = new URL(this.client.config.endpoint + apiPath);
118-
119-
const apiHeaders: { [header: string]: string } = {
120-
'content-type': 'application/json',
121-
}
122-
123-
return this.client.call(
124-
'post',
125-
uri,
126-
apiHeaders,
127-
payload
128-
);
129-
}
13093
/**
13194
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
13295
*

0 commit comments

Comments
 (0)