@@ -17,50 +17,6 @@ import java.io.File
1717**/
1818class Functions (client : Client ) : Service(client) {
1919
20- /* *
21- * List function templates
22- *
23- * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
24- *
25- * @param runtimes List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
26- * @param useCases List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
27- * @param limit Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
28- * @param offset Offset the list of returned templates. Maximum offset is 5000.
29- * @return [io.appwrite.models.TemplateFunctionList]
30- */
31- @JvmOverloads
32- suspend fun listTemplates (
33- runtimes : List <String >? = null,
34- useCases : List <String >? = null,
35- limit : Long? = null,
36- offset : Long? = null,
37- ): io.appwrite.models.TemplateFunctionList {
38- val apiPath = " /functions/templates"
39-
40- val apiParams = mutableMapOf<String , Any ?>(
41- " runtimes" to runtimes,
42- " useCases" to useCases,
43- " limit" to limit,
44- " offset" to offset,
45- )
46- val apiHeaders = mutableMapOf (
47- " content-type" to " application/json" ,
48- )
49- val converter: (Any ) -> io.appwrite.models.TemplateFunctionList = {
50- @Suppress(" UNCHECKED_CAST" )
51- io.appwrite.models.TemplateFunctionList .from(map = it as Map <String , Any >)
52- }
53- return client.call(
54- " GET" ,
55- apiPath,
56- apiHeaders,
57- apiParams,
58- responseType = io.appwrite.models.TemplateFunctionList ::class .java,
59- converter,
60- )
61- }
62-
63-
6420 /* *
6521 * Get function template
6622 *
0 commit comments