-
- All Implemented Interfaces:
-
java.io.Closeable
,java.lang.AutoCloseable
,notion.api.v1.endpoint.BlocksSupport
,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, SearchSupport, UsersSupport, OAuthSupport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
NotionClient.Companion
-
Field Summary
Fields Modifier and Type Field Description private String
token
private String
clientId
private String
clientSecret
private String
redirectUri
private NotionHttpClient
httpClient
private NotionLogger
logger
private NotionJsonSerializer
jsonSerializer
private String
baseUrl
-
Constructor Summary
Constructors Constructor Description NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer, String baseUrl)
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer)
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger)
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient)
NotionClient(String token, String clientId, String clientSecret, String redirectUri)
NotionClient(String token, String clientId, String clientSecret)
NotionClient(String token, String clientId)
NotionClient(String token)
NotionClient()
-
Method Summary
Modifier and Type Method Description String
getToken()
Unit
setToken(String token)
String
getClientId()
Unit
setClientId(String clientId)
String
getClientSecret()
Unit
setClientSecret(String clientSecret)
String
getRedirectUri()
Unit
setRedirectUri(String redirectUri)
NotionHttpClient
getHttpClient()
Unit
setHttpClient(NotionHttpClient httpClient)
NotionLogger
getLogger()
Unit
setLogger(NotionLogger logger)
NotionJsonSerializer
getJsonSerializer()
Unit
setJsonSerializer(NotionJsonSerializer jsonSerializer)
String
getBaseUrl()
Unit
setBaseUrl(String baseUrl)
Unit
close()
-
Methods inherited from class notion.api.v1.NotionClient
appendBlockChildren, appendBlockChildren, createDatabase, createDatabase, createPage, createPage, deleteBlock, deleteBlock, exchangeAuthCode, exchangeAuthCode, listDatabases, listDatabases, listDatabases, listUsers, listUsers, listUsers, queryDatabase, queryDatabase, retrieveBlock, retrieveBlock, retrieveBlockChildren, retrieveBlockChildren, retrieveBotUser, retrieveDatabase, retrieveDatabase, retrievePage, retrievePage, retrievePagePropertyItem, retrievePagePropertyItem, retrieveUser, retrieveUser, search, search, search, updateBlock, updateBlock, updateDatabase, updateDatabase, updatePage, updatePage, updatePageProperties, updatePageProperties
-
Methods inherited from class notion.api.v1.endpoint.DatabasesSupport
buildRequestHeaders, contentTypeJson, urlEncode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
NotionClient
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer, String baseUrl)
-
NotionClient
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger, NotionJsonSerializer jsonSerializer)
-
NotionClient
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient, NotionLogger logger)
-
NotionClient
NotionClient(String token, String clientId, String clientSecret, String redirectUri, NotionHttpClient httpClient)
-
NotionClient
NotionClient(String token)
-
NotionClient
NotionClient()
-
-
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)
-
-
-
-