Skip to content

Commit

Permalink
chore: updates for appwrite 1.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
christyjacob4 committed Aug 27, 2024
1 parent 777b537 commit 2216ab2
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 352 deletions.
2 changes: 1 addition & 1 deletion docs/examples/java/functions/get-deployment-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession(""); // The user session to authenticate with
.setKey("<YOUR_API_KEY>"); // Your secret API key

Functions functions = new Functions(client);

Expand Down
22 changes: 0 additions & 22 deletions docs/examples/java/functions/get-template.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/examples/kotlin/functions/get-deployment-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.appwrite.services.Functions
val client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession("") // The user session to authenticate with
.setKey("<YOUR_API_KEY>") // Your secret API key

val functions = Functions(client)

Expand Down
13 changes: 0 additions & 13 deletions docs/examples/kotlin/functions/get-template.md

This file was deleted.

158 changes: 0 additions & 158 deletions src/main/kotlin/io/appwrite/models/TemplateFunction.kt

This file was deleted.

54 changes: 0 additions & 54 deletions src/main/kotlin/io/appwrite/models/TemplateRuntime.kt

This file was deleted.

70 changes: 0 additions & 70 deletions src/main/kotlin/io/appwrite/models/TemplateVariable.kt

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/kotlin/io/appwrite/services/Functions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -209,39 +209,6 @@ class Functions(client: Client) : Service(client) {
)
}

/**
* Get function template
*
* Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
*
* @param templateId Template ID.
* @return [io.appwrite.models.TemplateFunction]
*/
@Throws(AppwriteException::class)
suspend fun getTemplate(
templateId: String,
): io.appwrite.models.TemplateFunction {
val apiPath = "/functions/templates/{templateId}"
.replace("{templateId}", templateId)

val apiParams = mutableMapOf<String, Any?>(
)
val apiHeaders = mutableMapOf(
"content-type" to "application/json",
)
val converter: (Any) -> io.appwrite.models.TemplateFunction = {
io.appwrite.models.TemplateFunction.from(map = it as Map<String, Any>)
}
return client.call(
"GET",
apiPath,
apiHeaders,
apiParams,
responseType = io.appwrite.models.TemplateFunction::class.java,
converter,
)
}

/**
* Get function
*
Expand Down

0 comments on commit 2216ab2

Please sign in to comment.