Net-API-Telegram

 view release on metacpan or  search on metacpan

lib/Net/API/Telegram.pm  view on Meta::CPAN


This parameter type is String and is optional.

Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.

=item I<ok>

This parameter type is Boolean and is required.

Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)

=item I<shipping_options>

This parameter type is an array of L<Net::API::Telegram::ShippingOption> and is optional.
Required if ok is True. A JSON-serialized array of available shipping options.

=item I<shipping_query_id>

This parameter type is String and is required.

Unique identifier for the query to be answered

=back

=item B<createNewStickerSet>( %PARAMETERS )

Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns True on success.

Reference: L<https://core.telegram.org/bots/api#createnewstickerset>

This methods takes the following parameters:

=over 8

=item I<contains_masks>

This parameter type is Boolean and is optional.

Pass True, if a set of mask stickers should be created

=item I<emojis>

This parameter type is String and is required.

One or more emoji corresponding to the sticker

=item I<mask_position>

This parameter type is an object L<Net::API::Telegram::MaskPosition> and is optional.
A JSON-serialized object for position where the mask should be placed on faces

=item I<name>

This parameter type is String and is required.

Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “_by_<bot username>”. <bot_...

=item I<png_sticker>

This parameter type is one of the following L<InputFile> or String and is required.
Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP U...

=item I<title>

This parameter type is String and is required.

Sticker set title, 1-64 characters

=item I<user_id>

This parameter type is Integer and is required.

User identifier of created sticker set owner

=back

=item B<deleteChatPhoto>( %PARAMETERS )

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Reference: L<https://core.telegram.org/bots/api#deletechatphoto>

This methods takes the following parameters:

=over 8

=item I<chat_id>

This parameter type is one of the following Integer or String and is required.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)

=back

=item B<deleteChatStickerSet>( %PARAMETERS )

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to ch...

Reference: L<https://core.telegram.org/bots/api#deletechatstickerset>

This methods takes the following parameters:

=over 8

=item I<chat_id>

This parameter type is one of the following Integer or String and is required.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

=back

=item B<deleteMessage>( %PARAMETERS )

Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots...

Reference: L<https://core.telegram.org/bots/api#deletemessage>

This methods takes the following parameters:

=over 8

=item I<chat_id>

lib/Net/API/Telegram.pm  view on Meta::CPAN

=item I<reply_markup>

This parameter type is an object L<Net::API::Telegram::InlineKeyboardMarkup> and is optional.
A JSON-serialized object for a new message inline keyboard.

=back

=item B<unbanChatMember>( %PARAMETERS )

Use this method to unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. Returns True on s...

Reference: L<https://core.telegram.org/bots/api#unbanchatmember>

This methods takes the following parameters:

=over 8

=item I<chat_id>

This parameter type is one of the following Integer or String and is required.
Unique identifier for the target group or username of the target supergroup or channel (in the format @username)

=item I<user_id>

This parameter type is Integer and is required.

Unique identifier of the target user

=back

=item B<unpinChatMessage>( %PARAMETERS )

Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in ...

Reference: L<https://core.telegram.org/bots/api#unpinchatmessage>

This methods takes the following parameters:

=over 8

=item I<chat_id>

This parameter type is one of the following Integer or String and is required.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)

=back

=item B<uploadStickerFile>( %PARAMETERS )

Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.

Reference: L<https://core.telegram.org/bots/api#uploadstickerfile>

This methods takes the following parameters:

=over 8

=item I<png_sticker>

This parameter type is an object L<Net::API::Telegram::InputFile> and is required.
Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More info on Sending Files »

=item I<user_id>

This parameter type is Integer and is required.

User identifier of sticker file owner

=back

=back

=head1 COPYRIGHT

Copyright (c) 2000-2019 DEGUEST Pte. Ltd.

=head1 AUTHOR

Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>

=head1 SEE ALSO

L<Net::API::Telegram>

=head1 COPYRIGHT & LICENSE

Copyright (c) 2018-2019 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated
files under the same terms as Perl itself.

=cut



( run in 0.921 second using v1.01-cache-2.11-cpan-39bf76dae61 )