package it.danieleverducci.openweddingapp.networking

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

class TableNet(context: Context, token: String): AuthenticatedItemNet<Table>(context, token) {
    companion object {
        val TAG = "TableNet"
    }

    fun getItem(listener: OnItemObtainedListener<Table>) {
        val url = "${Config.API_BASE_URL}${Config.API_ENDPOINT_TABLE}"
        super.getItem(url, 0, listener)
    }

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