-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add trending api and update news api
- Loading branch information
1 parent
6755190
commit 232d065
Showing
38 changed files
with
743 additions
and
406 deletions.
There are no files selected for viewing
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
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
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
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
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
10 changes: 10 additions & 0 deletions
10
app/src/main/kotlin/com/github/premnirmal/ticker/network/ApeWisdom.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.github.premnirmal.ticker.network | ||
|
||
import com.github.premnirmal.ticker.network.data.TrendingResult | ||
import retrofit2.http.GET | ||
|
||
interface ApeWisdom { | ||
|
||
@GET("filter/all-stocks") | ||
suspend fun getTrendingStocks(): TrendingResult | ||
} |
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
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
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
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
19 changes: 19 additions & 0 deletions
19
app/src/main/kotlin/com/github/premnirmal/ticker/network/data/Trending.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.github.premnirmal.ticker.network.data | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
|
||
data class TrendingResult( | ||
@SerializedName("count") val count: Int, | ||
@SerializedName("pages") val pages: Int, | ||
@SerializedName("current_page") val currentPage: Int, | ||
@SerializedName("results") val results: List<Trending> | ||
) | ||
data class Trending( | ||
@SerializedName("rank") val rank: Int, | ||
@SerializedName("mentions") val mentions: Int, | ||
@SerializedName("mentions_24h_ago") val mentions24hAgo: Int, | ||
@SerializedName("upvotes") val upvotes: Int, | ||
@SerializedName("ticker") val ticker: String, | ||
@SerializedName("name") val name: String? | ||
) |
Oops, something went wrong.