module BbcRadioNames
Access to BBC Radio network names and information
Version number for the current BbcNetworkNames module
Constants
- ALL_NETWORKS
- LOCALS
- NATIONALS
- NATIONS
- NETWORK_TYPES
- VERSION
Public Class Methods
get_network_id(network_name)
click to toggle source
Looks up a network ID by network name
# File lib/bbc-radio-names.rb, line 292 def self.get_network_id(network_name) ALL_NETWORKS[network_name][:bbc_id] end
get_network_key(network_name)
click to toggle source
Looks up a network key by network name
# File lib/bbc-radio-names.rb, line 287 def self.get_network_key(network_name) ALL_NETWORKS[network_name][:bbc_key] end
list_networks()
click to toggle source
Returns an array of all networks' user friendly names
# File lib/bbc-radio-names.rb, line 297 def self.list_networks ALL_NETWORKS.keys end
random_network_name(type = 'all_networks')
click to toggle source
Returns a random network name
# File lib/bbc-radio-names.rb, line 302 def self.random_network_name(type = 'all_networks') if type == 'all_networks' network_type = NETWORK_TYPES.keys.sample NETWORK_TYPES[network_type].keys.sample else NETWORK_TYPES[type].keys.sample end end