Expand file tree Collapse file tree 8 files changed +2
-352
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import io.appwrite.services.Functions;
5
5
Client client = new Client()
6
6
.setEndpoint("https://cloud.appwrite.io/v1 ") // Your API Endpoint
7
7
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8
- .setSession(" "); // The user session to authenticate with
8
+ .setKey("<YOUR_API_KEY> "); // Your secret API key
9
9
10
10
Functions functions = new Functions(client);
11
11
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import io.appwrite.services.Functions
5
5
val client = Client()
6
6
.setEndpoint("https://cloud.appwrite.io/v1 ") // Your API Endpoint
7
7
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8
- .setSession(" ") // The user session to authenticate with
8
+ .setKey("<YOUR_API_KEY> ") // Your secret API key
9
9
10
10
val functions = Functions(client)
11
11
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -209,39 +209,6 @@ class Functions(client: Client) : Service(client) {
209
209
)
210
210
}
211
211
212
- /* *
213
- * Get function template
214
- *
215
- * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
216
- *
217
- * @param templateId Template ID.
218
- * @return [io.appwrite.models.TemplateFunction]
219
- */
220
- @Throws(AppwriteException ::class )
221
- suspend fun getTemplate (
222
- templateId : String ,
223
- ): io.appwrite.models.TemplateFunction {
224
- val apiPath = " /functions/templates/{templateId}"
225
- .replace(" {templateId}" , templateId)
226
-
227
- val apiParams = mutableMapOf<String , Any ?>(
228
- )
229
- val apiHeaders = mutableMapOf (
230
- " content-type" to " application/json" ,
231
- )
232
- val converter: (Any ) -> io.appwrite.models.TemplateFunction = {
233
- io.appwrite.models.TemplateFunction .from(map = it as Map <String , Any >)
234
- }
235
- return client.call(
236
- " GET" ,
237
- apiPath,
238
- apiHeaders,
239
- apiParams,
240
- responseType = io.appwrite.models.TemplateFunction ::class .java,
241
- converter,
242
- )
243
- }
244
-
245
212
/* *
246
213
* Get function
247
214
*
0 commit comments