Sha256: 76086bf342e2eed318444e0b27715f45b6aa35f4c3476114d5049af3ed1732bd
Contents?: true
Size: 550 Bytes
Versions: 4
Compression:
Stored size: 550 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib)) require 'fanswatch' page_id = ARGV[0] || ENV['FB_PAGE_ID'] unless page_id puts 'USAGE: fanswatch [page_id]' exit(1) end page = FansWatch::Page.find(id: page_id) puts page.name puts Array.new(page.name.length) { '-' }.join page.feed.postings.first(3).each.with_index do |post, index| print "#{index + 1}: " puts post.message ? post.message : '(blank)' puts "Attached: #{post.attachment.url}" if post.attachment puts end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fanswatch-0.1.4 | bin/fanswatch |
fanswatch-0.1.3 | bin/fanswatch |
fanswatch-0.1.2 | bin/fanswatch |
fanswatch-0.1.1 | bin/fanswatch |