Package notion.api.v1
Class NotionClient
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable,notion.api.v1.endpoint.BlocksSupport,notion.api.v1.endpoint.CommentsSupport,notion.api.v1.endpoint.DatabasesSupport,notion.api.v1.endpoint.EndpointsSupport,notion.api.v1.endpoint.OAuthSupport,notion.api.v1.endpoint.PagesSupport,notion.api.v1.endpoint.SearchSupport,notion.api.v1.endpoint.UsersSupport
public final class NotionClient implements AutoCloseable, Closeable, DatabasesSupport, PagesSupport, BlocksSupport, CommentsSupport, SearchSupport, UsersSupport, OAuthSupport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNotionClient.Companion
-
Field Summary
Fields Modifier and Type Field Description private Stringtokenprivate StringclientIdprivate StringclientSecretprivate StringredirectUriprivate NotionHttpClienthttpClientprivate NotionLoggerloggerprivate NotionJsonSerializerjsonSerializerprivate StringbaseUrlpublic final static NotionClient.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description NotionClient(String token)NotionClient(String clientId, String clientSecret, String redirectUri)NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer, String baseUrl)
-
Method Summary
Modifier and Type Method Description StringgetToken()UnitsetToken(String token)StringgetClientId()UnitsetClientId(String clientId)StringgetClientSecret()UnitsetClientSecret(String clientSecret)StringgetRedirectUri()UnitsetRedirectUri(String redirectUri)NotionHttpClientgetHttpClient()UnitsetHttpClient(NotionHttpClient httpClient)NotionLoggergetLogger()UnitsetLogger(NotionLogger logger)NotionJsonSerializergetJsonSerializer()UnitsetJsonSerializer(NotionJsonSerializer jsonSerializer)StringgetBaseUrl()UnitsetBaseUrl(String baseUrl)Unitclose()-
Methods inherited from class notion.api.v1.endpoint.DatabasesSupport
createDatabase, createDatabase, listDatabases, listDatabases, listDatabases, queryDatabase, queryDatabase, retrieveDatabase, retrieveDatabase, updateDatabase, updateDatabase -
Methods inherited from class notion.api.v1.endpoint.EndpointsSupport
buildRequestHeaders, contentTypeJson, urlEncode -
Methods inherited from class notion.api.v1.endpoint.PagesSupport
createPage, createPage, retrievePage, retrievePage, retrievePagePropertyItem, retrievePagePropertyItem, updatePage, updatePage, updatePageProperties, updatePageProperties -
Methods inherited from class notion.api.v1.endpoint.BlocksSupport
appendBlockChildren, appendBlockChildren, deleteBlock, deleteBlock, retrieveBlock, retrieveBlock, retrieveBlockChildren, retrieveBlockChildren, updateBlock, updateBlock -
Methods inherited from class notion.api.v1.endpoint.CommentsSupport
createComment, createComment, createComment, retrieveComments, retrieveComments, retrieveComments -
Methods inherited from class notion.api.v1.endpoint.SearchSupport
search, search, search -
Methods inherited from class notion.api.v1.endpoint.UsersSupport
listUsers, listUsers, listUsers, retrieveBotUser, retrieveUser, retrieveUser -
Methods inherited from class notion.api.v1.endpoint.OAuthSupport
exchangeAuthCode, exchangeAuthCode -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
NotionClient
NotionClient(String token)
-
NotionClient
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer, String baseUrl)
-
-
Method Detail
-
getClientId
String getClientId()
-
setClientId
Unit setClientId(String clientId)
-
getClientSecret
String getClientSecret()
-
setClientSecret
Unit setClientSecret(String clientSecret)
-
getRedirectUri
String getRedirectUri()
-
setRedirectUri
Unit setRedirectUri(String redirectUri)
-
getHttpClient
NotionHttpClient getHttpClient()
-
setHttpClient
Unit setHttpClient(NotionHttpClient httpClient)
-
getLogger
NotionLogger getLogger()
-
setLogger
Unit setLogger(NotionLogger logger)
-
getJsonSerializer
NotionJsonSerializer getJsonSerializer()
-
setJsonSerializer
Unit setJsonSerializer(NotionJsonSerializer jsonSerializer)
-
getBaseUrl
String getBaseUrl()
-
setBaseUrl
Unit setBaseUrl(String baseUrl)
-
-
-
-