Skip to content

simple-works/riot-games-api-csharp

Repository files navigation

Riot Games API C#

Incomplete C# 4.0 .NET Framework 4.0 Plarform Windows

Simple C# Library with a GUI console to access Riot Games API.

screenshot screenshot2

🚀 Development

The source is written in C# 4.0 with .NET Framework 4.0 and WinForms using Visual Studio 2010.

🎨 Structure :

  • 📂 RiotGamesAPI:
    • 📄 ApiConnection: Setups a connection to the API.
    • 📄 ApiMethod: Abstract class for using an API method.
    • 📄 Utilities: Usefull methodes for dealing with some types of data used.
    • 📁 API: Classes for using all api available API methods.
    • 📁 DTO: Classes for holding all kinds of JSON data objects returned by the API methods.

📝 How to use ?

Learn by a simpe example: Getting a summoner informations.
To get summoner data, we use the SummonerV3 API.

  1. Setup a connection to the API using your API Key and choosing a region :
string apiKey = "RGAPI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
ApiConnection apiConnection = new apiConnection(apiKey, ApiConnection.RegionCode.euw1);
  1. Setup an instance of SummonerV3 using the created connection :
SummonerV3 summonerApi = new SummonerV3(apiConnection);
  1. Use the SummonerV3 API method GetSummonerBySummonerName to get a SummonerDTO object containing the retrieved data :
SummonerDTO summonerData = summonerApi.GetSummonerBySummonerName(summonerName);
  1. The retrieved summoner data can now be used through the SummonerDTO object :
string message = "The level of this summoner is " + summonerData.SummonerLevel;
  1. GG IZI 😄

📄 License

This project is licensed under the Apache License 2.0.

This project uses:

Disclaimer: This project is not endorsed by Riot Games and doesn't 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.