- API call rate limiter - complies with a leaky bucket algorithm with a leak rate of 2 calls/second (no 429's coming your way ✌️).
Add jopify
to your dependencies
block in your pom.xml
.
<dependency>
<groupId>com.feedeo</groupId>
<artifactId>jopify</artifactId>
<version>0.2.1</version>
</dependency>
Build a ShopifySession
from an OAuth 2.0 access token and the shop name. Then instantiate the desired API service through ShopifyService
.
import com.feedeo.shopify.*;
String oAuth2AccessToken = "my-oauth2-access-token";
String shopName = "my-shop-name";
ShopifySession session = new ShopifySession.Builder()
.withOAuth2AccessToken(oAuth2AccessToken)
.withShopName(shopName)
.build();
ShopifyService shopifyService = new ShopifyService();
ShopService shopService = shopifyService.getService(session, ShopService.class);
try {
Shop shop = shopService.getShop();
} catch (ShopifyException e) {
e.printStackTrace();
}
As of now it only supports a limited number of API services.
See the Javadoc for the library API.