Code fixes in \TgBotLib\Objects\Telegram\InlineQueryResult > InlineQueryResultVenue
This commit is contained in:
parent
77ce3969aa
commit
1deb1aaa6c
4 changed files with 180 additions and 6 deletions
2
.idea/runConfigurations/Build.xml
generated
2
.idea/runConfigurations/Build.xml
generated
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Build" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
<configuration default="false" name="Build" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" activateToolWindowBeforeRun="false">
|
||||||
<makefile filename="$PROJECT_DIR$/Makefile" target="build" workingDirectory="" arguments="">
|
<makefile filename="$PROJECT_DIR$/Makefile" target="build" workingDirectory="" arguments="">
|
||||||
<envs />
|
<envs />
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
2
.idea/runConfigurations/Clean.xml
generated
2
.idea/runConfigurations/Clean.xml
generated
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Clean" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
<configuration default="false" name="Clean" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" activateToolWindowBeforeRun="false">
|
||||||
<makefile filename="$PROJECT_DIR$/Makefile" target="clean" workingDirectory="" arguments="">
|
<makefile filename="$PROJECT_DIR$/Makefile" target="clean" workingDirectory="" arguments="">
|
||||||
<envs />
|
<envs />
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
2
.idea/runConfigurations/Install.xml
generated
2
.idea/runConfigurations/Install.xml
generated
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Install" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
<configuration default="false" name="Install" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" activateToolWindowBeforeRun="false">
|
||||||
<makefile filename="$PROJECT_DIR$/Makefile" target="install" workingDirectory="" arguments="">
|
<makefile filename="$PROJECT_DIR$/Makefile" target="install" workingDirectory="" arguments="">
|
||||||
<envs />
|
<envs />
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php /** @noinspection PhpUnused */
|
||||||
|
|
||||||
/** @noinspection PhpMissingFieldTypeInspection */
|
/** @noinspection PhpMissingFieldTypeInspection */
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\InlineQueryResult;
|
namespace TgBotLib\Objects\Telegram\InlineQueryResult;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
|
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
|
||||||
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;
|
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;
|
||||||
|
@ -117,6 +118,23 @@
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets id.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setId(string $id): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
if(strlen($id) > 64)
|
||||||
|
{
|
||||||
|
throw new InvalidArgumentException('id must be between 1 and 64 characters');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->id = $id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Latitude of the venue location in degrees
|
* Latitude of the venue location in degrees
|
||||||
*
|
*
|
||||||
|
@ -127,6 +145,18 @@
|
||||||
return $this->latitude;
|
return $this->latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the latitude of the venue location in degrees
|
||||||
|
*
|
||||||
|
* @param float $latitude
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setLatitude(float $latitude): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->latitude = $latitude;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Longitude of the venue location in degrees
|
* Longitude of the venue location in degrees
|
||||||
*
|
*
|
||||||
|
@ -137,6 +167,18 @@
|
||||||
return $this->longitude;
|
return $this->longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the longitude of the venue location in degrees
|
||||||
|
*
|
||||||
|
* @param float $longitude
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setLongitude(float $longitude): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->longitude = $longitude;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of the venue
|
* Title of the venue
|
||||||
*
|
*
|
||||||
|
@ -147,6 +189,18 @@
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the title of the venue
|
||||||
|
*
|
||||||
|
* @param string $title
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setTitle(string $title): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Address of the venue
|
* Address of the venue
|
||||||
*
|
*
|
||||||
|
@ -157,6 +211,18 @@
|
||||||
return $this->address;
|
return $this->address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the address of the venue
|
||||||
|
*
|
||||||
|
* @param string $address
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setAddress(string $address): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->address = $address;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Foursquare identifier of the venue if known
|
* Optional. Foursquare identifier of the venue if known
|
||||||
*
|
*
|
||||||
|
@ -167,6 +233,18 @@
|
||||||
return $this->foursquare_id;
|
return $this->foursquare_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the foursquare identifier of the venue if known
|
||||||
|
*
|
||||||
|
* @param string|null $foursquare_id
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setFoursquareId(?string $foursquare_id): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->foursquare_id = $foursquare_id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Foursquare type of the venue, if known.
|
* Optional. Foursquare type of the venue, if known.
|
||||||
* (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
|
* (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
|
||||||
|
@ -178,6 +256,18 @@
|
||||||
return $this->foursquare_type;
|
return $this->foursquare_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the foursquare type of the venue, if known.
|
||||||
|
*
|
||||||
|
* @param string|null $foursquare_type
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setFoursquareType(?string $foursquare_type): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->foursquare_type = $foursquare_type;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Google Places identifier of the venue
|
* Optional. Google Places identifier of the venue
|
||||||
*
|
*
|
||||||
|
@ -188,6 +278,18 @@
|
||||||
return $this->google_place_id;
|
return $this->google_place_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the google places identifier of the venue
|
||||||
|
*
|
||||||
|
* @param string|null $google_place_id
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setGooglePlaceId(?string $google_place_id): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->google_place_id = $google_place_id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Google Places type of the venue.
|
* Optional. Google Places type of the venue.
|
||||||
*
|
*
|
||||||
|
@ -199,6 +301,18 @@
|
||||||
return $this->google_place_type;
|
return $this->google_place_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the google places type of the venue.
|
||||||
|
*
|
||||||
|
* @param string|null $google_place_type
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setGooglePlaceType(?string $google_place_type): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->google_place_type = $google_place_type;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Inline keyboard attached to the message
|
* Optional. Inline keyboard attached to the message
|
||||||
*
|
*
|
||||||
|
@ -209,6 +323,18 @@
|
||||||
return $this->reply_markup;
|
return $this->reply_markup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the inline keyboard attached to the message
|
||||||
|
*
|
||||||
|
* @param InlineKeyboardMarkup|null $reply_markup
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReplyMarkup(?InlineKeyboardMarkup $reply_markup): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->reply_markup = $reply_markup;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Content of the message to be sent instead of the venue
|
* Optional. Content of the message to be sent instead of the venue
|
||||||
*
|
*
|
||||||
|
@ -219,6 +345,18 @@
|
||||||
return $this->input_message_content;
|
return $this->input_message_content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the content of the message to be sent instead of the venue
|
||||||
|
*
|
||||||
|
* @param InputVenueMessageContent|InputTextMessageContent|InputContactMessageContent|InputLocationMessageContent|InputInvoiceMessageContent|null $input_message_content
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setInputMessageContent(null|InputVenueMessageContent|InputTextMessageContent|InputContactMessageContent|InputLocationMessageContent|InputInvoiceMessageContent $input_message_content): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->input_message_content = $input_message_content;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Url of the thumbnail for the result
|
* Optional. Url of the thumbnail for the result
|
||||||
*
|
*
|
||||||
|
@ -229,6 +367,18 @@
|
||||||
return $this->thumbnail_url;
|
return $this->thumbnail_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the url of the thumbnail for the result
|
||||||
|
*
|
||||||
|
* @param string|null $thumbnail_url
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setThumbnailUrl(?string $thumbnail_url): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->thumbnail_url = $thumbnail_url;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Thumbnail width
|
* Optional. Thumbnail width
|
||||||
*
|
*
|
||||||
|
@ -239,6 +389,18 @@
|
||||||
return $this->thumbnail_width;
|
return $this->thumbnail_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the thumbnail width
|
||||||
|
*
|
||||||
|
* @param int|null $thumbnail_width
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setThumbnailWidth(?int $thumbnail_width): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->thumbnail_width = $thumbnail_width;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. Thumbnail height
|
* Optional. Thumbnail height
|
||||||
*
|
*
|
||||||
|
@ -249,6 +411,18 @@
|
||||||
return $this->thumbnail_height;
|
return $this->thumbnail_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the thumbnail height
|
||||||
|
*
|
||||||
|
* @param int|null $thumbnail_height
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setThumbnailHeight(?int $thumbnail_height): InlineQueryResultVenue
|
||||||
|
{
|
||||||
|
$this->thumbnail_height = $thumbnail_height;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of the object
|
* Returns an array representation of the object
|
||||||
*
|
*
|
||||||
|
@ -276,7 +450,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* Constructs an object from an array representation
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return ObjectTypeInterface
|
* @return ObjectTypeInterface
|
||||||
|
|
Loading…
Add table
Reference in a new issue