Skip to content

Commit

Permalink
fixed empty search request to hearthisat
Browse files Browse the repository at this point in the history
  • Loading branch information
iankang committed Jan 31, 2022
1 parent 99a3a10 commit 514028f
Show file tree
Hide file tree
Showing 55 changed files with 14 additions and 4,108 deletions.
5 changes: 3 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/mixsteroids/mixjar/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fun main() {
// println(track)
// val playlist = hearThisAt.getSinglePlaylist("shawne","playlists",1,5)
// println(playlist)
// val search = hearThisAt.search("","shawne",1, 5,null)
// val search = hearThisAt.search("","ajlfasjdflkas",1, 5,null)
// println(search)
// val login = hearThisAt.login("ianngech@yahoo.com","kangethe")
// println(login)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ interface HearThisAtService {
@Query("category") category: String?,
@Query("show-feed-start") showFeedStart: String,
@Query("show-feed-end") showFeedEnd: String
): Single<HearthisAtFeedResponse>
): Single<HearthisAtFeedResponse?>


@GET("/categories")
fun getAllGenres(): Single<HearThisAtGenresResponse>
fun getAllGenres(): Single<HearThisAtGenresResponse?>

@GET("categories/{categoryName}")
fun getGenreList(
@Path("categoryName") categoryName: String,
@Query("page") page: Int,
@Query("count") count: Int,
@Query("duration") duration: Int?
): Single<GenreList>
): Single<GenreList?>

@GET("{artistName}")
fun getSingleArtist(
@Path("artistName") artistName: String
): Single<SingleArtistResponse>
): Single<SingleArtistResponse?>


@GET("{artistName}/")
Expand All @@ -44,21 +44,21 @@ interface HearThisAtService {
@Query("type") type: String?,
@Query("page") page:Int?,
@Query("count") count: Int?
):Single<ArtistListResponse>
):Single<ArtistListResponse?>

@GET("{artistName}/{trackName}")
fun getSingleTrack(
@Path("artistName") artistName:String,
@Path("trackName") trackName:String
):Single<SingleTrackResponse>
):Single<SingleTrackResponse?>

@GET("{artistName}/")
fun getSinglePlaylist(
@Path("artistName") artistName: String,
@Query("type") type:String,
@Query("page") page: Int?,
@Query("count") count: Int?
):Single<SinglePlaylist>
):Single<SinglePlaylist?>

@GET("search")
fun Search(
Expand All @@ -67,11 +67,11 @@ interface HearThisAtService {
@Query("page") page:Int?,
@Query("count")count:Int?,
@Query("duration") duration:Int?
):Single<HearthisAtSearchResponse>
):Single<HearthisAtSearchResponse?>

@POST("login")
fun login(
@Query("email") email:String,
@Query("password") password:String
):Single<HearthisatLoginResponse>
):Single<HearthisatLoginResponse?>
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class HearThisAtServiceImpl: HearThisAtInterface {
searchCall.subscribe { search,throwable ->
if(throwable == null){
searchResponse = search

}else{
LOGGER.error(throwable.message)
}
Expand Down
Binary file added target/classes/META-INF/mixjar.kotlin_module
Binary file not shown.
157 changes: 0 additions & 157 deletions target/classes/com/mixsteroids/mixjar/HearThisAt.kt

This file was deleted.

Loading

0 comments on commit 514028f

Please sign in to comment.