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

Commit 2e96415

Browse files
committed
- fixed Retriever.kt
1 parent aac7454 commit 2e96415

File tree

1 file changed

+5
-5
lines changed
  • src/main/java/com/github/doomsdayrs/jikan4java/core

1 file changed

+5
-5
lines changed

src/main/java/com/github/doomsdayrs/jikan4java/core/Retriever.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ import java.util.concurrent.CompletionException
3838
* @author github.com/doomsdayrs
3939
*/
4040
class Retriever(
41-
private val client: OkHttpClient = getDefaultOkHttpClient(),
41+
val client: OkHttpClient = getDefaultOkHttpClient(),
4242
@Suppress("MemberVisibilityCanBePrivate")
43-
private val builder: Request.Builder = getDefaultRequestBuilder(),
44-
private val format: Json = getDefaultJSONParser(),
43+
val builder: Request.Builder = getDefaultRequestBuilder(),
44+
val format: Json = getDefaultJSONParser(),
4545
) {
4646

4747
/**
@@ -51,7 +51,7 @@ class Retriever(
5151
* @return response from jikan
5252
* @throws IOException something went wrong
5353
*/
54-
internal fun request(url: String): ResponseBody? {
54+
fun request(url: String): ResponseBody? {
5555
println(url)
5656
val request: Request = builder.url(url).build()
5757
val call = client.newCall(request)
@@ -61,7 +61,7 @@ class Retriever(
6161
internal inline operator fun <reified T> invoke(url: String) =
6262
retrieve<T>(url)
6363

64-
internal inline fun <reified T> retrieve(
64+
inline fun <reified T> retrieve(
6565
url: String
6666
): JCompletableFuture<T> = GlobalScope.future {
6767
var response = ""

0 commit comments

Comments
 (0)