-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9561310
commit 0de5d77
Showing
10 changed files
with
127 additions
and
13 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/Acces.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,13 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class Acces( | ||
@SerializedName("lat") | ||
val lat: Double?, | ||
@SerializedName("lng") | ||
val lng: Double? | ||
) |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/Address.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,30 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class Address( | ||
@SerializedName("city") | ||
val city: String?, | ||
@SerializedName("countryCode") | ||
val countryCode: String?, | ||
@SerializedName("countryName") | ||
val countryName: String?, | ||
@SerializedName("county") | ||
val county: String?, | ||
@SerializedName("district") | ||
val district: String?, | ||
@SerializedName("label") | ||
val label: String?, | ||
@SerializedName("postalCode") | ||
val postalCode: String?, | ||
@SerializedName("state") | ||
val state: String?, | ||
@SerializedName("stateCode") | ||
val stateCode: String?, | ||
@SerializedName("subdistrict") | ||
val subdistrict: String? | ||
) |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/Category.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,16 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class Category( | ||
@SerializedName("id") | ||
val id: String?, | ||
@SerializedName("name") | ||
val name: String?, | ||
@SerializedName("primary") | ||
val primary: Boolean? | ||
) |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/HerePlaces.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,12 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class HerePlaces( | ||
@SerializedName("items") | ||
val items: List<Item?>? | ||
) |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/Item.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,26 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class Item( | ||
@SerializedName("access") | ||
val access: List<Acces?>?, | ||
@SerializedName("address") | ||
val address: Address?, | ||
@SerializedName("categories") | ||
val categories: List<Category?>?, | ||
@SerializedName("distance") | ||
val distance: Int?, | ||
@SerializedName("id") | ||
val id: String?, | ||
@SerializedName("position") | ||
val position: Position?, | ||
@SerializedName("resultType") | ||
val resultType: String?, | ||
@SerializedName("title") | ||
val title: String? | ||
) |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/app/waste2wealth/com/ktorClient/here/dto/Position.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,14 @@ | ||
package app.waste2wealth.com.ktorClient.here.dto | ||
|
||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class Position( | ||
@SerializedName("lat") | ||
val lat: Double?, | ||
@SerializedName("lng") | ||
val lng: Double? | ||
) |
12 changes: 7 additions & 5 deletions
12
app/src/main/java/app/waste2wealth/com/ktorClient/repository/PlacesRepoImpl.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
3 changes: 2 additions & 1 deletion
3
app/src/main/java/app/waste2wealth/com/ktorClient/repository/PlacesRepository.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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package app.waste2wealth.com.ktorClient.repository | ||
|
||
import app.waste2wealth.com.ktorClient.Resource | ||
import app.waste2wealth.com.ktorClient.here.dto.HerePlaces | ||
import app.waste2wealth.com.ktorClient.placesAPI.dto.Places | ||
|
||
|
||
interface PlacesRepository { | ||
suspend fun getPlaces(latLong: String): Resource<Places> | ||
suspend fun getPlaces(latLong: String): Resource<HerePlaces> | ||
} |
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