Class: AnswersEngine::CLI::GlobalPage
- Inherits:
-
Thor
- Object
- Thor
- AnswersEngine::CLI::GlobalPage
- Defined in:
- lib/answersengine/cli/global_page.rb
Instance Method Summary collapse
Instance Method Details
#content(gid) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/answersengine/cli/global_page.rb', line 12 def content(gid) client = Client::GlobalPage.new() result = JSON.parse(client.find_content(gid).to_s) if result['available'] == true puts "Preview content url: \"#{result['preview_url']}\"" `open "#{result['preview_url']}"` else puts "Content does not exist" end end |
#failedcontent(gid) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/answersengine/cli/global_page.rb', line 25 def failedcontent(gid) client = Client::GlobalPage.new() result = JSON.parse(client.find_failed_content(gid).to_s) if result['available'] == true puts "Preview failed content url: \"#{result['preview_url']}\"" `open "#{result['preview_url']}"` else puts "Failed Content does not exist" end end |
#show(gid) ⇒ Object
6 7 8 9 |
# File 'lib/answersengine/cli/global_page.rb', line 6 def show(gid) client = Client::GlobalPage.new() puts "#{client.find(gid)}" end |