Sha256: 6750d96c6a4e7c881a1ac8a145da9648b138bf269912bf26ee61d66b730e13e9

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

module SyoboiCalendar
  class Connector
    URL = "http://cal.syoboi.jp/"
    PATH = "/db.php"

    def get(query)
      connection.get(path, query)
    end

    def connection
      @connection ||= Faraday.new(url: url) do |connection|
        connection.adapter :net_http
        connection.response :mashify
        connection.response :xml
        connection.response :raise_error
      end
    end

    def path
      PATH
    end

    def url
      URL
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
syoboi_calendar-0.4.0 lib/syoboi_calendar/connector.rb
syoboi_calendar-0.3.1 lib/syoboi_calendar/connector.rb
syoboi_calendar-0.3.0 lib/syoboi_calendar/connector.rb