{"id":15783286,"url":"https://github.com/msx752/riotapicaller","last_synced_at":"2025-03-31T16:48:50.843Z","repository":{"id":85355463,"uuid":"62205712","full_name":"msx752/RiotApiCaller","owner":"msx752","description":" [RiotCaller] League Of Legends API C# Portable Library- with different way","archived":false,"fork":false,"pushed_at":"2016-08-21T01:07:19.000Z","size":1485,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T13:11:18.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msx752.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-06-29T07:35:02.000Z","updated_at":"2016-11-16T14:20:17.000Z","dependencies_parsed_at":"2023-03-03T06:00:38.501Z","dependency_job_id":null,"html_url":"https://github.com/msx752/RiotApiCaller","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FRiotApiCaller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FRiotApiCaller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FRiotApiCaller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FRiotApiCaller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msx752","download_url":"https://codeload.github.com/msx752/RiotApiCaller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246500354,"owners_count":20787678,"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-10-04T19:41:03.541Z","updated_at":"2025-03-31T16:48:50.823Z","avatar_url":"https://github.com/msx752.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![NuGet](https://img.shields.io/nuget/v/RiotCaller.svg?maxAge=259200)](https://www.nuget.org/packages/RiotCaller)\n[![nuget](https://img.shields.io/badge/Nuget-RiotCaller-brightgreen.svg?maxAge=259200)](https://www.nuget.org/packages/RiotCaller)\n[![license](https://img.shields.io/github/license/msalih1/riotapicaller.svg?maxAge=259200)](https://github.com/MSAlih1/RiotApiCaller/blob/master/LICENSE)\n\n# RiotCaller\n\nProject for [Riot Games](https://developer.riotgames.com) API (League Of Legends game)\n\n  - generic class and method were used\n  - Ninject InSingletonScope was used\n  - Repository Pattern included (half)\n  - there is RiotCaller.Tests also there is ExampleProject in solution\n\n## Usage\n\n### defining riotgames api key \n```c#\n\t\tApiService.ApiKey=\"RiotGames API Key\" //for service\n```\nor\n```c#\n\t\tApiService svc = new ApiService(\"[Riot API Key here]\"); //classic defining\n\t\tRanked data = svc.Api.GetStatsRanked(\"[summonerId]\", \"[region]\");\n```\n\n### using with Ninject\n```c#\n\t..\n\t\tkernel.Bind\u003cApiService\u003e().ToSelf().InSingletonScope().WithConstructorArgument(\"[Riot API Key here]\");\n\t..\n```\n\n## Examples\n\n##### GetSummoner TYPE 1:\n```c#\n            \tvar summoner1 = LolApi.Api.GetSummoner(\"[summonerName]\", [region]);\n```\n\n##### GetSummoner TYPE 2:\n\n\n```c#\n\t\t//you can use this method in your solution wherever you want\n       \t\tvar summoner2 = new RiotApiCaller\u003cSummoner\u003e(suffix.summonerByname);\n     \t\tsummoner2.AddParam(param.summonerNames, new List\u003cstring\u003e() { \"[summonerName]\" });\n            \tsummoner2.AddParam(param.region, \"[region]\");\n            \tsummoner2.CreateRequest();\n```\n\n##### GetStatsRanked TYPE 1:\n```c#\n        \t var ranked1 = LolApi.Api.GetStatsRanked(\"[summonerId]\", \"[region]\");\n```\n##### GetStatsRanked TYPE 2:\n```c#\n\t\t//you can use this method in your solution wherever you want\n            \tvar ranked2 = new RiotApiCaller\u003cRanked\u003e(suffix.statsRanked);\n            \tranked2.AddParam(param.summonerId, \"[summonerId]\");\n            \tranked2.AddParam(param.region, \"[region]\");\n            \tranked2.AddParam(param.season, \"[season]\");\n            \tranked2.CreateRequest();\n```\n##### GetStatsRanked TYPE 3:\n```c#\n            \tvar ranked3 = summoner1.GetStatsRanked();\n```\n##### GetStatsRanked TYPE 4:\n```c#\n            \tSummoner summoner1 = LolApi.Api.GetSummoner(\"[summonerName]\", \"[region]\");\n            \tvar ranked4 =  SummonerExtensions.GetStatsRanked(summoner1);\n ```       \n         \t OR \n ```c#\n            \tvar ranked4 =  SummonerExtensions.GetStatsRanked(new Summoner() { Id = \"[summonerId]\" });\n```\n\n## Coding Introduce\n\u003e ##### Type:Enum suffix\n\u003ethis struct helps for creating api url\n\u003eif you add new api method you must add new suffix\n\n\u003e ###### it has three attributes\n\n\u003e  - ApiType Attribute \n        \n        -  (defining this apiurl is static OR is non-static, routing API SERVER URL)\n\u003e  - apiVer Attribute \n        \n        -  (sometimes we need two keys, EXAMPLE: ( 'by-summoner/{summonerIds}' AND 'by-summoner/{summonerIds}/entry' )\n        AND both of them use GetSummoner() ,so apiVer reference to BASE API URL like 'Summoner'\n\u003e  - Value Attribute \n\n        - this attribute separates and contains (suffix url) for each API\n\n\u003e ##### Type:Enum param\n\u003ethis struct helps replace to suffix url parameters\n\u003eif you add new suffix, you must add its parameter to param enum (if it has not already)\n\u003eExample: add new suffix name TEST with value, non-static, base api is league\n\n```c#\n        [ApiType(apiType.nonStatic)]\n        [apiVer(apiVer.league)]\n        [Value(\"by-summoner/{LeagueName}/entry?api_key={api_key}\")]\n        TEST\n```\n\u003eits parameter {LeagueName} if it has not in param which helps replace to suffix, you must add new value to param, like this 'LeagueName'\n\n## Use Of Caching\nevery ApiEndPoints can use memorycaching. (default value:FALSE)\n```c#\n            ApiService svc = new ApiService();\n            Summoner data = svc.Api.GetSummoner(\"[summonerId]\", \"[region]\", true); // TRUE: method is caching\n            Ranked data = svc.Api.GetStatsRanked(\"[summonerId]\", \"[region]\", null, true); //caching\n            Champions data = svc.staticApi.GetChampions(\"[region]\", \"[language]\", champData.all, true);//caching\n```\n\n\n## Libraries used\n-.NET MVC and dependency injection (not  finished also half)\n- [Ninject](https://github.com/ninject/Ninject)\n- [MemoryCache](http://www.adamriddick.com/memorycache-memory-storage)\n- [Json.NET](https://github.com/JamesNK/Newtonsoft.Json)\n\n\n## Development\nif you have good idea, you can create pull request\n\n\n## License\nThis project is licensed under the [MIT license](LICENSE).\n\n## Disclaimer\nRiotCaller is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games , Inc. League of Legends © Riot Games, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsx752%2Friotapicaller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsx752%2Friotapicaller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsx752%2Friotapicaller/lists"}