com.dft.api.shopify.v202307.ShopifyCollectionAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-admin-rest Show documentation
Show all versions of shopify-admin-rest Show documentation
Shopify Admin REST API using JDK 11 and Reactive Programming
The newest version!
package com.dft.api.shopify.v202307;
import com.dft.api.shopify.ShopifySdkNew;
import com.dft.api.shopify.model.auth.AccessCredential;
import com.dft.api.shopify.v202307.model.products.ShopifyProductsWrapper;
import java.net.URI;
import java.net.http.HttpRequest;
import java.util.HashMap;
public class ShopifyCollectionAPI extends ShopifySdkNew {
public static final String VERSION_2023_07 = "/2023-07";
private static final String COLLECTIONS_ENDPOINTS = "/collections/";
private static final String COLLECTION_PRODUCTS_ENDPOINTS = "/products";
public ShopifyCollectionAPI(AccessCredential accessCredential) {
super(accessCredential);
}
public ShopifyProductsWrapper getAllProductsByCollectionId(HashMap params, Long collectionId) {
URI uri = baseUrl(VERSION_2023_07, COLLECTIONS_ENDPOINTS + collectionId + COLLECTION_PRODUCTS_ENDPOINTS);
uri = addParameters(uri, params);
HttpRequest request = get(uri);
return getRequestWrapped(request, ShopifyProductsWrapper.class);
}
}