mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
TelegramBotAPI Venue and foursquare additions
This commit is contained in:
parent
cfb7f35d20
commit
975898660c
@ -54,6 +54,9 @@
|
|||||||
* `TelegramBotAPI`:
|
* `TelegramBotAPI`:
|
||||||
* `UnknownUpdateType` was renamed to `UnknownUpdate`
|
* `UnknownUpdateType` was renamed to `UnknownUpdate`
|
||||||
* Refactoring and optimization of `FlowsUpdatesFilter`
|
* 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`:
|
* `TelegramBotAPI-extensions-utils`:
|
||||||
* Several new functions `makeLinkToMessage` was added
|
* Several new functions `makeLinkToMessage` was added
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@ typealias PollIdentifier = String
|
|||||||
typealias StickerSetName = String
|
typealias StickerSetName = String
|
||||||
typealias FileUniqueId = String
|
typealias FileUniqueId = String
|
||||||
typealias DiceResult = Int
|
typealias DiceResult = Int
|
||||||
|
typealias FoursquareId = String
|
||||||
|
typealias FoursquareType = String
|
||||||
|
|
||||||
typealias Seconds = Int
|
typealias Seconds = Int
|
||||||
typealias LongSeconds = Long
|
typealias LongSeconds = Long
|
||||||
|
@ -1,19 +1,6 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
import com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue
|
||||||
import kotlinx.serialization.SerialName
|
|
||||||
import kotlinx.serialization.Serializable
|
|
||||||
|
|
||||||
@Serializable
|
@Deprecated("Replaced", ReplaceWith("Venue", "com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue"))
|
||||||
data class Venue(
|
typealias Venue = 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
|
|
||||||
|
@ -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