Skip to content

Commit 32f4393

Browse files
committed
Add 1.7 support
1 parent 4d7524d commit 32f4393

File tree

3 files changed

+0
-97
lines changed

3 files changed

+0
-97
lines changed

docs/examples/java/databases/create-documents.md

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

docs/examples/kotlin/databases/create-documents.md

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

library/src/main/java/io/appwrite/services/Databases.kt

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -146,64 +146,6 @@ class Databases(client: Client) : Service(client) {
146146
nestedType = classOf(),
147147
)
148148

149-
/**
150-
* 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.
151-
*
152-
* @param databaseId Database ID.
153-
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
154-
* @param documents Array of documents data as JSON objects.
155-
* @return [io.appwrite.models.DocumentList<T>]
156-
*/
157-
suspend fun <T> createDocuments(
158-
databaseId: String,
159-
collectionId: String,
160-
documents: List<Any>,
161-
nestedType: Class<T>,
162-
): io.appwrite.models.DocumentList<T> {
163-
val apiPath = "/databases/{databaseId}/collections/{collectionId}/documents"
164-
.replace("{databaseId}", databaseId)
165-
.replace("{collectionId}", collectionId)
166-
167-
val apiParams = mutableMapOf<String, Any?>(
168-
"documents" to documents,
169-
)
170-
val apiHeaders = mutableMapOf<String, String>(
171-
"content-type" to "application/json",
172-
)
173-
val converter: (Any) -> io.appwrite.models.DocumentList<T> = {
174-
@Suppress("UNCHECKED_CAST")
175-
io.appwrite.models.DocumentList.from(map = it as Map<String, Any>, nestedType)
176-
}
177-
return client.call(
178-
"POST",
179-
apiPath,
180-
apiHeaders,
181-
apiParams,
182-
responseType = classOf(),
183-
converter,
184-
)
185-
}
186-
187-
/**
188-
* 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.
189-
*
190-
* @param databaseId Database ID.
191-
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
192-
* @param documents Array of documents data as JSON objects.
193-
* @return [io.appwrite.models.DocumentList<T>]
194-
*/
195-
@Throws(AppwriteException::class)
196-
suspend fun createDocuments(
197-
databaseId: String,
198-
collectionId: String,
199-
documents: List<Any>,
200-
): io.appwrite.models.DocumentList<Map<String, Any>> = createDocuments(
201-
databaseId,
202-
collectionId,
203-
documents,
204-
nestedType = classOf(),
205-
)
206-
207149
/**
208150
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
209151
*

0 commit comments

Comments
 (0)