{"id":19028608,"url":"https://github.com/petersil1998/fade","last_synced_at":"2025-02-21T19:44:09.346Z","repository":{"id":180624215,"uuid":"665436917","full_name":"Petersil1998/Fade","owner":"Petersil1998","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-22T00:24:23.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T03:25:19.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-07-12T07:48:28.000Z","updated_at":"2023-07-12T07:53:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c84acce3-aff3-4c7d-854f-8bde7b3b85de","html_url":"https://github.com/Petersil1998/Fade","commit_stats":null,"previous_names":["petersil1998/fade"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FFade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FFade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FFade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petersil1998%2FFade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Petersil1998","download_url":"https://codeload.github.com/Petersil1998/Fade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240079621,"owners_count":19744721,"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":[],"created_at":"2024-11-08T21:11:41.990Z","updated_at":"2025-02-21T19:44:09.328Z","avatar_url":"https://github.com/Petersil1998.png","language":"Java","readme":"# Fade\n\nFade is an Object-Oriented Java Library, which takes over the Communication with the Valorant API. It supports In-Memory caching and uses a (blocking) Rate Limiter. It makes retrieving Match History, Leaderboards\nand static Data like Weapons, Maps, Player cards, etc. much easier.\n\nOther Projects:\n- [Thresh](https://github.com/Petersil1998/Thresh) for League of Legends\n- [Spatula](https://github.com/Petersil1998/Spatula) for Teamfight Tactics\n- [Scuttlegeist](https://github.com/Petersil1998/Scuttlegeist) for Legends of Runeterra\n\n## Usage\n\nIn Order for Fade 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        // NOTE: Not all Languages are supported. A list of supported Languages is available at https://dash.valorant-api.com\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 Valorant Data\n        Loader.addLoader(new ValLoader());\n        // Lastly we need to initialize the static Data\n        Loader.init();\n    }\n}\n```\n\nNow Fade is ready and set up!\n\n## Examples\n\n- **Leaderboards**\n\n    ```JAVA\n    public class Example {\n        public static void main(String[] args) {\n            // Setup code...\n            \n            // First we get the Act ID of an act in a specific Episode.\n            // In this example we get Act 1 of Episode 2\n            String actId = Seasons.getEpisodeAct(2, 1).getId();\n            // Now we can get the Leaderboard for a specific Region\n            Leaderboard leaderboard = ValRanked.getLeaderboard(ValRegion.EU, actId);\n            // We can get the total amount of Players in this Leaderboard\n            int totalPlayer = leaderboard.getTotalPlayers();\n            // We can also Iterate over the Players\n            for(RankEntry player: leaderboard.getPlayers()) {\n                // Get the Players rank\n                int rank = player.getLeaderboardRank();\n                // Get the Players Name\n                String name = player.getName();\n                // Get the Players Ranked Rating (LP)\n                int rr = player.getRankedRating();\n            }\n        }\n    } \n    ```\n    Optionally we can pass a **Filter** Argument to the Leaderboard, which can have the following values:\n\n  | Key        | Description                                                                                                                                                                                                    | Type |\n  |------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|\n  | size       | Number of Rank Entries (Players) returned. Has to be between 1 and 200, defaults to 200.                                                                                                                       | int  | \n  | startIndex | The Start Index (Offset) for the Rank Entries (Players). Defaults to 0.                                                                                                                                        | int  |\n\n  **Note**: *All values need to be passed as **Strings** in the filter*\n\n\n- **Match Details**\n\n    ```JAVA\n    public class Example { \n        public static void main(String[] args) {\n            // Setup code...\n            \n            // First we get the Player's Account\n            Account me = Account.getAccountByRiotId(\"Destroyer\", \"boom\", Region.EUROPE);\n            // Now we can get the Player's Match History\n            List\u003cMatchDetails\u003e matchHistory = MatchDetails.getMatchHistory(me.getPuuid(), ValRegion.EU);\n            // Or we can also get a List of Recent Matches in a specific Queue\n            List\u003cMatchDetails\u003e recentMatches = MatchDetails.getRecentMatches(QueueType.COMPETITIVE, ValRegion.NA);\n\n            // Now we can iterate over the Match Details\n            for(MatchDetails details: matchHistory) {\n                // This allows us to get game-specific information like Map played, the Season in which the game was played or the start time\n                Map map = details.getMap();\n                Season season = details.getSeason();\n                long startTime = details.getGameStartMillis();\n                // But we can also get Information about the Players\n                List\u003cPlayer\u003e players = details.getPlayers();\n\n                for (Player player: players) {\n                    // Now we can get Player-specific Data like Agent, Player Card and Title\n                   Agent agent = player.getAgent();\n                    PlayerCard card = player.getPlayerCard();\n                    PlayerTitle title = player.getPlayerTitle();\n\n                    // It also provides additional Data like kill, deaths, assists\n                    Player.Stats stats = player.getStats();\n                    int kills = stats.getKills();\n                    int deaths = stats.getDeaths();\n                    int assists = stats.getAssists();\n                }\n\n                // We can also get data about each Round in the Game\n                List\u003cRoundResult\u003e roundResults = details.getRoundResults();\n                for (RoundResult roundResult: roundResults) {\n                    int round = roundResult.getRoundNum();\n                    Player planter = roundResult.getBombPlanter();\n                    Team team = roundResult.getWinningTeam();\n                }\n            }\n        }\n    } \n    ```\n\n- **Collections**\n\n    The package [collection](https://github.com/Petersil1998/Fade/blob/master/src/main/java/net/petersil98/fade/collection/) contains a bunch of Collections for static Data including:\n  \n    - Agents\n    - Bundles\n    - Competitive Tiers\n    - Contracts\n    - Events\n    - Maps\n    - Player Cards and Titles\n    - Seasons\n    - Sprays\n    - Weapons\n    - ...\n\n### Feel free to give Feedback and add suggestions on how this library can be improved. \u003cbr\u003eThank you for using Fade, you're awesome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersil1998%2Ffade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetersil1998%2Ffade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersil1998%2Ffade/lists"}