Package openfoodfacts.github.scrachx.openfood.models

Types

Link copied to clipboard
data class AnnotationAnswer(val insightId: String, val value: AnnotationAnswer.Value)
Link copied to clipboard
data class AnnotationResponse(    val status: String? = null,     val description: String? = null,     val statusCode: String? = null) : Serializable
Link copied to clipboard
value class Barcode(val raw: String)
Link copied to clipboard
enum CameraState : Enum<CameraState>
Link copied to clipboard
data class Changelog(val versions: List<ChangelogVersion>) : Serializable
Link copied to clipboard
data class ChangelogVersion(    val date: String,     val code: Long,     val name: String,     val items: List<String>) : Serializable
Link copied to clipboard
open class HistoryProduct
Link copied to clipboard
open class InvalidBarcode : Serializable, TaxonomyEntity
Link copied to clipboard
class LanguageData : Comparable<LanguageData>
Link copied to clipboard
enum MeasurementUnit : Enum<MeasurementUnit>
Link copied to clipboard
enum Modifier : Enum<Modifier>
Link copied to clipboard
data class NutrientLevelItem(    val category: String,     val value: String,     val label: String,     @DrawableRes val icon: Int)
Link copied to clipboard
data class NutrientLevels(    var salt: NutrimentLevel? = null,     var fat: NutrimentLevel? = null,     var sugars: NutrimentLevel? = null,     var saturatedFat: NutrimentLevel? = null) : Serializable
Link copied to clipboard
enum Nutriment : Enum<Nutriment>
Link copied to clipboard
enum NutrimentLevel : Enum<NutrimentLevel>
Link copied to clipboard
data class NutrimentListItem(    val title: CharSequence?,     val valueStr: CharSequence?,     val servingValueStr: CharSequence?,     val unitStr: CharSequence?,     val modifierStr: CharSequence?,     val displayVolumeHeader: Boolean = false)

Use a round value for value and servingValue parameters

Link copied to clipboard
class Product : SearchProduct
Link copied to clipboard
enum ProductImageField : Enum<ProductImageField>

Kind of Product Image

Link copied to clipboard
data class ProductIngredient(    val text: String? = null,     val id: String,     val rank: Long = -1,     val percent: String? = null,     val percentEstimate: Float? = null,     val percentMin: Float? = null,     val percentMax: Float? = null,     val vegan: String? = null,     val vegetarian: String? = null,     val hasSubIngredients: String? = null) : Serializable

Represents an ingredient of the product

Link copied to clipboard
class ProductNutriments : Serializable

JSON representation of the product nutriments entry.

Link copied to clipboard
class ProductState : Serializable
Link copied to clipboard
data class Question(    val insightId: String,     val code: String? = null,     val type: String? = null,     val value: String? = null,     val questionText: String? = null,     val insightType: String? = null,     val sourceImageUrl: String? = null,     val imageUrl: String? = null) : Serializable
Link copied to clipboard
data class QuestionsState(val status: String?, val questions: List<Question>?) : Serializable
Link copied to clipboard
data class SaveItem(    var title: String? = null,     val fieldsCompleted: Int = 0,     var url: String? = null,     var barcode: String? = null,     var weight: String? = null,     var brand: String? = null)
Link copied to clipboard
data class Search(    val pageSize: String,     val count: String,     val skip: Int,     val page: Int,     val products: List<SearchProduct> = arrayListOf()) : Serializable
Link copied to clipboard
data class SearchInfo(    var searchType: SearchType,     var searchQuery: String,     var searchTitle: String = searchQuery) : Parcelable

Class that contains search information

Link copied to clipboard
open class SearchProduct : Serializable

Functions

Link copied to clipboard
fun NutrimentListItem.bold(): NutrimentListItem
Link copied to clipboard
fun ProductNutriments.buildLevelItem(    context: Context,     nutriment: Nutriment,     nutrimentLevel: NutrimentLevel?): NutrientLevelItem?
Link copied to clipboard
fun List<LanguageData>.findByCode(languageCode: String): Int
Link copied to clipboard
fun SearchProduct.getFrontImageUrl(languageCode: String?): String?
Link copied to clipboard
fun SearchProduct.getIngredientsImageUrl(languageCode: String?): String?
Link copied to clipboard
fun SearchProduct.getPackagingImageUrl(languageCode: String?): String?
Link copied to clipboard
fun SearchProduct.getSelectedImageUrl(    languageCode: String?,     type: ProductImageField,     size: ImageSize): String?
Link copied to clipboard
fun SearchProduct.getSmallFrontImageUrl(languageCode: String?): String?

Properties

Link copied to clipboard
val CARBO_MAP: Map<Nutriment, Int>
Link copied to clipboard
val DEFAULT_UNIT: MeasurementUnit
Link copied to clipboard
val ENERGY_UNITS: List<MeasurementUnit>
Link copied to clipboard
val FAT_MAP: Map<Nutriment, Int>
Link copied to clipboard
val MINERALS_MAP: Map<Nutriment, Int>
Link copied to clipboard
val PROT_MAP: Map<Nutriment, Int>
Link copied to clipboard
val VITAMINS_MAP: Map<Nutriment, Int>