ProductsUp is a feed management solution to centralize your entire products data flow with a variety of external social media platforms - https://www.productsup.com/
This library provides an integration with ProductsUp platform API endpoints to interact with the platform operations ProductsUP API's
The library is published on Maven Central. To add the library into your spring project
<dependency>
<groupId>com.github.shinusuresh</groupId>
<artifactId>productsup-client-spring-boot-starter</artifactId>
<version>0.1.21</version>
</dependency>
implementation 'io.github.shinusuresh:productsup-client-spring-boot-starter:0.1.21'
#Add the following properties
productsup.token=<Your platform api token>
#If you are using stream
productsup.stream.enabled=true
productsup.authorization-token=Bearer <Your Stream PAT>
private final PlatformApiClient platformApiClient;
var sites = this.platformApiClient.getSites();
private final StreamApiClient streamApiClient;
var streams = this.streamApiClient.listStreams();
private final StreamApiUploadClient streamUploadApiClient;
var streams = this.streamUploadApiClient.uploadChunkeddData(<stream id>, <payload>);
Payload has to be of a
List<? extends BaseStreamData>
For error scenarios WebClientResponseException
will be thrown. Handle the exception to get the erorr data
var exception = assertThrows(WebClientResponseException.class, () -> streamApiClient.createStream(data));
var errors = exception.getResponseBodyAs(StreamErrors.class);
Enable org.springframework.http
to DEBUG
will enable logging of request and response.
logging:
level:
org.springframework.http: DEBUG