-
Ktor is a tough gig developmental platform that comes with the support to build asynchronous servers and clients right in the kotlin.Pricing:
- Open Source
To make requests to Notion's API, we will work with Ktor to instantiate an HTTP client on our app.
#Development #Tool #Web Frameworks 33 social mentions
-
Connect Notion to the tools you use every day
// composeApp/src/commonMain/kotlin/api/QueryDatabaseRequest.kt Package api Import kotlinx.serialization.SerialName Import kotlinx.serialization.Serializable /** * https://developers.notion.com/reference/post-database-query */ @Serializable Data class QueryDatabaseRequest( @SerialName("start_cursor") val startCursor: String? = null, @SerialName("page_size") val pageSize: Int? = 100, ) { init { pageSize?.let { require(it in 1..100) { "Illegal property, pageSize must be between 1 and 100" } } } } // composeApp/src/commonMain/kotlin/api/QueryDatabaseResponse.kt Package api Import kotlinx.serialization.SerialName Import kotlinx.serialization.Serializable @Serializable Data class QueryDatabaseResponse( // https://developers.notion.com/reference/page val results: List<ExpensePageResponse>, @SerialName("next_cursor") val nextCursor: String? = null, @SerialName("has_more") val hasMore: Boolean, ).
#Productivity #APIs #No Code 45 social mentions