Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lindar-open/thunderkick-client

Thunderkick Java Client
https://github.com/lindar-open/thunderkick-client

Last synced: 5 days ago
JSON representation

Thunderkick Java Client

Awesome Lists containing this project

README

        

# thunderkick-client
Thunderkick Casino API client written in Java

Supports the account endpoints and the free rounds template and assignments.

Some Examples (more to come):

**Build**
``` java
Thunderkick thunderkick = Thunderkick.build(accessCredentials); // OR
Thunderkick thunderkick = Thunderkick.build(apiUrl, operatorId, username, password);
```

**Get or Search for Free Rounds Template**
``` java
Result template = thunderkick.freeRoundsTemplate().get(templateRef);

FreeRoundsTemplateSearchQuery searchQuery = new FreeRoundsTemplateSearchQuery();
LocalDateTime sixMonthsAgo = LocalDateTime.now().minusMonths(6);
searchQuery.setCreationDateFrom(fromLocalDate(sixMonthsAgo));
Result templates = thunderkick.freeRoundsTemplate().search(searchQuery);
```

**Assign or Search for Assignments**
``` java
String playerRef = "myRef";
String templateRef = "templateRef";
String playerTemplateRef = playerRef + templateRef;

FreeRoundsTemplatePlayerAssignment freeRoundsTemplatePlayerAssignment = new FreeRoundsTemplatePlayerAssignment(fromLocalDate(LocalDateTime.now()), fromLocalDate(LocalDateTime.now().plusMonths(1)), templateRef);

// assign to player
Result assignment = thunderkick.freeRounds().assignByPlayerRef(playerRef, playerTemplateRef, freeRoundsTemplatePlayerAssignment);

// view player assignments
Result assignments = thunderkick.freeRounds().getPlayerAssignmentsByPlayerRef(playerRef, false);
```

Note: When there's an error the Result class contains the message and error code.

Usage:

```xml

com.lindar
thunderkick-client
1.0.0

```