Module: IC
- Defined in:
- lib/inat-channel/api.rb,
lib/inat-channel/data.rb,
lib/inat-channel/icons.rb,
lib/inat-channel/config.rb,
lib/inat-channel/logger.rb,
lib/inat-channel/message.rb,
lib/inat-channel/version.rb,
lib/inat-channel/telegram.rb,
lib/inat-channel/template.rb,
lib/inat-channel/data_types.rb,
lib/inat-channel/data_convert.rb
Constant Summary collapse
- TAXA_ICONS =
INatChannel::Icons::TAXA_ICONS
- ICONS =
INatChannel::Icons::ICONS
- CONFIG =
INatChannel::Config::config
- VERSION =
INatChannel::VERSION
- SANITIZE_HTML_CONFIG =
{ elements: [ 'b', 'strong', 'i', 'em', 'u', 's', 'strike', 'del', 'a', 'code', 'pre', 'tg-spoiler', 'blockquote' ], attributes: { 'a' => [ 'href' ] }, protocols: { 'a' => { 'href' => [ 'http', 'https', 'mailto', 'tg' ] } }, remove_contents: [ 'script', 'style' ] }
- SANITIZE_TEXT_CONFIG =
{ elements: [], remove_contents: [ 'script', 'style' ] }
Class Method Summary collapse
- .ancestors_icon(ancestor_ids) ⇒ Object
- .clock_icon(time) ⇒ Object
- .confirm_sending!(msg_id) ⇒ Object
- .convert_observation(source) ⇒ Object
- .list_photos(observation) ⇒ Object
- .load_news ⇒ Object
- .load_observation(uuid) ⇒ Object
- .logger ⇒ Object
- .make_message(observation) ⇒ Object
- .notify_admin(text) ⇒ Object
- .revert_sending! ⇒ Object
- .save_data ⇒ Object
- .select_uuid(fresh) ⇒ Object
- .send_observation(observation) ⇒ Object
- .taxon_icon(taxon) ⇒ Object
Instance Method Summary collapse
Class Method Details
.ancestors_icon(ancestor_ids) ⇒ Object
125 126 127 |
# File 'lib/inat-channel/icons.rb', line 125 def ancestors_icon ancestor_ids INatChannel::Icons::ancestors_icon ancestor_ids end |
.clock_icon(time) ⇒ Object
129 130 131 |
# File 'lib/inat-channel/icons.rb', line 129 def clock_icon time INatChannel::Icons::clock_icon time end |
.confirm_sending!(msg_id) ⇒ Object
315 316 317 |
# File 'lib/inat-channel/data.rb', line 315 def confirm_sending! msg_id INatChannel::Storage::confirm! msg_id end |
.convert_observation(source) ⇒ Object
102 103 104 |
# File 'lib/inat-channel/data_convert.rb', line 102 def convert_observation source INatChannel::DataConvert::convert_observation source end |
.list_photos(observation) ⇒ Object
40 41 42 |
# File 'lib/inat-channel/message.rb', line 40 def list_photos observation INatChannel::Message::list_photos observation end |
.load_news ⇒ Object
117 118 119 |
# File 'lib/inat-channel/api.rb', line 117 def load_news INatChannel::API::load_news end |
.load_observation(uuid) ⇒ Object
121 122 123 |
# File 'lib/inat-channel/api.rb', line 121 def load_observation uuid INatChannel::API::load_observation uuid end |
.logger ⇒ Object
29 30 31 |
# File 'lib/inat-channel/logger.rb', line 29 def logger INatChannel::Logger::logger end |
.make_message(observation) ⇒ Object
36 37 38 |
# File 'lib/inat-channel/message.rb', line 36 def observation INatChannel::Message:: observation end |
.notify_admin(text) ⇒ Object
100 101 102 |
# File 'lib/inat-channel/telegram.rb', line 100 def notify_admin text INatChannel::Telegram::notify_admin text end |
.revert_sending! ⇒ Object
319 320 321 |
# File 'lib/inat-channel/data.rb', line 319 def revert_sending! INatChannel::Storage::revert! end |
.save_data ⇒ Object
311 312 313 |
# File 'lib/inat-channel/data.rb', line 311 def save_data INatChannel::Storage::save end |
.select_uuid(fresh) ⇒ Object
307 308 309 |
# File 'lib/inat-channel/data.rb', line 307 def select_uuid fresh INatChannel::Storage::select_uuid fresh end |
.send_observation(observation) ⇒ Object
96 97 98 |
# File 'lib/inat-channel/telegram.rb', line 96 def send_observation observation INatChannel::Telegram::send_observation observation end |
.taxon_icon(taxon) ⇒ Object
121 122 123 |
# File 'lib/inat-channel/icons.rb', line 121 def taxon_icon taxon INatChannel::Icons::taxon_icon taxon end |
Instance Method Details
#default_template ⇒ Object
102 103 104 |
# File 'lib/inat-channel/template.rb', line 102 def default_template INatChannel::Template::default end |
#load_list(**query) ⇒ Object
125 126 127 |
# File 'lib/inat-channel/api.rb', line 125 def load_list **query INatChannel::API::load_list(**query) end |
#load_template(path) ⇒ Object
98 99 100 |
# File 'lib/inat-channel/template.rb', line 98 def load_template path INatChannel::Template::load path end |