# Path: InstagramAPI/src/http/Response/Objects/Location.py
# class Location(object):
#     def __init__(self, location):
#         self.name = None
#         self.external_id_source = None
#         self.address = None
#         self.lat = None
#         self.lng = None
#         self.external_id = None
# 
#         self.name = location['name']
#         self.external_id_source = location['external_id_source']
#         if 'address' in location and location['address']:
#             self.address = location['address']
#         self.lat = location['lat']
#         self.lng = location['lng']
#         self.external_id = location['external_id']
# 
#     def getName(self):
#         return self.name
# 
#     def getExternalIdSource(self):
#         return self.external_id_source
# 
#     def getAddress(self):
#         return self.address
# 
#     def getLatitude(self):
#         return self.lat
# 
#     def getLongitude(self):
#         return self.lng
# 
#     def getExternalId(self):
#         return self.external_id
# 
# Path: InstagramAPI/src/http/Response/Response.py
# class Response(object):
#     STATUS_OK = "ok"
#     STATUS_FAIL = "fail"
# 
#     status = None
#     message = None
#     fullResponse = None
# 
#     def setStatus(self, status):
#         self.status = status
# 
#     def getStatus(self):
#         return self.status
# 
#     def setMessage(self, message):
#         self.message = message
# 
#     def getMessage(self):
#         return self.message
# 
#     def setFullResponse(self, response):
#         self.fullResponse = response
# 
#     def getFullResponse(self):
#         return self.fullResponse
# 
#     def isOk(self):
#         return self.getStatus() == Response.STATUS_OK


from InstagramAPI.src.http.Response.Objects.Location import Location
from .Response import Response


class LocationResponse(Response):
    def __init__(self, response):
        self.venues = None
        self.request_id = None

        if self.STATUS_OK == response['status']:
            locations = []
            for location in response['venues']:
                locations.append(Location(location))

            self.venues = locations
        else:
            self.setMessage(response['message'])

        self.setStatus(response['status'])

    def getVenues(self):

# Path: InstagramAPI/src/http/Response/Objects/Location.py
# class Location(object):
#     def __init__(self, location):
#         self.name = None
#         self.external_id_source = None
#         self.address = None
#         self.lat = None
#         self.lng = None
#         self.external_id = None
# 
#         self.name = location['name']
#         self.external_id_source = location['external_id_source']
#         if 'address' in location and location['address']:
#             self.address = location['address']
#         self.lat = location['lat']
#         self.lng = location['lng']
#         self.external_id = location['external_id']
# 
#     def getName(self):
#         return self.name
# 
#     def getExternalIdSource(self):
#         return self.external_id_source
# 
#     def getAddress(self):
#         return self.address
# 
#     def getLatitude(self):
#         return self.lat
# 
#     def getLongitude(self):
#         return self.lng
# 
#     def getExternalId(self):
#         return self.external_id
# 
# Path: InstagramAPI/src/http/Response/Response.py
# class Response(object):
#     STATUS_OK = "ok"
#     STATUS_FAIL = "fail"
# 
#     status = None
#     message = None
#     fullResponse = None
# 
#     def setStatus(self, status):
#         self.status = status
# 
#     def getStatus(self):
#         return self.status
# 
#     def setMessage(self, message):
#         self.message = message
# 
#     def getMessage(self):
#         return self.message
# 
#     def setFullResponse(self, response):
#         self.fullResponse = response
# 
#     def getFullResponse(self):
#         return self.fullResponse
# 
#     def isOk(self):
#         return self.getStatus() == Response.STATUS_OK


# Path: InstagramAPI/src/http/Response/LocationResponse.py
from InstagramAPI.src.http.Response.Objects.Location import Location
from .Response import Response



class LocationResponse(Response):
    def __init__(self, response):
        self.venues = None
        self.request_id = None

        if self.STATUS_OK == response['status']:
            locations = []
            for location in response['venues']:
                locations.append(Location(location))

            self.venues = locations
        else:
            self.setMessage(response['message'])

        self.setStatus(response['status'])

    def getVenues(self):

        return self.venues