class ZooniverseSocial::Updater
Public Class Methods
new(host, path)
click to toggle source
# File lib/zooniverse_social/updater.rb, line 5 def initialize(host, path) @connection = Faraday.new host @path = path end
Public Instance Methods
update(*args)
click to toggle source
# File lib/zooniverse_social/updater.rb, line 10 def update(*args) response = @connection.get(@path, *args) do |req| req.headers['Accept'] = 'application/json' req.headers['Content-Type'] = 'application/json' end JSON.parse response.body end