kotlin - How to add retrofit service interface function paramter to data class member using moshi?
问题描述
I want to add the parameter of the retrofit service interface to my data class member using moshi.
Here the interface code:
@GET("/data")
interface getData(@Query("model") model: String) : Response
Here data class
data class Datum(
val model: String, // want to add this from the interface params
....
// futher members get values from json response (using moshi)
...
)
is there any way to do this using moshi? is there any moshi annonation for doing this?
解决方案
推荐阅读
- powershell - PowerShell NotifyIcon 上下文菜单
- pandas - 从 Pandas 列中提取前 3 位数字
- c# - 使用 C# 打开旧的 VB6 随机访问文件
- typescript - 如何在 TypeScript 中尝试 catch 和 finally 语句?
- angular - 如何使用角度中的promise根据父值结合父子值?
- javascript - Selenium 服务器已启动并正在运行,但无法连接到 selenium
- sql - 为什么 SQL Server 将 SS 视为 Umlaut-S (ß)?
- java - NetBeans + Glassfish --> NoSuchMethodError directExecutor()Ljava/util/concurrent/Executor
- spring-boot - Spring Cloud Stream:处理消息需要很长时间时对StreamListener的正确处理
- django - 如何在 django 的一个地方存储多个 python gui 工具?