Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
- fixed Retriever.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Doomsdayrs committed Jan 9, 2021
1 parent aac7454 commit 2e96415
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/github/doomsdayrs/jikan4java/core/Retriever.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import java.util.concurrent.CompletionException
* @author github.com/doomsdayrs
*/
class Retriever(
private val client: OkHttpClient = getDefaultOkHttpClient(),
val client: OkHttpClient = getDefaultOkHttpClient(),
@Suppress("MemberVisibilityCanBePrivate")
private val builder: Request.Builder = getDefaultRequestBuilder(),
private val format: Json = getDefaultJSONParser(),
val builder: Request.Builder = getDefaultRequestBuilder(),
val format: Json = getDefaultJSONParser(),
) {

/**
Expand All @@ -51,7 +51,7 @@ class Retriever(
* @return response from jikan
* @throws IOException something went wrong
*/
internal fun request(url: String): ResponseBody? {
fun request(url: String): ResponseBody? {
println(url)
val request: Request = builder.url(url).build()
val call = client.newCall(request)
Expand All @@ -61,7 +61,7 @@ class Retriever(
internal inline operator fun <reified T> invoke(url: String) =
retrieve<T>(url)

internal inline fun <reified T> retrieve(
inline fun <reified T> retrieve(
url: String
): JCompletableFuture<T> = GlobalScope.future {
var response = ""
Expand Down

0 comments on commit 2e96415

Please sign in to comment.