Skip to content

A high-performance java game query library designed for steam/source based games and others

License

Notifications You must be signed in to change notification settings

vladislove-ua/async-gamequery-lib

 
 

Repository files navigation

Asynchronous Game Query Library

Maven Donate Build Status Javadocs Gitter Codacy Badge Project Stats

It's a game query library which provides a convenient way for java programs to execute asynchronous requests to game servers/services. It's built on top of Netty as it's core transport engine and use AsyncHttpClient for web services.

Supported Games

Project Resources

Discussion Platforms

If you have any inquiries,concerns or suggestions please use one of the official communication channels for this project

Implementations

Below is the list of what is currently implemented on the library

  • Valve Master Server Query Protocol
  • Valve Source Query Protocol
  • Valve Steam Web API
  • Valve Steam StoreFront Web API
  • Valve Dota 2 Web API
  • Valve CS:GO Web API
  • Valve Source Log Handler (a log monitor service)
  • Supercell Clash of Clans Web API

Requirements

  • Java JDK 8
  • Apache Commons Lang 3.x
  • Apache Commons Math 3.x
  • Netty 4.1.x
  • AsyncHttpClient 2.5.x
  • SLF4J 1.7.x
  • Google Gson 2.8.x
  • Google Guava 23.x

Installation

Just add the following dependencies to your maven pom.xml. Only include the modules you need.

Install from Maven Central

Valve Master Server Query Protocol

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-steam-master</artifactId>
    <version>0.1.7</version>
</dependency>

Valve Source Query Protocol

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-source-query</artifactId>
    <version>0.1.7</version>
</dependency>

Valve Steam Web API

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-steam-webapi</artifactId>
    <version>0.1.7</version>
</dependency>

Valve Dota 2 Web API

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-dota2-webapi</artifactId>
    <version>0.1.7</version>
</dependency>

Valve CS:GO Web API

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-csgo-webapi</artifactId>
    <version>0.1.7</version>
</dependency>

Supercell Clash of Clans Web API

<dependency>
    <groupId>com.ibasco.agql</groupId>
    <artifactId>agql-coc-webapi</artifactId>
    <version>0.1.7</version>
</dependency>

Install from Source

Clone from remote repository then mvn install. All of the modules will be installed to your local maven repository.

git clone https://github.com/ribasco/async-gamequery-lib.git
cd async-gamequery-lib
mvn install

Usage

For usage examples, please refer to the site docs.

Interactive Examples

To run the available examples, I have included a convenience script (run-example.sh) that will allow you to pick a specific example you want to run.

The script accepts a "key" that represents an example application. To get a list of keys, simply invoke the script without arguments, for example:

raffy@spinmetal:~/projects/async-gamequery-lib$ ./run-example.sh
Error: Missing Example Key. Please specify the example key. (e.g. source-query)

====================================================================
List of available examples
====================================================================
- Source Server Query Example      (key: source-query)
- Master Server Query Example      (key: master-query)
- Source Rcon Example              (key: source-rcon)
- Clash of Clans Web API Example   (key: coc-webapi)
- CS:GO Web API Example            (key: csgo-webapi)
- Steam Web API Example            (key: steam-webapi)
- Steam Storefront Web API Example (key: steam-store-webapi)
- Source Log Listener Example      (key: source-logger)
- Steam Econ Web API Example       (key: steam-econ-webapi)
- Dota2 Web API Example            (key: dota2-webapi)

If you are running a web service type example, you will be prompted with an API key. Simply copy and paste the key to the console.

raffy@spinmetal:~/projects/async-gamequery-lib$ ./run-example.sh coc-webapi
Running example for coc-webapi
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AGQL - Examples 0.1.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ agql-lib-examples ---
19:59:25.659 [com.ibasco.agql.examples.base.ExampleRunner.main()] INFO  com.ibasco.agql.examples.base.ExampleRunner - Running Example : coc-webapi
Please input your API Token:

Note:

  • Don't forget to perform a mvn clean install before running an example
  • The output can be reviewed from the logs directory under the project's directory.

Protocol Specifications

References you might find helpful regarding the implementations

Contributing

Fork it and submit a pull request. Any type of contributions are welcome.

Special Thanks/Sponsors

  • ej Technologies - Developer of the award-winning JProfiler, a full-featured "All-in-one" Java Profiler. Click on the icon below to find out more.

    JProfiler

  • JetBrains - For providing the open-source license for their awesome Java IDE.

    IntelliJ IDEA

About

A high-performance java game query library designed for steam/source based games and others

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.5%
  • Other 0.5%