Skip to content

Instantly share code, notes, and snippets.

@Unlimity
Created April 9, 2019 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Unlimity/e04aa70fb1ba0e3ac471ddab7f3384bb to your computer and use it in GitHub Desktop.
Save Unlimity/e04aa70fb1ba0e3ac471ddab7f3384bb to your computer and use it in GitHub Desktop.
class YourApi(client: HttpClient, config: Api.() -> Unit) : Api(client, config) {
override val baseUrl = "https://yourApi.com"
fun search(query: String): SearchResult = get {
endpointUrl = "/search"
parameters { "query" to query }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment