mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-26 14:16:29 +08:00
test release api
This commit is contained in:
@@ -144,7 +144,13 @@ class Request {
|
||||
tvModel.seq = 0
|
||||
val data = ysp?.switch(tvModel)
|
||||
val request = data?.let { LiveInfoRequest(it) }
|
||||
call = request?.let { yspApiService.getLiveInfo("guid=${ysp?.getGuid()}; $cookie", ysp!!.token, it) }
|
||||
call = request?.let {
|
||||
yspApiService.getLiveInfo(
|
||||
"guid=${ysp?.getGuid()}; $cookie",
|
||||
ysp!!.token,
|
||||
it
|
||||
)
|
||||
}
|
||||
|
||||
call?.enqueue(object : Callback<LiveInfo> {
|
||||
override fun onResponse(call: Call<LiveInfo>, response: Response<LiveInfo>) {
|
||||
@@ -307,7 +313,7 @@ class Request {
|
||||
yspTokenService.getInfo()
|
||||
.enqueue(object : Callback<Info> {
|
||||
override fun onResponse(call: Call<Info>, response: Response<Info>) {
|
||||
if (response.isSuccessful) {
|
||||
if (response.isSuccessful && response.body()?.data?.token != null) {
|
||||
token = response.body()?.data?.token!!
|
||||
Log.i(TAG, "info success $token")
|
||||
val cookie =
|
||||
|
||||
@@ -5,8 +5,6 @@ import okhttp3.OkHttpClient
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
import retrofit2.converter.protobuf.ProtoConverterFactory
|
||||
import java.net.InetSocketAddress
|
||||
import java.net.Proxy
|
||||
import javax.net.ssl.SSLContext
|
||||
import javax.net.ssl.TrustManager
|
||||
import javax.net.ssl.X509TrustManager
|
||||
@@ -40,7 +38,7 @@ class ApiClient {
|
||||
|
||||
val releaseService: ReleaseService by lazy {
|
||||
Retrofit.Builder()
|
||||
.baseUrl(devUrl)
|
||||
.baseUrl(myUrl)
|
||||
.client(okHttpClient)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build().create(ReleaseService::class.java)
|
||||
|
||||
Reference in New Issue
Block a user