Giter Site home page Giter Site logo

beam-client-java's Introduction

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.

Including beam-client-java in your Project

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

Our Maven Artifacts are published to GitHub's Package Registry, so you'll need to set that up.

First in your project, add the appropriate repository section to your pom.xml as a <repository> as follows:

<repositories>
  <repository>
    <id>github</id>
    <name>GitHub Mixer Client Java Apache Maven Packages</name>
    <url>https://maven.pkg.github.com/mixer/beam-client-java</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>6.0.0</version>
  </dependency>
</dependencies>

The last thing you'll need to do is authenticate with GitHub's Package Registry as it currently does not support Anonymous Access. You can do this by adding some settings to your ~/.m2/settings.xml file:

  • USERNAME should be your GitHub Username
  • Token should be a personal access token with the read:packages scope.
<servers>
  <server>
    <id>github</id>
    <username>USERNAME</username>
    <password>TOKEN</password>
  </server>
</servers>

You can read more about this process on Github's Help page

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

beam-client-java's People

Contributors

ttaylorr avatar probableprime avatar pahimar avatar jamydev avatar vijaysharm avatar mirawaneko avatar fitzpasd avatar tatdk avatar njb-said avatar plancke avatar rogarms avatar connor4312 avatar jenteissler avatar optisamit avatar jan-krueger avatar simonschick avatar ethanwaite avatar thelonedevil avatar mattjustmatt avatar ryderms avatar thequietcroc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.