Category

data class Category(val id: String? = null, val name: String? = null, val shortName: String? = null, val pluralName: String? = null, icon: Photo? = null, val isPrimary: Boolean = false, val categories: List<Category> = emptyList()) : FoursquareType, Parcelable

Data class of a category associated to a Venue.

Contains information like name, icon and subcategories.

Constructors

Link copied to clipboard
fun Category(id: String, name: String?, shortName: String?, pluralName: String?, photo: Photo?, primary: Boolean)

Secondary constructor without specifying categories

Link copied to clipboard
fun Category(id: String? = null, name: String? = null, shortName: String? = null, pluralName: String? = null, icon: Photo? = null, isPrimary: Boolean = false, categories: List<Category> = emptyList())

Properties

Link copied to clipboard

Categories can be nested within one another too.

Link copied to clipboard
Link copied to clipboard
val id: String? = null

The category's id.

Link copied to clipboard
val image: Photo?

Icon associated with this category

Link copied to clipboard
@SerializedName(value = "primary")
val isPrimary: Boolean = false

When in the context of a venue, tells us if this is the primary category or not.

Link copied to clipboard
val name: String? = null

Simple name of the category.

Link copied to clipboard
val pluralName: String? = null

E.g. Bars instead of Bar.

Link copied to clipboard
val shortName: String? = null

E.g. SOUTHERN / SOUL instead of SOUTHERN OR SOUL FOOD RESTAURANT.