package it.danieleverducci.openweddingapp.networking

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


class GenericDynamicContentNet(context: Context): StaticItemNet<GenericDynamicContent>(context) {
    companion object {
        val TAG = "GenericDynamicContentNet"
    }

    override fun getItem(relUrl: String, listener: OnItemObtainedListener<GenericDynamicContent>) {
        val url = "${Config.API_BASE_URL}${relUrl}"
        super.getItem(url, listener)
    }

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

}