Instacount API Java Client

Java client for the Instacount API based upon the Netflix Feign library.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования CLI Взаимодействие с пользователем
Группа

Группа

io.instacount
Идентификатор

Идентификатор

instacount-java-client
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Instacount API Java Client
Java client for the Instacount API based upon the Netflix Feign library.
Ссылка на сайт

Ссылка на сайт

https://github.com/instacount/instacount-java-client
Организация-разработчик

Организация-разработчик

Instacount
Система контроля версий

Система контроля версий

http://github.com/instacount/instacount-java-client

Скачать instacount-java-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.instacount/instacount-java-client/ -->
<dependency>
    <groupId>io.instacount</groupId>
    <artifactId>instacount-java-client</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.instacount/instacount-java-client/
implementation 'io.instacount:instacount-java-client:1.0.2'
// https://jarcasting.com/artifacts/io.instacount/instacount-java-client/
implementation ("io.instacount:instacount-java-client:1.0.2")
'io.instacount:instacount-java-client:jar:1.0.2'
<dependency org="io.instacount" name="instacount-java-client" rev="1.0.2">
  <artifact name="instacount-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.instacount', module='instacount-java-client', version='1.0.2')
)
libraryDependencies += "io.instacount" % "instacount-java-client" % "1.0.2"
[io.instacount/instacount-java-client "1.0.2"]

Зависимости

compile (12)

Идентификатор библиотеки Тип Версия
com.netflix.feign : feign-core jar 8.13.1
com.netflix.feign : feign-jackson jar 8.13.1
com.netflix.feign : feign-httpclient jar 8.13.1
com.netflix.feign : feign-okhttp jar 8.13.1
com.netflix.feign : feign-ribbon jar 8.13.1
com.google.guava : guava jar 18.0
com.fasterxml.jackson.core : jackson-core jar 2.6.3
com.fasterxml.jackson.core : jackson-databind jar 2.6.3
com.fasterxml.jackson.datatype : jackson-datatype-guava jar 2.6.3
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.6.3
com.sappenin.utils : java-utils jar 1.1.2
com.sappenin.utils.rest : rest-utils2 jar 1.0.2

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.16.6

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

instacount-java-client

Circle CI

A Java client for accessing the Instacount API. This client is built using Feign by Netflix.

Maven

We haven't published this client to Maven Central yet, but will shortly. In the meantime, you will need to download the client from here, and include the following dependency information:

<dependency>
     <groupId>io.instacount</groupId>
     <artifactId>instacount-java-client</artifactId>
    <version>1.0.2-SNAPSHOT</version>
</dependency>

Basics

Using the Instacount Java client is easy.

First, create an instance of InstacountClientParams. This will be used to supply your client implementation with the proper credentials (Application Id and Key) to allow it to access your instacount account. It will also be used to supply an actual HTTP implementation.

For ease of use, we recommend extending AbstractInstacountClientParams, like this:

/**
* An extension of {@link AbstractInstacountClientParams} that allows implementors to provide application-specific 
* credentials and other information necessary to bootstrap the InstacountClient. 
*/
public class MyClientParams extends AbstractInstacountClientParams {
	
	@Override
	public String getInstacountApplicationId()
	{
		 ... // Your Instacount Application Id
	}

	@Override
	public String getInstacountReadOnlyApplicationKey()
	{
		 ... // Your Instacount Read-Only Application Key
    }

	@Override
	public String getInstacountReadWriteApplicationKey()
	{
	    ... // Your Instacount Read-Only Application Key
	}    	
}

Next, instantiate your client using the InstacountClient.Builder, like this:

final Instacount client = Instacount.Builder.build(params);

Instacount Client on Google App Engine

The Instacount client uses Square's OKHttp client for actual HTTP calls. However, Square's library (as well as Apache's HTTPClient) is not supported inside of the Google App Engine runtime. Thus, if you're using the Instacount client inside of Google App Engine, then you'll want to leverage our App Engine client that uses Google's URLFetch service as its HTTP implementation.

For more information about how to configure the Instacount client inside of Google App Engine, please see here.

More Examples

For more examples of how to use the Instacount API Java client, see the unit tests in InstacountClientTest.java.

io.instacount

instacount.io

A cloud-based API for counting anything.

Версии библиотеки

Версия
1.0.2