Class_DataExtractor - GensokyoGears/itemsets GitHub Wiki

Class DataExtractor is used to pull champion and item data from Riot API, then generate SQL. This file is used during application initialization.

Properties:

  • String API_KEY - API key to Riot api, used to access data from RIOT API.
  • String SQL_FILEPATH - System filepath to output SQL file.

Methods:

  • void main(String[] args) - main method, designed to run locally.
  • void saveData(StringBuffer sqlData) - save generated in buffer sql string to file.
  • StringBuffer initializeSqlData() - appends SQL string with table creation queries.
  • String getNewLineString() - used to return new line character.
  • StringBuffer processChampionsData(StringBuffer sqlData) - processes champion data from api and generates list of queries (INSERTS), appending them to SQL String.
  • StringBuffer processItemsData(StringBuffer sqlData) - processes item data from api and generates list of queries (INSERTS), appending them to SQL String.
  • JSONObject getLOLAPIdata(String httpsURL) - method created to return any data from Riot API, given input URL.
  • void initializeSSLtrust() - method used to initialize SSL trust, required to access Riot API through SSL.