https://github.com/plutokekz/pure-riot
Riot Api Client in Haskell
https://github.com/plutokekz/pure-riot
api-client haskell league-of-legends legends-of-runeterra riot teamfight-tactics valorant
Last synced: about 1 month ago
JSON representation
Riot Api Client in Haskell
- Host: GitHub
- URL: https://github.com/plutokekz/pure-riot
- Owner: Plutokekz
- License: gpl-2.0
- Created: 2025-03-16T11:45:41.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-03-16T12:55:13.000Z (about 2 months ago)
- Last Synced: 2025-03-16T13:26:34.138Z (about 2 months ago)
- Topics: api-client, haskell, league-of-legends, legends-of-runeterra, riot, teamfight-tactics, valorant
- Language: Haskell
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pure Riot
Pure Riot is an api client for the riot api like all the other clients. It has types to all existing endpoints and functions to create requests. The request then can be consumed by a manager to produce a response with a type.
```haskell
import Endpoints.LeagueofLegends.MatchV5 (matchesTimeline)
import PureRiot (createManager, fetchTyped)
import Regions (Region (EUROPE))main :: IO ()
main = do
manager <- createManager API-KEY -- creating the http manager
request <- matchesTimeline EUROPE "EUW1_7334877218" -- creating a request that will get the timeline if the given match id
timelineDto <- fetchTyped manager request -- execute the request and return the timelineDto record
print timelineDto
```For the future, a Priority Queue Manager is planned that takes an infinite priority queue to scrape the api for endpoints. But if a user comes with a request, the user request should be fetched as fast as possible. Therefore, the Rate Limits should always be reached, and no user has to wait a long time for their request to be finished.
# Setup
Clone the reposetory
```
git clone https://github.com/Plutokekz/Pure-Riot.git
```
Build all endpoints```
cabal build
```Build only the selected endpoints. Fore example, this command would build the Account and League of Legends endpoints. All available flags can be found in the `pure-riot.cabal`
```
cabal build --flag=league-of-legends --flag=account --flag=-all-endpoints
```# TODO
- [ ] Rate Limiting
- [ ] Add optional rerquest paramters
- [ ] Tests
- [ ] life
- [ ] stubbed
- [ ] release to Hackage
- [ ] Priority Queue Manager