mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
TelegramBotAPI Venue and foursquare additions
This commit is contained in:
parent
cfb7f35d20
commit
975898660c
@ -54,6 +54,9 @@
|
||||
* `TelegramBotAPI`:
|
||||
* `UnknownUpdateType` was renamed to `UnknownUpdate`
|
||||
* Refactoring and optimization of `FlowsUpdatesFilter`
|
||||
* `Venue` type was replaced to a new package: `com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue`
|
||||
* `Venue` type now implements `Locationed` and delegate realisation to its `location` field
|
||||
* `FoursquareId` and `FoursquareType` typealiases were added
|
||||
* `TelegramBotAPI-extensions-utils`:
|
||||
* Several new functions `makeLinkToMessage` was added
|
||||
|
||||
|
@ -22,6 +22,8 @@ typealias PollIdentifier = String
|
||||
typealias StickerSetName = String
|
||||
typealias FileUniqueId = String
|
||||
typealias DiceResult = Int
|
||||
typealias FoursquareId = String
|
||||
typealias FoursquareType = String
|
||||
|
||||
typealias Seconds = Int
|
||||
typealias LongSeconds = Long
|
||||
|
@ -1,19 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue
|
||||
|
||||
@Serializable
|
||||
data class Venue(
|
||||
@SerialName(locationField)
|
||||
val location: Location,
|
||||
@SerialName(titleField)
|
||||
override val title: String,
|
||||
@SerialName(addressField)
|
||||
override val address: String,
|
||||
@SerialName(foursquareIdField)
|
||||
override val foursquareId: String? = null,
|
||||
@SerialName(foursquareTypeField)
|
||||
override val foursquareType: String? = null
|
||||
) : CommonVenueData
|
||||
@Deprecated("Replaced", ReplaceWith("Venue", "com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue"))
|
||||
typealias Venue = Venue
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.venue
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class Venue(
|
||||
@SerialName(locationField)
|
||||
val location: Location,
|
||||
@SerialName(titleField)
|
||||
override val title: String,
|
||||
@SerialName(addressField)
|
||||
override val address: String,
|
||||
@SerialName(foursquareIdField)
|
||||
override val foursquareId: FoursquareId? = null,
|
||||
@SerialName(foursquareTypeField)
|
||||
override val foursquareType: FoursquareType? = null
|
||||
) : CommonVenueData, Locationed by location
|
Loading…
Reference in New Issue
Block a user