Threshr is a wrapper library for Target Corporation's redsky api. The redsky api has endpoints for querying product and store information. This includes fulfillment options, pricing, vendors, etc.
This project's artifacts are hosted on GitHub. Follow these instructions in order to include threshr in your maven or gradle projects.
- Generate a personal access token with
read:packages
privileges. - Add
settings.xml
to your~/.m2/
directory (swapping Batman's name and password for your GitHub user and the token from step 1
My summary of GitHub's Instructions
-
At the time of writing this, GitHub doesn't support using GitHub-hosted artifacts without first authenticating. You can do this in two steps:
<dependency>
<groupId>com.graqr</groupId>
<artifactId>threshr</artifactId>
<version>0.0.12</version>
</dependency>
compile "com.graqr:threshr:0.0.12"
You'll need to add api key
and CHANNEL
values to environment variables THRESHR_KEY
and THRESHR_CHANNEL
. I like using a .env
file like the one below.
THRESHR_KEY=BatKey
THRESHR_CHANNEL=WEB
⚠️ Environment Variables on windows must be assigned as an environment variable, ie$env:foo
.
How to find a key for the redsky api
Threshr doesn't support all redsky endpoints (not yet). There are three endpoints currently supported:
List<ProductSummary> fetchProductSummaries(TargetStore targetStore, Tcin tcin);
List<ProductSummary> fetchProductSummaries(TargetStore targetStore, String... tcin) throws ThreshrException;
Product fetchProductDetails(TargetStore targetStore, String tcin);
NearbyStores queryStoreLocations(Place place); // default values for limit and within
NearbyStores queryStoreLocations(int limit, int within, Place place);
See our contributing doc before taking a whack at any open issues. Also be sure to read the Testing README for some tips and tricks. We'd love for you to work with us!