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>io.github.net-a-porter</groupId>
<artifactId>productsup-client-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>
implementation 'io.github.net-a-porter:productsup-client-spring-boot-starter:1.0.0'
#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