lolesports-js-sdk
v1.0.0
Published
Javascript sdk for the unofficial lolesports api (July 2021) generated using codegen.
Downloads
2
Readme
lolesports-js-sdk
LolesportsApi - JavaScript client for lolesports_api Unofficial documentation to the lolesports Api This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0-alpha-1
- Package version: 1.0.0-alpha-1
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install lolesports_api --save
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var LolesportsApi = require('lolesports-js-sdk');
var defaultClient = LolesportsApi.ApiClient.instance;
defaultClient.basePath = "https://esports-api.lolesports.com/persisted/gw";
defaultClient.authentications['apiKeyAuth']['apiKey'] = "0TvQnueqKa5mxJntVWt0w4LpLfEkrV1Ta8rQBb9Z";
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}
};
var api = new LolesportsApi.LeaguesApi();
api.getStandings(LolesportsApi.Locale.enUS, { tournamentId: ["105658534671026792"] }, callback);
Documentation for API Endpoints
All URIs are relative to /
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- LolesportsApi.EventsApi | getCompletedEvents | GET /getCompletedEvents | LolesportsApi.EventsApi | getEventDetails | GET /getEventDetails | LolesportsApi.EventsApi | getGames | GET /getGames | LolesportsApi.EventsApi | getLive | GET /getLive | LolesportsApi.EventsApi | getSchedule | GET /getSchedule | LolesportsApi.HighlanderApi | highlanderTournaments | GET /highlanderTournaments | LolesportsApi.HighlanderApi | leagues | GET /leagues | LolesportsApi.HighlanderApi | navItems | GET /navItems | LolesportsApi.HighlanderApi | players | GET /players | LolesportsApi.HighlanderApi | scheduleItems | GET /scheduleItems | LolesportsApi.HighlanderApi | teams | GET /teams | LolesportsApi.HighlanderApi | videos | GET /videos | LolesportsApi.LeaguesApi | getLeagues | GET /getLeagues | LolesportsApi.LeaguesApi | getStandings | GET /getStandings | LolesportsApi.LeaguesApi | getTournamentsForLeague | GET /getTournamentsForLeague | LolesportsApi.MatchDetailsApi | getDetails | GET /details/{gameId} | LolesportsApi.MatchDetailsApi | getWindow | GET /window/{gameId} | LolesportsApi.TeamsApi | getTeams | GET /getTeams |
Documentation for Models
- LolesportsApi.Abilities
- LolesportsApi.AllOfhighlanderGameInputItems
- LolesportsApi.AllOfhighlanderMatchInputItems
- LolesportsApi.AllOfhighlanderPlayerForeignIds
- LolesportsApi.AllOfinlineResponse20014PlayersItems
- LolesportsApi.AllOfinlineResponse20015PlayersItems
- LolesportsApi.AllOfinlineResponse2001DataScheduleEventsItems
- LolesportsApi.AllOfinlineResponse2002DataScheduleEventsItems
- LolesportsApi.AllOfinlineResponse2005DataScheduleEventsItems
- LolesportsApi.AllOfinlineResponse2006DataEvent
- LolesportsApi.AllOfinlineResponse200DataLeaguesItems
- LolesportsApi.AllOfnavItemParentNavItem
- LolesportsApi.AllOfrankingTeamsItems
- LolesportsApi.AllOfsectionMatchesItems
- LolesportsApi.AllOfsimpleEventMatch
- LolesportsApi.BaseEvent
- LolesportsApi.BaseFrame
- LolesportsApi.BaseLeague
- LolesportsApi.BaseMatch
- LolesportsApi.BaseParticipantStats
- LolesportsApi.BaseScheduleItem
- LolesportsApi.BaseStrategy
- LolesportsApi.BracketType
- LolesportsApi.BracketTypeOptions
- LolesportsApi.Brackets
- LolesportsApi.Breakpoints
- LolesportsApi.CustomTeam
- LolesportsApi.DetailsFrame
- LolesportsApi.EventScheduleItem
- LolesportsApi.EventType
- LolesportsApi.ExtendedEvent
- LolesportsApi.ExtendedGame
- LolesportsApi.ExtendedLeague
- LolesportsApi.ExtendedParticipantStats
- LolesportsApi.ExtendedTeam
- LolesportsApi.ExtendedVod
- LolesportsApi.ForeignIds
- LolesportsApi.Game
- LolesportsApi.GameId
- LolesportsApi.GameMetadata
- LolesportsApi.GameMode
- LolesportsApi.HighlanderGame
- LolesportsApi.HighlanderLeague
- LolesportsApi.HighlanderMatch
- LolesportsApi.HighlanderPlayer
- LolesportsApi.HighlanderPlayerChampions
- LolesportsApi.HighlanderPlayers
- LolesportsApi.HighlanderRecord
- LolesportsApi.HighlanderRecords
- LolesportsApi.HighlanderResult
- LolesportsApi.HighlanderTeam
- LolesportsApi.HighlanderTeams
- LolesportsApi.HighlanderTournament
- LolesportsApi.HighlanderTournamentRosters
- LolesportsApi.HighlanderTournaments
- LolesportsApi.HomeLeague
- LolesportsApi.InlineResponse200
- LolesportsApi.InlineResponse2001
- LolesportsApi.InlineResponse20010
- LolesportsApi.InlineResponse20011
- LolesportsApi.InlineResponse20012
- LolesportsApi.InlineResponse20013
- LolesportsApi.InlineResponse20014
- LolesportsApi.InlineResponse20014AverageDamageByPosition
- LolesportsApi.InlineResponse20014TeamRosterStats
- LolesportsApi.InlineResponse20014TeamStatsHistories
- LolesportsApi.InlineResponse20014TeamStatsSummaries
- LolesportsApi.InlineResponse20015
- LolesportsApi.InlineResponse20015Mostplayedchampions
- LolesportsApi.InlineResponse20015PlayerStatsHistories
- LolesportsApi.InlineResponse20015PlayerStatsSummaries
- LolesportsApi.InlineResponse2001Data
- LolesportsApi.InlineResponse2001DataSchedule
- LolesportsApi.InlineResponse2001DataSchedulePages
- LolesportsApi.InlineResponse2002
- LolesportsApi.InlineResponse2002Data
- LolesportsApi.InlineResponse2002DataSchedule
- LolesportsApi.InlineResponse2003
- LolesportsApi.InlineResponse2003Data
- LolesportsApi.InlineResponse2003DataLeagues
- LolesportsApi.InlineResponse2004
- LolesportsApi.InlineResponse2004Data
- LolesportsApi.InlineResponse2004DataStandings
- LolesportsApi.InlineResponse2005
- LolesportsApi.InlineResponse2005Data
- LolesportsApi.InlineResponse2005DataSchedule
- LolesportsApi.InlineResponse2006
- LolesportsApi.InlineResponse2006Data
- LolesportsApi.InlineResponse2007
- LolesportsApi.InlineResponse2007Data
- LolesportsApi.InlineResponse2008
- LolesportsApi.InlineResponse2008Data
- LolesportsApi.InlineResponse2009
- LolesportsApi.InlineResponse200Data
- LolesportsApi.InlineResponse404
- LolesportsApi.InlineResponse4041
- LolesportsApi.InlineResponse404Error
- LolesportsApi.Locale
- LolesportsApi.MatchScheduleItem
- LolesportsApi.MatchType
- LolesportsApi.MatchTypeOptions
- LolesportsApi.NavItem
- LolesportsApi.OneOfquery
- LolesportsApi.OneOfscheduleItem
- LolesportsApi.OneOfteamMetadataParticipantMetadataItems
- LolesportsApi.Outcome
- LolesportsApi.PageToken
- LolesportsApi.ParticipantId
- LolesportsApi.ParticipantMetadata
- LolesportsApi.ParticipantMetadataExtended
- LolesportsApi.ParticipantStats
- LolesportsApi.PerkMetadata
- LolesportsApi.Player
- LolesportsApi.Query
- LolesportsApi.Ranking
- LolesportsApi.Record
- LolesportsApi.Result
- LolesportsApi.Role
- LolesportsApi.Roles
- LolesportsApi.RosteringStrategy
- LolesportsApi.ScheduleItem
- LolesportsApi.Scores
- LolesportsApi.Scoring
- LolesportsApi.ScoringOptions
- LolesportsApi.Section
- LolesportsApi.SimpleEvent
- LolesportsApi.SimpleGame
- LolesportsApi.SimpleLeague
- LolesportsApi.SimpleMatch
- LolesportsApi.SimpleRoster
- LolesportsApi.Stage
- LolesportsApi.Standings
- LolesportsApi.State
- LolesportsApi.Strategy
- LolesportsApi.Tags
- LolesportsApi.Team
- LolesportsApi.TeamId
- LolesportsApi.TeamMetadata
- LolesportsApi.TeamSlug
- LolesportsApi.TeamStats
- LolesportsApi.Teams
- LolesportsApi.Tournament
- LolesportsApi.Video
- LolesportsApi.Vod
- LolesportsApi.Window
- LolesportsApi.WindowFrame
Documentation for Authorization
apiKeyAuth
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header