Created
July 18, 2018 18:45
-
-
Save snijsure/6abed708488daf7f17f58a1e182a680f to your computer and use it in GitHub Desktop.
Sample Api Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.yourpackage.model.Price | |
import com.yourpackage.model.Ticket | |
import io.reactivex.Single | |
import retrofit2.http.GET | |
import retrofit2.http.Query | |
interface ApiService { | |
@GET("airline/tickets") | |
fun searchTickets(@Query("from") from: String, @Query("to") to: String): Single<List<Ticket>> | |
@GET("airline/price") | |
fun getPrice(@Query("flight_number") flightNumber: String, @Query("from") from: String, @Query("to") to: String): Single<Price> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment