Coder Social home page Coder Social logo

bgg-client's Introduction

bgg-client

BoardGameGeek API 2 client for Java and Android apps

Adding the library as a dependency

Gradle

implementation 'com.github.marcioos:bgg-client:1.0'

Maven

<dependency>
    <groupId>com.github.marcioos</groupId>
    <artifactId>bgg-client</artifactId>
    <version>1.0</version>
</dependency>

Javadocs

http://marcioos.github.io/bgg-client/

Using the library

There's a single class called BGG that exposes the 3 main client operations as static methods: search, fetch and fetchCollection.

Search

Use BGG.search for searching items based on a free text search term and an optional list of ThingType (var-arg).

SearchOutput searchResult = BGG.search("dominion", ThingType.BOARDGAME);

SearchOutput contains a list of SearchItem along with summary information on the search result. See SearchOutput and SearchItem.

Fetch

Use BGG.fetch to retrieve more detailed information about specific items, looking up by their BoardGameGeek database IDs, which can be found with the BGG.search method above.

int agricolaXDeckId = 38733;
int dieMacherId = 1;

Collection<FetchItem> item = BGG.fetch(Arrays.asList(agricolaXDeckId, dieMacherId));

FetchItem contains most of the data available on BoardGameGeek related to an item. See FetchItem.

Fetch collection

Use BGG.fetchCollection for retrieving an user's collection by their username on BoardGameGeek.

String username = "marcio_os";

UserCollection myCollection = BGG.fetchCollection(username);

See UserCollection.

bgg-client's People

Contributors

marcioos avatar mariane-sm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

problemzebra

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.