Skip to content

Instantly share code, notes, and snippets.

@tejainece
Last active September 4, 2018 17:27
Show Gist options
  • Save tejainece/768cca0ba8b4a547ace7caf4648aa7c1 to your computer and use it in GitHub Desktop.
Save tejainece/768cca0ba8b4a547ace7caf4648aa7c1 to your computer and use it in GitHub Desktop.
class Endpoint {
constructor(path: String) {
}
fun query(key: String, defaultValue: String = "", valueExample: String = "", description: String = "") {
}
}
fun post(path: String, func: Endpoint.()->Unit): Endpoint {
return Endpoint(path)
}
data class Task(var title: String)
fun main(args: Array<String>) {
post("/task") {
query("Lng", valueExample = "56")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment