Socket
Socket
Sign inDemoInstall

io.instacount:instacount-java-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.instacount:instacount-java-client

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


Version published
Maintainers
1
Source

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.

FAQs

Package last updated on 05 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc