clayfish / printful4j

This is an unofficial Java and Android client for Printful API.
MIT License
2 stars 2 forks source link
android java jitpack printful printful-sdk printful4java

printful4j

Release

This is an unofficial client of Printful API for Android. This can also be used in any JVM based project to connect to Printful API. It uses semantic versioning so that developers can trust it.

How to download?

Android

To use it, add jitpack repository in your build.gradle file.

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

And add following in dependencies,

dependencies {
    compile 'in.clayfish:printful4j:0.2.1'
}

Java

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

and then use following,

<dependency>
    <groupId>in.clayfish</groupId>
    <artifactId>printful4j</artifactId>
    <version>0.2.1</version>
</dependency>

For more information regarding download or using different build systems, please visit JitPack.

How to use?

There is one interface Client to use all the printful API. First create a variable to keep your client,

Client printfulClient = new CompositeClient("YOUR_API_KEY");

CompositeClient uses multiple specific clients to serve full API, if you want to use a specific API, you can use a specific API client, for example,

Client printfulOrdersClient = new OrdersApiClient("YOUR_API_KEY");

Do remember that OrdersApiClient will have all the methods available, but methods which are not related to Orders API will throw a NotImplementedException.

This client uses HTTPS JSON API provided by Printful as documented here. When using methods, please refer to that documentation. Javadocs are available with builds as well as here.

Currently many methods throw NotImplementedException because this client is in development stage. Please use caution while using this library.