public class APIHandler extends Object
getInstance()| Modifier and Type | Method and Description |
|---|---|
static APIHandler |
getInstance()
This method is used to obtain the singleton instance of itself.
|
org.json.JSONArray |
getJsonApiDataArray()
Alternative version
getJsonApiDataArray(String) that automatically fetches data from getRawJsonData() |
org.json.JSONArray |
getJsonApiDataArray(String source)
Method used to convert raw JSON data (
getRawJsonData()) into JSONArray |
String |
getRawJsonData()
Method used to join data obtained using
getReader() into String. |
protected BufferedReader |
getReader()
Method used to obtain
BufferedReader of raw API Data. |
public static APIHandler getInstance()
APIHandlerpublic org.json.JSONArray getJsonApiDataArray(String source)
getRawJsonData()) into JSONArraysource - String containing raw API Data.JSONArray containing formatted data or null if source is empty.public org.json.JSONArray getJsonApiDataArray()
getJsonApiDataArray(String) that automatically fetches data from getRawJsonData()JSONArray containing formatted data or null if source is empty.public String getRawJsonData()
getReader() into String.String containing raw API Dataprotected BufferedReader getReader() throws IOException
BufferedReader of raw API Data.BufferedReader from raw API Data.IOException - Throws IOException if fails to read data.Copyright © 2023. All rights reserved.