Class: Datahen::CLI::GlobalPage
- Inherits:
-
Thor
- Object
- Thor
- Datahen::CLI::GlobalPage
- Defined in:
- lib/datahen/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 23 24 25 |
# File 'lib/datahen/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']}\"" begin `open "#{result['preview_url']}"` rescue end else puts "Content does not exist" end end |
#show(gid) ⇒ Object
6 7 8 9 |
# File 'lib/datahen/cli/global_page.rb', line 6 def show(gid) client = Client::GlobalPage.new() puts "#{client.find(gid)}" end |