Sha256: 9669514c8d5c997f9a704bb4de42f2eef6fdc7d4b058d696eabd2f85f6b57e6a
Contents?: true
Size: 400 Bytes
Versions: 11
Compression:
Stored size: 400 Bytes
Contents
require 'faraday' module ZooniverseSocial class Updater def initialize(host, path) @connection = Faraday.new host @path = path end 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 end end
Version data entries
11 entries across 11 versions & 1 rubygems