Skip to content

feedeo/jopify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jopify: Shopify API Java Library

Features

  • API call rate limiter - complies with a leaky bucket algorithm with a leak rate of 2 calls/second (no 429's coming your way ✌️).

Installation

Add jopify to your dependencies block in your pom.xml.

<dependency>
  <groupId>com.feedeo</groupId>
  <artifactId>jopify</artifactId>
  <version>0.2.1</version>
</dependency>

Usage :shipit:

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();
}

Limitations

As of now it only supports a limited number of API services.

Documentation

See the Javadoc for the library API.

Reference

Shopify API reference