Class: TD::Types::InternalLinkType::WebApp

Inherits:
TD::Types::InternalLinkType show all
Defined in:
lib/tdlib/types/internal_link_type/web_app.rb

Overview

The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then call searchWebApp with the

received bot and the given web_app_short_name.

Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn’t added yet, then show a disclaimer about Mini Apps

being third-party applications instead of the dialog and ask the user to accept their Terms of service.

If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#bot_usernameTD::Types::String

Username of the bot that owns the Web App.

Returns:

  • (TD::Types::String)

    the current value of bot_username



15
16
17
# File 'lib/tdlib/types/internal_link_type/web_app.rb', line 15

def bot_username
  @bot_username
end

#is_compactBoolean

True, if the Web App must be opened in the compact mode instead of the full-size mode.

Returns:

  • (Boolean)

    the current value of is_compact



15
16
17
# File 'lib/tdlib/types/internal_link_type/web_app.rb', line 15

def is_compact
  @is_compact
end

#start_parameterTD::Types::String

Start parameter to be passed to getWebAppLinkUrl.

Returns:

  • (TD::Types::String)

    the current value of start_parameter



15
16
17
# File 'lib/tdlib/types/internal_link_type/web_app.rb', line 15

def start_parameter
  @start_parameter
end

#web_app_short_nameTD::Types::String

Short name of the Web App.

Returns:

  • (TD::Types::String)

    the current value of web_app_short_name



15
16
17
# File 'lib/tdlib/types/internal_link_type/web_app.rb', line 15

def web_app_short_name
  @web_app_short_name
end