.NET 4.5, an internet connection
Include the DLLs in the "ChallongeCSharpDriver/Library" folder in your project, and start using the library !
Please note it is using .NET 4.5 async/await functionality. You should document yourself a minimum on this before trying to use this library
- Include
- using ChallongeCSharpDriver.Caller;
- using ChallongeCSharpDriver.Main;
- Create a new ChallongeConfig with your own configuration.
- Pass the config to a new ChallongeAPICaller
- Pass the Caller to a new Tournaments
You can now "navigate" through all the different available objects with convenient calls.
For example,
List<StartedTournament> tournamentList = await tournaments.getStartedTournaments();
should get you a list of all the started tournaments available from your API_KEY
Or you could just get one by calling
StartedTournament tournament = await tournaments.getTournament(ID);
Note that using Interfaces available directly in the Main package is strongly recommended for convenience.
Use objects directly from the core.
Create queries from Core.Queries, and invoke the "call" method using the caller.
For example,
List matches = await new TournamentMatchesQuery(TOURNAMENTID) { matchState = MatchState.Open }.call(caller);
lists all Open matches in the specified tournament. It returns plain objects that can be modified in every ways.
Use the caller directly.
For example,
TournamentQueryResult tournamentQueryResult = caller.GET<TournamentQueryResult>("tournaments/ID", parameters)
should get the information and fill TournamentQueryResult, which is a container that can fulfill the API response
Create a file named "challongeCSharpDriver.config" in your "My Documents" folder, and put your Challonge api key like this :
api_key=INSERT_YOUR_API_KEY_HERE
You can then mess with the simple Windows Forms there to try out some functions quickly.
Just suggest it to me.
That's even better !