https://github.com/mathieusoysal/codingame-puzzles-stats-library
Simple java library to interact with CodinGame puzzle api.
https://github.com/mathieusoysal/codingame-puzzles-stats-library
codingame codingame-library codingame-puzzles
Last synced: about 1 month ago
JSON representation
Simple java library to interact with CodinGame puzzle api.
- Host: GitHub
- URL: https://github.com/mathieusoysal/codingame-puzzles-stats-library
- Owner: MathieuSoysal
- License: gpl-3.0
- Created: 2021-12-15T10:52:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T02:39:47.000Z (almost 3 years ago)
- Last Synced: 2025-03-02T22:11:37.460Z (over 1 year ago)
- Topics: codingame, codingame-library, codingame-puzzles
- Language: Java
- Homepage:
- Size: 1.04 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://sonarcloud.io/summary/new_code?id=MathieuSoysal_CodinGame-Puzzles-stats-library)
[](https://sonarcloud.io/summary/new_code?id=MathieuSoysal_CodinGame-Puzzles-stats-library)

[](https://mathieusoysal.github.io/CodinGame-Puzzles-stats-library/javadoc/)
#
CodinGame Puzzles stats library [](https://github.com/MathieuSoysal/CodinGame-Puzzles-stats-library/blob/master/LICENSE)
Simple library for interacting with CodinGame's puzzle API.
## How to integrate the CodinGame-Puzzles-Stats-library into your code
**Required Java version :** 17
### Maven
If you have Maven, add the following to the dependencies of your `pom.xml` file:
```xml
io.github.mathieusoysal
codingame-puzzles-stats
1.0.5
```
>*See an example of a [pom.xml](https://github.com/MathieuSoysal/CodinGame-Puzzles-stats-library/blob/d8bdf1a7f1002e387bfae0beb255638f59e3c8b9/ressources-readme/pom-exemple.xml#L20-L24) file with the CodinGame-Puzzles-stats-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:1.0.5'
```
## Example code for using the CodinGame-Puzzles-Stats library
```java
import com.github.mathieusoysal.codingame_stats.puzzle.Puzzle;
import com.github.mathieusoysal.codingame_stats.puzzle.achievement.Achievement;
import com.github.mathieusoysal.codingame_stats.puzzle.topic.Topic;
import com.github.mathieusoysal.codingame_stats.CodinGame;
public class CodeExemple {
public static void main(String[] args) {
CodinGame codinGame = new CodinGame();
// Get all puzzles of CodinGame
List puzzles = codinGame.getPuzzles();
// Iterate over all puzzles
for (Puzzle puzzle : puzzles) {
// Print the title of the puzzle
System.out.println(puzzle.getTitle());
// Print the solved count of the puzzle
System.out.println(puzzle.getSolvedcount());
// Print the attempt count of the puzzle
System.out.println(puzzle.getAttemptCount());
// Print the achievement count of the puzzle
System.out.println(puzzle.getAchievementCount());
// Print the xp points of the puzzle
System.out.println(puzzle.getXpPoints());
// Print the created date of the puzzle
System.out.println(puzzle.getCreatedDate());
// Print the title of the puzzle
System.out.println(puzzle.getTitle());
// Print the contributor of the puzzle
System.out.println(puzzle.getContributor());
// Print the topics of the puzzle
for (Topic topic : puzzle.getTopics()) {
System.out.println(topic.getHandle());
System.out.println(topic.getValue());
}
// Print the achievements of the puzzle
for (Achievement achievement : puzzle.getLinkedAchievements()) {
System.out.println(achievement.getTitle());
System.out.println(achievement.getDescription());
System.out.println(achievement.getPoints());
System.out.println(achievement.getLevel());
}
}
}
}
```
>*See more [code exemples](https://github.com/MathieuSoysal/CodinGame-Puzzles-stats-library/blob/master/ressources-readme/CodeExemple.java)*
## Contribution
Suggestions and contributions are always welcome! Please discuss larger changes via an [issue](https://github.com/MathieuSoysal/CodinGame-Puzzles-stats-library/issues) before submitting a request.
## Licence
This project is released under the [GNU General Public License v3.0](https://github.com/MathieuSoysal/CodinGame-Puzzles-stats-library/blob/master/LICENSE)