{"id":19028604,"url":"https://github.com/petersil1998/spatula","last_synced_at":"2026-05-19T03:20:37.906Z","repository":{"id":176905070,"uuid":"659587428","full_name":"Petersil1998/Spatula","owner":"Petersil1998","description":"Object-Oriented Java Wrapper for Riot's Teamfight Tactics API ","archived":false,"fork":false,"pushed_at":"2023-10-01T14:10:48.000Z","size":354,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T19:45:10.704Z","etag":null,"topics":["api","cdragon","ddragon","gradle","java-17","library","teamfight-tactics","wrapper-library"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Petersil1998.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-28T06:40:40.000Z","updated_at":"2024-08-10T08:49:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"aeea6fcc-8ff6-44d6-bd23-8dd60115e4db","html_url":"https://github.com/Petersil1998/Spatula","commit_stats":null,"previous_names":["petersil1998/spatula"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Petersil1998/Spatula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FSpatula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FSpatula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FSpatula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FSpatula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Petersil1998","download_url":"https://codeload.github.com/Petersil1998/Spatula/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FSpatula/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265080042,"owners_count":23708103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cdragon","ddragon","gradle","java-17","library","teamfight-tactics","wrapper-library"],"created_at":"2024-11-08T21:11:41.507Z","updated_at":"2026-05-19T03:20:37.880Z","avatar_url":"https://github.com/Petersil1998.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spatula\n\nSpatula is an Object-Oriented Java Library, which takes over the Communication with the Teamfights Tactics API. It supports In-Memory caching and uses a (blocking) Rate Limiter. It makes retrieving Summoner Data, Match History,\netc. much easier.\n\nOther Projects:\n- [Thresh](https://github.com/Petersil1998/Thresh) for League of Legends\n- [Scuttlegeist](https://github.com/Petersil1998/Scuttlegeist) for Legends of Runeterra\n- [Fade](https://github.com/Petersil1998/Fade) for Valorant\n\n## Usage\n\nSpatula can be included like this using **Gradle**:\n\n```groovy\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n\ndependencies {\n    ...\n    implementation 'com.github.Petersil1998:Core:v1.4'\n    implementation 'com.github.Petersil1998:STCommons:v1.4'\n    implementation 'com.github.Petersil1998:Spatula:v1.2'\n}\n```\n\nor using **Maven**:\n\n```XML\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Petersil1998\u003c/groupId\u003e\n    \u003cartifactId\u003eCore\u003c/artifactId\u003e\n    \u003cversion\u003ev1.4\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Petersil1998\u003c/groupId\u003e\n    \u003cartifactId\u003eSTCommons\u003c/artifactId\u003e\n    \u003cversion\u003ev1.4\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Petersil1998\u003c/groupId\u003e\n    \u003cartifactId\u003eSpatula\u003c/artifactId\u003e\n    \u003cversion\u003ev1.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Setup\n\nIn Order for Spatula to work properly there are a few things you need to set up\nat the beginning of your application.\n\n```JAVA\npublic class Example {\n    public static void main(String[] args) {\n        // First we need to provide our Riot API Key. Ideally the API Key is encrypted\n        Settings.setAPIKey(() -\u003e EncryptionUtil.encrypt(System.getenv(\"API_KEY\")));\n        // If the provided API Key is encrypted, we need to provide a function to decrypt the API Key\n        Settings.setDecryptor(EncryptionUtil::decrypt);\n        // We also need to provide a language. The language is used to static Data like Champions, Item, etc.\n        Settings.setLanguage(Language.EN_US);\n        // If we want to use caching we can enable it in the Settings. Caching is disabled by default\n        Settings.useCache(true);\n        // We also need to add the Loader for the static TfT Data\n        Loader.addLoader(new TfTLoader());\n        // Lastly we need to initialize the static Data\n        Loader.init();\n    }\n}\n```\n\nNow Spatula is ready and set up!\n\n## Examples\n\n- **Summoner and Account Data**\n\n    ```JAVA\n    public class Example {\n        public static void main(String[] args) {\n            // Setup code...\n            \n            Summoner faker = Summoner.getSummonerByName(\"Faker\", LeaguePlatform.KR);\n            int summonerLevel = faker.getSummonerLevel();\n            // Get the URL for the profile Icon\n            String profileIconURL = Util.getProfileIconURL(faker.getProfileIcon());\n            // Get Account\n            Account account = Account.getAccountByPuuid(faker.getPuuid(), LeagueRegion.ASIA);\n            // Get the Tag (e.g. Faker#KR1)\n            String tag = account.toString();\n        }\n    } \n    ```\n\n- **Rank and Leagues**\n\n    ```JAVA\n    public class Example {\n        public static void main(String[] args) {\n            // Setup code...\n            \n            Summoner faker = Summoner.getSummonerByName(\"Faker\", LeaguePlatform.KR);\n            // Get TfT, Double Up and Hyper Roll Ranks\n            PlayerRanks ranked = TfTRanked.getTfTRanksOfSummoner(faker.getId(), LeaguePlatform.KR);\n            RankEntry tft = ranked.getRankTft();\n            int lp = tft.getLeaguePoints();\n            RankEntry doubleUp = ranked.getRankDoubleUp();\n            HyperRollEntry hyperRoll = ranked.getRankHyperRoll();\n\n            // Get Challenger TfT Players\n            League challengers = TfTRanked.getChallengerLeague(LeaguePlatform.EUW);\n            for(LeagueEntry leagueEntry: challengers.getEntries()) {\n                // Get all players and their LP\n                Summoner player = Summoner.getSummonerByID(leagueEntry.getSummonerId(), LeaguePlatform.EUW);\n                int playerLp = leagueEntry.getLeaguePoints();\n            }\n\n            // Get a list of Gold 1 TfT Players\n            List\u003cRankEntry\u003e firstPage = TfTRanked.getTftRankEntries(RankedDivision.I, RankedTier.GOLD, LeaguePlatform.NA);\n            List\u003cRankEntry\u003e secondPage = TfTRanked.getTftRankEntries(RankedDivision.I, RankedTier.GOLD, LeaguePlatform.NA, 2);\n        }\n    } \n    ```\n\n- **Match History**\n\n    ```JAVA\n    public class Example {\n        public static void main(String[] args) {\n            // Setup code...\n            \n            Summoner faker = Summoner.getSummonerByName(\"Faker\", LeaguePlatform.NA);\n            // Get the Player's Match History. The Seconds Parameter is a Filter.\n            List\u003cMatchDetails\u003e matchHistory = MatchDetails.getMatchHistory(faker.getId(), LeagueRegion.ASIA, Map.of());\n            MatchDetails latestGame = matchHistory.get(0);\n            int duration = latestGame.getGameLength();\n            // Get Set Number\n            int setNumber = latestGame.getTftSetNumber();\n            // Get all the Players\n            List\u003cParticipant\u003e participants = latestGame.getParticipants();\n            for(Participant p: participants) {\n                // Get the Companion used by the Player\n                Companion companion = p.getCompanion();\n                // Get the in-game Level at the end of the game\n                int level = p.getLevel();\n                // Get Number of Players eliminated\n                int playersEliminated = p.getPlayerEliminated();\n                // Get Units and Traits\n                List\u003cParticipant.UnitData\u003e units = p.getUnits();\n                List\u003cParticipant.TraitData\u003e traits = p.getTraits();\n            }\n        } \n    } \n    ```\n  The Match History Filter can have the following values:\n\n  | Key       | Description                                                                                                                                                        | Type   |\n  |-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|\n  | startTime | Unix Timestamp in seconds. Only start Times after June 16th 2021 will have an effect. [More](https://developer.riotgames.com/apis#match-v5/GET_getMatchIdsByPUUID) | long   | \n  | endTime   | Unix Timestamp in seconds.                                                                                                                                         | long   |\n  | start     | The offset of the first Match entry                                                                                                                                | int    |\n  | count     | The Amount of Matches entries to return. Has to be between positive.                                                                                               | int    |\n\n  **Note**: *All values need to be passed as **Strings** in the filter*\n\n\n- **Collections**\n\n    The package [collection](https://github.com/Petersil1998/Spatula/blob/main/src/main/java/net/petersil98/spatula/collection/) contains a bunch of Collections for static Data including:\n  \n    - Augments\n    - Items\n    - Tacticians\n    - Traits\n    - Units\n    - QueueTypes\n\n### Feel free to give Feedback and add suggestions on how this library can be improved. \u003cbr\u003eThank you for using Spatula, you're awesome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersil1998%2Fspatula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetersil1998%2Fspatula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersil1998%2Fspatula/lists"}