{"id":17006127,"url":"https://github.com/mingweisamuel/camille","last_synced_at":"2025-05-16T04:06:57.477Z","repository":{"id":37412572,"uuid":"115983488","full_name":"MingweiSamuel/Camille","owner":"MingweiSamuel","description":"C# Riot API Library. Thread safe, automatic retries, autogenerated nightly releases.","archived":false,"fork":false,"pushed_at":"2025-05-15T02:13:11.000Z","size":20193,"stargazers_count":104,"open_issues_count":13,"forks_count":8,"subscribers_count":4,"default_branch":"release/3.x.x","last_synced_at":"2025-05-15T03:30:56.004Z","etag":null,"topics":["league-api","league-of-legends","riot-api","riot-games-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MingweiSamuel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.txt","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,"zenodo":null}},"created_at":"2018-01-02T06:39:22.000Z","updated_at":"2025-04-29T03:00:59.000Z","dependencies_parsed_at":"2023-10-11T04:21:49.728Z","dependency_job_id":"f36a0010-3d46-411f-ae9d-4a5bab18f4a0","html_url":"https://github.com/MingweiSamuel/Camille","commit_stats":{"total_commits":265,"total_committers":13,"mean_commits":"20.384615384615383","dds":"0.24905660377358485","last_synced_commit":"a17f385bca4c38e591c7e5c2e14c63fdfe01a056"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MingweiSamuel%2FCamille","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MingweiSamuel%2FCamille/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MingweiSamuel%2FCamille/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MingweiSamuel%2FCamille/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MingweiSamuel","download_url":"https://codeload.github.com/MingweiSamuel/Camille/tar.gz/refs/heads/release/3.x.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464897,"owners_count":22075571,"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":["league-api","league-of-legends","riot-api","riot-games-api"],"created_at":"2024-10-14T05:05:03.186Z","updated_at":"2025-05-16T04:06:52.467Z","avatar_url":"https://github.com/MingweiSamuel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camille\n\n[![Github Actions](https://img.shields.io/github/workflow/status/MingweiSamuel/Camille/CI/release/3.x.x?label=release/3.x.x\u0026logo=github\u0026style=flat-square)](https://github.com/MingweiSamuel/Camille/actions?query=workflow%3ACI+branch%3Arelease%2F3.x.x) [![NuGet Stable](https://img.shields.io/nuget/v/Camille.RiotGames.svg?style=flat-square)](https://www.nuget.org/packages/Camille.RiotGames/) [![NuGet Pre Release](https://img.shields.io/nuget/vpre/Camille.RiotGames.svg?style=flat-square)](https://www.nuget.org/packages/Camille.RiotGames/absoluteLatest) [![API Reference](https://img.shields.io/badge/docfx-Camille-brightgreen.svg?style=flat-square)](http://www.mingweisamuel.com/Camille/)\n\nC# Library for the [Riot Games API](https://developer.riotgames.com/)\n\nCamille's goals are _speed_, _reliability_, and _maintainability_. Camille handles rate limits and large requests with ease.\nData classes are automatically generated from the\n[Riot API Reference](https://developer.riotgames.com/api-methods/) ([Swagger](http://www.mingweisamuel.com/riotapi-schema/tool/)).\n\n## Features\n\n* Fast, asynchronous, thread-safe.\n* Automatically retries failed requests.\n* Automatic up-to-date nightlies, reflecting Riot API changes within 24 hours.\n* Multi-targeted: .NET Standard 1.1+, .NET Framework 4.5+, .NET Core 2.0, .NET Standard 2.1+, .NET Core 3.0+.\n* Highly-configurable.\n* Riot API LOL-V4, TFT, LOR support.\n* C# 8 nullable support.\n\n## Installation\n\n[Install via NuGet](https://www.nuget.org/packages?sortby=created-desc\u0026q=Camille\u0026prerel=True) (`Camille.RiotGames`). \n\nType the following in the package manager console:\n\n    Install-Package Camille.RiotGames -IncludePrerelease\n    \nOr use the .NET CLI:\n\n    dotnet add package Camille.RiotGames --prerelease\n\n## Usage\n\nAll API interactions are done using a `RiotApi` instance.\n`RiotApi.NewInstance` takes either just an API key (for default settings) or a `IRiotApiConfig` instance (for custom settings).\n\n```c#\nusing Camille.Enums;\nusing Camille.RiotGames;\n```\n\n```c#\nvar riotApi = RiotGamesApi.NewInstance(\"RGAPI-12345678-abcd-1234-abcd-123456abcdef\");\n// OR\nvar riotApi = RiotGamesApi.NewInstance(\n    new RiotGamesApiConfig.Builder(\"RGAPI-12345678-abcd-1234-abcd-123456abcdef\")\n    {\n        MaxConcurrentRequests = 200,\n        Retries = 10,\n        // ...\n    }.Build()\n);\n```\nYou can find all configuration options [here](https://github.com/MingweiSamuel/Camille/blob/gh-pages/v/3.x.x/_gen/Camille.RiotGames/RiotGamesApiConfig.cs).\n\nAPI methods are divided up into respective endpoints, corresponding to the left bar of the [API reference](https://developer.riotgames.com/api-methods/).\n\n### Example\n\n#### Print Summoner's Top Champions\n\n```c#\n// Get summoners by name synchronously. (Note: async is faster as it allows simultaneous requests).\nvar summoners = new[]\n{\n    riotApi.SummonerV4().GetBySummonerName(PlatformRoute.NA1, \"jAnna kendrick\"),\n    riotApi.SummonerV4().GetBySummonerName(PlatformRoute.NA1, \"lug nuts k\")\n};\n\nforeach (var summoner in summoners)\n{\n    Console.WriteLine($\"{summoner.Name}'s Top 10 Champs:\");\n\n    var masteries =\n        riotApi.ChampionMasteryV4().GetAllChampionMasteriesByPUUID(PlatformRoute.NA1, summoner.Puuid);\n\n    for (var i = 0; i \u003c 10; i++)\n    {\n        var mastery = masteries[i];\n        // Get champion for this mastery.\n        var champ = (Champion) mastery.ChampionId;\n        // print i, champ id, champ mastery points, and champ level\n        Console.WriteLine(\"{0,3}) {1,-16} {2,10:N0} ({3})\", i + 1, champ.ToString(),\n            mastery.ChampionPoints, mastery.ChampionLevel);\n    }\n    Console.WriteLine();\n}\n```\n\nOutput (2022-01-17):\n```\nJanna Kendrick's Top 10 Champs:\n  1) EKKO              1,803,701 (7)\n  2) PYKE                266,410 (7)\n  3) SYLAS               193,439 (7)\n  4) MASTERYI            134,140 (7)\n  5) MORDEKAISER         127,937 (7)\n  6) YASUO                93,904 (7)\n  7) VIEGO                88,267 (7)\n  8) AHRI                 82,106 (7)\n  9) JINX                 76,788 (6)\n 10) POPPY                74,982 (7)\n    \nLugnutsK's Top 10 Champs:\n  1) ZYRA                841,132 (7)\n  2) SORAKA               81,793 (6)\n  3) MORGANA              62,917 (5)\n  4) SONA                 55,073 (6)\n  5) NAMI                 49,917 (6)\n  6) JANNA                46,563 (5)\n  7) BRAND                46,401 (5)\n  8) TARIC                41,302 (6)\n  9) EKKO                 40,245 (5)\n 10) POPPY                33,859 (5)\n ```\n\n \u003c!--\n #### Print Summoner Ranked Match History\n\n This example takes advantage of C#'s `async`/`await` tasks to fetch 10 matches all at once.\n\n ```c#\nvar summonerNameQuery = \"lugnutsk\";\n\n// Get summoners data (blocking).\nvar summonerData = await riotApi.SummonerV4().GetBySummonerNameAsync(Region.NA, summonerNameQuery);\nif (null == summonerData)\n{\n    // If a summoner is not found, the response will be null.\n    Console.WriteLine($\"Summoner '{summonerNameQuery}' not found.\");\n    return;\n}\n\nConsole.WriteLine($\"Match history for {summonerData.Name}:\");\n\n// Get 10 most recent matches (blocking).\n// Queue ID 420 is RANKED_SOLO_5v5 (TODO)\nvar matchlist = await riotApi.MatchV4().GetMatchlistAsync(\n    Region.NA, summonerData.AccountId, queue: new[] { 420 }, endIndex: 10);\n// Get match results (done asynchronously -\u003e not blocking -\u003e fast).\nvar matchDataTasks = matchlist.Matches.Select(\n        matchMetadata =\u003e riotApi.MatchV4().GetMatchAsync(Region.NA, matchMetadata.GameId)\n    ).ToArray();\n// Wait for all task requests to complete asynchronously.\nvar matchDatas = await Task.WhenAll(matchDataTasks);\n\nfor (var i = 0; i \u003c matchDatas.Count(); i++)\n{\n    var matchData = matchDatas[i];\n    // Get this summoner's participant ID info.\n    var participantIdData = matchData.ParticipantIdentities\n        .First(pi =\u003e summonerData.Id.Equals(pi.Player.SummonerId));\n    // Find the corresponding participant.\n    var participant = matchData.Participants\n        .First(p =\u003e p.ParticipantId == participantIdData.ParticipantId);\n\n    var win = participant.Stats.Win;\n    var champ = (Champion) participant.ChampionId;\n    var k = participant.Stats.Kills;\n    var d = participant.Stats.Deaths;\n    var a = participant.Stats.Assists;\n    var kda = (k + a) / (float) d;\n\n    // Print #, win/loss, champion.\n    Console.WriteLine(\"{0,3}) {1,-4} ({2})\", i + 1, win ? \"Win\" : \"Loss\", champ.Name());\n    // Print champion, K/D/A\n    Console.WriteLine(\"     K/D/A {0}/{1}/{2} ({3:0.00})\", k, d, a, kda);\n}\n```\n\nOutput (2019-02-19):\n```\nMatch history for LugnutsK:\n  1) Win  (Zyra)\n     K/D/A 2/3/11 (4.33)\n  2) Win  (Zyra)\n     K/D/A 5/1/13 (18.00)\n  3) Loss (Zyra)\n     K/D/A 2/5/1 (0.60)\n  4) Win  (Sona)\n     K/D/A 1/13/23 (1.85)\n  5) Win  (Zyra)\n     K/D/A 3/1/5 (8.00)\n  6) Win  (Zyra)\n     K/D/A 6/3/16 (7.33)\n  7) Win  (Zyra)\n     K/D/A 2/4/7 (2.25)\n  8) Loss (Zyra)\n     K/D/A 1/10/8 (0.90)\n  9) Loss (Zyra)\n     K/D/A 0/11/5 (0.45)\n 10) Win  (Zyra)\n     K/D/A 4/5/15 (3.80)\n```\n--\u003e\n\n### API Reference\n\n[Automatically generated API Reference](http://www.mingweisamuel.com/Camille/)\n\n## Source Code\n\nProjects are located in [`src/`](https://github.com/MingweiSamuel/Camille/tree/release/3.x.x/src).\n\n### Generated Classes\n\nThe majority of the code in Camille is automatically generated. The generated sources are not commited to\nthe master branch, but can be viewed [in the `gh-pages` branch](https://github.com/MingweiSamuel/Camille/tree/gh-pages/v/3.x.x/_gen)\nor when building locally.\n\nThe actual code for generating these classes is in the\n[`srcgen` folder](https://github.com/MingweiSamuel/Camille/tree/release/3.x.x/srcgen).\nThe C#-generating code is in `*.cs.dt` files and is written in NodeJS, using\n[doT.js templates](https://olado.github.io/doT/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingweisamuel%2Fcamille","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingweisamuel%2Fcamille","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingweisamuel%2Fcamille/lists"}