Giter Site home page Giter Site logo

callmeqan / chess-com-pubapi-java-wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sornerol/chess-com-pubapi-java-wrapper

0.0 0.0 0.0 142 KB

Java wrapper for Chess.com's public data API (PubAPI)

License: Apache License 2.0

Java 100.00%

chess-com-pubapi-java-wrapper's Introduction

Chess.com PubAPI Wrapper for Java

javadoc Maven Central

A Java wrapper for Chess.com's public data API (PubAPI)

Quick Start

Follow these directions to get up-and-running with the Chess.com API wrapper.

Add dependencies to Maven/Gradle

To get started, add chesscom-pubapi-wrapper to your project's dependencies.

Sorry but mine is just a fork from main repo, which only has .jar file

Create a new client

The API wrapper consists of different clients, which correspond to different API endpoints within Chess.com's PubAPI:

  • ClubClient
  • CountryClient
  • DailyPuzzleClient
  • LeaderboardsClient
  • PlayerClient
  • StreamersClient
  • TeamMatchClient
  • TournamentClient

A complete description of these clients is available in the Javadocs.

For our example, let's create a new PlayerClient to retrieve information about a player:

import io.github.sornerol.chess.pubapi.client.PlayerClient;
import io.github.sornerol.chess.pubapi.domain.player.Player;
import io.github.sornerol.chess.pubapi.exception.ChessComPubApiException;

import java.io.IOException;

public class Main {

    public static void main(String[] args) throws ChessComPubApiException, IOException {
        PlayerClient client = new PlayerClient();
        Player player = client.getPlayerByUsername("erik");

        System.out.println(player.toString());
    }
}

chess-com-pubapi-java-wrapper's People

Contributors

callmeqan avatar sornerol 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.