An open API service indexing awesome lists of open source software.

https://github.com/feedeo/jopify

:convenience_store: Shopify :coffee: Java Library
https://github.com/feedeo/jopify

Last synced: 11 days ago
JSON representation

:convenience_store: Shopify :coffee: Java Library

Awesome Lists containing this project

README

          

# Jopify: Shopify API Java Library
[![][travis img]][travis]
[![][release img]][release]
[![][license img]][license]
[![][codecov img]][codecov]

## 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 :v:).

## Installation
Add `jopify` to your `dependencies` block in your `pom.xml`.
```xml

com.feedeo
jopify
0.2.1

```

## Usage :shipit:
Build a `ShopifySession` from an OAuth 2.0 access token and the shop name. Then instantiate the desired API service through `ShopifyService`.
```java
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.

* [Shop](https://docs.shopify.com/api/reference/shop) :white_check_mark:
* [Product](https://docs.shopify.com/api/reference/product) :white_check_mark:

## Documentation
See the [Javadoc](http://feedeo.github.io/jopify/javadoc/) for the library API.

## Reference
[Shopify API reference](https://docs.shopify.com/api/reference)

[travis]:https://travis-ci.org/feedeo/jopify
[travis img]:https://travis-ci.org/feedeo/jopify.svg?branch=master

[release]:https://github.com/feedeo/jopify/releases
[release img]:https://img.shields.io/github/release/feedeo/jopify.svg

[license]:LICENSE
[license img]:https://img.shields.io/badge/license-MIT-blue.svg

[codecov]:https://codecov.io/github/feedeo/jopify?branch=master
[codecov img]:https://codecov.io/github/feedeo/jopify/coverage.svg?branch=master