Skip to content
Snippets Groups Projects

MatchApiService.kt

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by a6-alrashdi
    MatchApiService.kt 895 B
    package com.example.match.api
    
    import com.example.match.model.ApiResponse
    import com.example.match.model.ApiResponses
    import com.example.match.model.Fixture
    import com.example.match.model.LiveScore
    import com.example.match.model.MatchStatisticsData
    import retrofit2.Response
    import retrofit2.http.GET
    import retrofit2.http.Query
    
    interface MatchApiService {
    
        // Endpoint for upcoming matches
        @GET("sport/football/schedule")
        suspend fun getUpcomingMatchesByDate(
            @Query("date") date: String
        ): Response<ApiResponse<Fixture>>
    
        // Endpoint for today's live scores
        @GET("sport/football/livescores")
        suspend fun getLiveScores(): Response<ApiResponse<LiveScore>>
    
    
        @GET("sport/football/analysis")
        suspend fun getMatchStatistics(
            @Query("matchId") matchId: String
        ): Response<ApiResponses<MatchStatisticsData>>
    
    
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment