def makeAPIRequest(query):
    api = MakeApiRequests.Api()

    if query == "world":
        return api.makeApiWorldwide()
    if query == "state":
        return api.makeApiRequestForIndianStates()
    else:
        return api.makeApiRequestForCounrty(query)
Esempio n. 2
0
def makeAPIRequest(query):
    api = MakeApiRequests.Api()
    states=["Andhra Pradesh","Arunachal Pradesh ","Assam","Bihar","Chhattisgarh","Goa","Gujarat","Haryana","Himachal Pradesh","Jammu and Kashmir","Jharkhand","Karnataka","Kerala","Madhya Pradesh","Maharashtra","Manipur","Meghalaya","Mizoram","Nagaland","Odisha","Punjab","Rajasthan","Sikkim","Tamil Nadu","Telangana","Tripura","Uttar Pradesh","Uttarakhand","West Bengal","Andaman and Nicobar Islands","Chandigarh","Dadra and Nagar Haveli","Daman and Diu","Lakshadweep","National Capital Territory of Delhi","Puducherry"]

    if query == "world":
        return api.makeApiWorldwide()
    if query in states:
        return api.makeApiRequestForIndianStates(query)

    else:
        return api.makeApiRequestForCounrty(query)
Esempio n. 3
0
def makeApiRequest(query):
    api = MakeApiRequests.Api()
    if query == "world":
        return api.makeApiRequestsforWorldwide()
    if query == "headlines":
        return api.makeApiRequestsgetCovidHeadlines()
    if query == "state":
        return api.makeApiRequestsforIndianStates()
    ##if query == "helpline_numbers":
    ##return api.makeApiRequestsgetHelplinenumbers()
    else:
        return api.makeApiRequestforCounrty(query)