v1
This commit is contained in:
@@ -20,7 +20,7 @@ fun Float.formatPrice(): String {
|
||||
|
||||
fun ImageView.loadImage(url: String?) {
|
||||
Picasso.get()
|
||||
.load("https://liwapos.com/samba.mobil/Content/$url")
|
||||
.load("https://my-json-server.typicode.com/YarikHumster/SweetShopViki/$url")
|
||||
.placeholder(R.drawable.loading)
|
||||
.error(R.drawable.error)
|
||||
.into(this)
|
||||
|
||||
@@ -8,7 +8,5 @@ data class Product(
|
||||
@SerializedName("Name") @Expose var name: String?,
|
||||
@SerializedName("ImagePath") @Expose var imagePath: String?,
|
||||
@SerializedName("Price") @Expose var price: Double?,
|
||||
@SerializedName("MenuItemId") @Expose var menuItemId: Int?,
|
||||
@SerializedName("GroupName") @Expose var groupName: String?,
|
||||
@SerializedName("CustomTags") @Expose var customTags: String?,
|
||||
@SerializedName("MenuItemId") @Expose var menuItemId: Int
|
||||
): Serializable
|
||||
@@ -7,11 +7,14 @@ import retrofit2.http.GET
|
||||
import retrofit2.http.Path
|
||||
|
||||
interface DAOInterface {
|
||||
@GET("JsonCategories")
|
||||
@GET("categories")
|
||||
suspend fun getCategories(): Response<List<Categories>>
|
||||
|
||||
@GET("JsonItems/{id}")
|
||||
suspend fun getProducts(@Path("id") id: Int): Response<List<Product>>
|
||||
|
||||
@GET("categories/{categoryId}/products")
|
||||
suspend fun getProducts(@Path("categoryId") categoryId: Int): Response<List<Product>>
|
||||
|
||||
|
||||
|
||||
@GET("JsonSearch")
|
||||
suspend fun getSearch(): Response<List<Product>>
|
||||
|
||||
Reference in New Issue
Block a user