Java API for HubSpot REST API
Provides Java API to Hubspos COS Page Publishing API and Authorization.
Some methods use JSON-POJO mapping:
- list pages
- refresh access token
- clone page
Another methods load and pass page as JSON transparently (SDK user is responcible for mapping, processing of JSON):
- get page
- update page
./gradlew.sh clean build
./gradlew.sh clean integrationTest -Dhubspot.refreshToken=<refreshToken> -Dhubspot.clientId=<clientIdOfHubspotApplication> -Dhubspot.basicFormId=<DefaultFormId> -Dhubspot.notLivePageCampaignId=<notLivePageCampaignId> -Dhubspot.basicPageId=<basicPageId> -Dhubspot.archivedPageId=<archivedPageId> -Dhubspot.notLivePageId=<notLivePageId>
HubspotClient client = hubspotClient = new HubspotRestClient(<clientIdOfHubspotApplication>, <refreshToken>);
Requesting 10 pages, starting from the first one (i.e. with no offset):
ListWrapper<PageDetail> pages = hubspotClient.listPages(0, 10);
String pageAsJson = hubspotClient.getPageById(<pageID>);
String updatedPage = hubspotClient.updatePage(pageSnippetAsJson);
RefreshTokenData tokenData = hubspotClient.refreshToken();