Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class ApiCallsHelper(
private var method: Int = Request.Method.GET
private var data: String? = null

private var path: String = ""

/**
* Set the base URL to use for API calls
* @param baseUrl Base URL to use defaults to [DEFAULT_URL]
Expand Down Expand Up @@ -140,6 +142,15 @@ class ApiCallsHelper(
return this
}

/**
* Set the path to use for API calls
* @param path Path to use for API calls
*/
fun setPath(path: String): Builder {
this.path = path
return this
}

/**
* Builds the [ApiCallsHelper]
* @return [ApiCallsHelper]
Expand All @@ -162,7 +173,7 @@ class ApiCallsHelper(
}

val helper = ApiCallsHelper(context, baseUrl, tag, extraHeaders, defaultAuthentication)
helper.internalCallHandling(method, baseUrl, data, callback!!)
helper.internalCallHandling(method, path, data, callback!!)
}
}

Expand Down