Search in sources :

Example 1 with BucketDetail

use of com.haleconnect.api.projectstore.v1.model.BucketDetail in project hale by halestudio.

the class HaleConnectInputSupplier method getLastModified.

/**
 * @return details on the hale connect project
 */
public Long getLastModified() {
    if (lastModified == null) {
        Owner owner = HaleConnectUrnBuilder.extractProjectOwner(getLocation());
        String projectId = HaleConnectUrnBuilder.extractProjectId(getLocation());
        final BucketsApi api = ProjectStoreHelper.getBucketsApi(basePathResolver, apiKey);
        final ApiResponse<BucketDetail> response;
        try {
            response = api.getBucketInfoWithHttpInfo(owner.getType().getJsonValue(), owner.getId(), projectId);
            lastModified = response.getData().getLastModified();
        } catch (ApiException e) {
        // Not fatal
        }
    }
    return lastModified;
}
Also used : BucketsApi(com.haleconnect.api.projectstore.v1.api.BucketsApi) BucketDetail(com.haleconnect.api.projectstore.v1.model.BucketDetail) ApiException(com.haleconnect.api.projectstore.v1.ApiException)

Aggregations

ApiException (com.haleconnect.api.projectstore.v1.ApiException)1 BucketsApi (com.haleconnect.api.projectstore.v1.api.BucketsApi)1 BucketDetail (com.haleconnect.api.projectstore.v1.model.BucketDetail)1