package it.danieleverducci.openweddingapp.networking

import android.content.Context
import it.danieleverducci.openweddingapp.Config
import it.danieleverducci.openweddingapp.entities.Location
import org.json.JSONObject


class LocationNet(context: Context): StaticItemNet<Location>(context) {
    companion object {
        val TAG = "LocationNet"
        val url = "${Config.API_BASE_URL}${Config.STATIC_ENDPOINT_LOCATION}"
    }

    fun getItem(listener: OnItemObtainedListener<Location>) {
        super.getItem(url, listener)
    }

    override fun newItem(jo: JSONObject): Location {
        return Location(jo)
    }

}