GithubHelp home page GithubHelp logo

mattjustmatt / beam-client-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thelonedevil/beam-client-java

0.0 2.0 0.0 128 KB

Beam API client written in Java.

Home Page: https://developer.beam.pro

Java 100.00%

beam-client-java's Introduction

beam-java

This is the official Java client for the beam.pro 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 Beam's Java client. Once you have Maven installed, there are two easy steps to getting the client in your classpath.

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

<repositories>
  <repository>
    <id>beam-snapshots</id>
    <url>https://maven.beam.pro/content/repositories/snapshots/</url>
  </repository>
</repositories>

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

<dependencies>
  <dependency>
    <groupId>pro.beam</groupId>
    <artifactId>api</artifactId>
    <version>1.3.1-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 Beam API, and then get a list of all channel IDs.

// Construct an instance of the Beam API such that we can query certain
// endpoints for data.
BeamAPI beam = new BeamAPI();

// 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(beam.use(UsersService.class).search("tta"), new ResponseHandler<UserSearchResponse>() {
    // Set up a handler for the response
    @Override public void onSuccess(UserSearchResponse response) {
        for (BeamUser user : response) {
            System.out.println(user.username);
        }
    }
});

beam-client-java's People

Contributors

ttaylorr avatar njb-said avatar tatdk avatar jenteissler avatar connor4312 avatar

Watchers

James Cloos avatar Matthew Salsamendi 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.