Sha256: 96f98b8a4c928bae43f538a59f53c965cdd009f1902ff46ce6b1d3fc9e1a1261

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

require 'pushbullet/http_exception.rb'
require 'pushbullet/parse_json.rb'

module Pushbullet
  module Connection
    private
    def connection
      @connection ||= Faraday.new(url: 'https://api.pushbullet.com/') do |f|
        f.request :basic_auth, api_key, ''
        f.request :multipart
        f.request :url_encoded

        f.response :logger

        f.use Pushbullet::ParseJSON
        f.use Pushbullet::HttpException

        f.adapter :net_http
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pushbullet-0.0.2 lib/pushbullet/connection.rb