Made parseMethodResponse() internal.
This commit is contained in:
parent
df70a795b8
commit
462c0813bf
1 changed files with 9 additions and 9 deletions
|
@ -194,7 +194,7 @@ open class PinboardPoster() {
|
|||
return false
|
||||
}
|
||||
|
||||
fun parseMethodResponse(method: String, response: String) {
|
||||
internal fun parseMethodResponse(method: String, response: String) {
|
||||
val factory = DocumentBuilderFactory.newInstance().apply {
|
||||
isValidating = false
|
||||
isIgnoringElementContentWhitespace = true
|
||||
|
@ -223,6 +223,14 @@ open class PinboardPoster() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun cleanEndPoint(method: String): String {
|
||||
return if (apiEndPoint.endsWith('/')) {
|
||||
"$apiEndPoint$method"
|
||||
} else {
|
||||
"$apiEndPoint/$method"
|
||||
}
|
||||
}
|
||||
|
||||
private fun executeMethod(method: String, params: List<Pair<String, String>>): Boolean {
|
||||
val apiUrl = HttpUrl.parse(cleanEndPoint(method))
|
||||
if (apiUrl != null) {
|
||||
|
@ -259,14 +267,6 @@ open class PinboardPoster() {
|
|||
return false
|
||||
}
|
||||
|
||||
private fun cleanEndPoint(method: String): String {
|
||||
return if (apiEndPoint.endsWith('/')) {
|
||||
"$apiEndPoint$method"
|
||||
} else {
|
||||
"$apiEndPoint/$method"
|
||||
}
|
||||
}
|
||||
|
||||
private fun logHttp(method: String, msg: String) {
|
||||
logger.logp(Level.FINE, PinboardPoster::class.java.name, "executeMethod($method)", msg)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue