Skip to content

io.github.mathieusoysal.codingame-puzzles-stats-history 1.2.0 Latest version

Install 1/2: Add this to pom.xml:
Learn more about Maven or Gradle
<dependency>
  <groupId>io.github.mathieusoysal</groupId>
  <artifactId>codingame-puzzles-stats-history</artifactId>
  <version>1.2.0</version>
</dependency>
Install 2/2: Run via command line
$ mvn install

About this package

Maven Central
Coverage
Maintainability Rating
GitHub Actions
Javadoc

CodinGame Puzzles History library GitHub

Simple library for interacting with a MongoDB database containing the puzzles statistics history of CodinGame.

How to integrate the CodinGame-Puzzles-Stats-history into your code

Required Java version : 17

Required MongoDB database

Maven

If you have Maven, add the following to the dependencies of your pom.xml file:

<dependency>
  <groupId>io.github.mathieusoysal</groupId>
  <artifactId>codingame-puzzles-stats-history</artifactId>
  <version>1.2.0</version>
</dependency>

See an example of a pom.xml file with the CodinGame-Puzzles-History-Library

Gradle

If you are using Gradle, add the following to the dependencies of your build.gradle file:

    implementation 'io.github.mathieusoysal:codingame-puzzles-stats-history:1.2.0'

Example code for using the CodinGame-Puzzles-Stats library

import com.github.mathieusoysal.CodinGameHistory;

public class CodeExemple {

    public static void main(String[] args) {
        CodinGameHistory codinGameHistory = new CodinGameHistory(mongoClient, "CodinGame-stats");

        // Get all puzzles statistics of 2020/01/01
        List<DatedPuzzle> puzzles = codinGameHistory.getPuzzlesOf(LocalDate.of(2020, 1, 1));

        // Get all puzzles statistics between two dates
        List<DatedPuzzle> puzzles = codinGameHistory.getPuzzlesBetweenTwoDate(
              LocalDate.of(2020, 1, 1), LocalDate.of(2020, 1, 1));
    }
}

See more code exemples

Contribution

Suggestions and contributions are always welcome! Please discuss larger changes via an issue before submitting a request.

Licence

This project is released under the Apache License 2.0