package com.duolebo.blyrobot.protocol

import android.content.Context
import com.duolebo.appbase.IModel
import com.duolebo.appbase.prj.bmtv.protocol.IProtocolConfig
import com.duolebo.appbase.prj.bmtv.protocol.ProtocolBase
import com.duolebo.blyrobot.data.ApkReportData
import com.duolebo.blyrobot.util.Config

class ApkReportProtocol(context: Context?, config: IProtocolConfig?) : ProtocolBase(context, config) {

    val model = ApkReportData()
    var body = ""

    fun withBody(body: String): ApkReportProtocol {
        this.body = body
        return this
    }

    override fun prepareProtocolBody(p0: MutableMap<String, String>?) {

    }

    override fun prepareHttpBody(): ByteArray {
        return body.toByteArray()
    }

    override fun getData(): IModel {
        return model
    }

    override fun prepareProtocolRequestKey(): String {
        return Config.instance.getReportProtocolUrl()
    }

}