Sha256: db4eba3d2866556a60e29b159ebd86bb72598863735ea54463bf3bdfdafd5037
Contents?: true
Size: 528 Bytes
Versions: 9
Compression:
Stored size: 528 Bytes
Contents
require "faraday" # @private module FaradayMiddleware # @private class PocketOAuth < Faraday::Middleware def call(env) env[:body] = {} if env[:body].nil? env[:body] = env[:body].merge(consumer_key: @consumer_key) if @access_token env[:body] = env[:body].merge(access_token: @access_token) end @app.call env end def initialize(app, consumer_key, access_token = nil) @app = app @consumer_key = consumer_key @access_token = access_token end end end
Version data entries
9 entries across 9 versions & 2 rubygems