Class: TagParser
- Inherits:
-
Object
- Object
- TagParser
- Defined in:
- lib/nexmo_developer/app/services/tag_parser.rb
Constant Summary collapse
- TAGS_WITH_ICON =
def self.fetch_all_categories
JSON.parse(File.read(PATH_TO_CATEGORIES))
end
[ 'dispatch-api', 'messages-api', 'messages-api-sandbox', 'number-insight-api', 'number-api', 'reports-api', 'account-api', 'pricing-api', 'external-accounts-api', 'redact-api', 'audit-api', 'verify-api', 'media-api', 'voice-api', 'conversation-api', 'video-api', 'sms-api', 'station', 'spotlight', 'voyagers', ].freeze
Class Method Summary collapse
Class Method Details
.fetch_blogposts_with_tag(tag) ⇒ Object
33 34 35 36 37 |
# File 'lib/nexmo_developer/app/services/tag_parser.rb', line 33 def self.fetch_blogposts_with_tag(tag) blogposts_hash = JSON.parse(File.read(BlogpostParser::PATH_TO_INDEX)) blogposts_hash.select { |b| b['tags'].include?(tag) && b['published'] && !b['outdated'] } end |