Beam API client written in Java.
Java
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

mixer-java Build Status

This is the official Java client for the mixer.com API. It currently supports v1 and is a work in progress.

Documentation

Confused about a method's intent? Not sure where to get a piece of information? Our Javadocs are the place to go! That link contains the most up-to-date docs for this API client.

Building

We use Maven to build Mixer's Java client. Once you have Maven installed, there are two easy steps to getting the client in your classpath.

First, add the Mixer repo to your pom.xml as a <repository> as follows:

<repositories>
  <repository>
    <id>mixer-releases</id>
    <url>https://maven.mixer.com/content/repositories/releases/</url>
  </repository>
  <repository>
    <id>mixer-snapshots</id>
    <url>https://maven.mixer.com/content/repositories/snapshots/</url>
  </repository>
</repositories>

And secondly, add this project as a dependency in your pom.xml:

<dependencies>
  <dependency>
    <groupId>com.mixer</groupId>
    <artifactId>api</artifactId>
    <version>5.0.4-SNAPSHOT</version>
  </dependency>
</dependencies>

Once these steps are completed, you should have the client on your classpath, and are set to get programming!

Example:

Here, an example of how to use the built-in Future callback system provided in Guava follows. In this example, we'll construct the Mixer API, and then get a list of all channel IDs.

// Construct an instance of the Mixer API such that we can query certain
// endpoints for data.
MixerAPI mixer = new MixerAPI();

// Invoke the `UsersService.class` in order to access the methods within
// that service.  Then, assign a callback using Guava's FutureCallback
// class so we can act on the response.
Futures.addCallback(mixer.use(UsersService.class).search("tta"), new ResponseHandler<UserSearchResponse>() {
    // Set up a handler for the response
    @Override public void onSuccess(UserSearchResponse response) {
        for (MixerUser user : response) {
            System.out.println(user.username);
        }
    }
});

Developing

Docs

To build and publish the docs run: mvn javadoc:javadoc scm-publish:publish-scm