package it.danieleverducci.openweddingapp.networking

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


class LikeNet(context: Context, token: String): AuthenticatedItemNet<Like>(context, token) {
    companion object {
        val TAG = "LikeNet"
        val url = "${Config.API_BASE_URL}${Config.API_ENDPOINT_LIKE}"
    }

    fun postItem(listener: OnItemPostedListener<Like>, item: Like) {
        super.postItem(url, listener, item)
    }

    fun deleteItem(listener: OnItemDeletedListener<Like>, id: Int) {
        super.deleteItem(url, listener, id)
    }

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