'How can I create a GET Request from API @GET("v4/anime/{id}/characters")

I am new to APIs and I am having a hard time thinking how can I create a GET function based on documentation.

interface MalAPI {

    @GET("v4/anime")
    suspend fun searchAnime(
        @Query("q")
        title : String
    ) : Response<AnimeResponse>

    @GET("v4/anime/{id}/characters")
    suspend fun getCharactersOfAnimeById() //how to pass id inside constructor?
}

Based on the documentation i have to supply the ID but I dont know how to supply it inside my construction GET function.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source