All Downloads are FREE. Search and download functionalities are using the official Maven repository.

notion.api.v1.endpoint.EndpointsSupport.kt Maven / Gradle / Ivy

package notion.api.v1.endpoint

import notion.api.v1.http.UserAgent
import java.net.URLEncoder

interface EndpointsSupport {
    val token: String

    fun buildRequestHeaders(additionalOnes: Map): Map {
        return mapOf(
            "Authorization" to "Bearer $token",
            "Notion-Version" to "2021-05-13",
            "User-Agent" to UserAgent.buildUserAgent()
        ).plus(additionalOnes)
    }

    fun urlEncode(value: String): String = URLEncoder.encode(value, "UTF-8")

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy