Sha256: dcb3f895ab1f6a54d19f835410074f3a147152f9233b98c3651863f25a64b1b5

Contents?: true

Size: 375 Bytes

Versions: 53

Compression:

Stored size: 375 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_api_token(username, password)
      request(
        :path   => "tokens",
        :method => :post,
        :body   => {email: username, password: password},
      )
    end
  end

  class Mock
    def get_api_token(username, password)
      response(
        :body => {"api_token" => self.api_token}
      )
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
ey-core-3.6.0.autoscaling1 lib/ey-core/requests/get_api_token.rb
ey-core-3.6.4 lib/ey-core/requests/get_api_token.rb
ey-core-3.6.3 lib/ey-core/requests/get_api_token.rb
ey-core-3.6.1 lib/ey-core/requests/get_api_token.rb
groove-ey-core-3.6.3 lib/ey-core/requests/get_api_token.rb
groove-ey-core-3.6.2 lib/ey-core/requests/get_api_token.rb
groove-ey-core-3.6.1 lib/ey-core/requests/get_api_token.rb
ey-core-3.5.0 lib/ey-core/requests/get_api_token.rb
ey-core-3.4.4 lib/ey-core/requests/get_api_token.rb
ey-core-3.4.2 lib/ey-core/requests/get_api_token.rb
ey-core-3.4.1 lib/ey-core/requests/get_api_token.rb
ey-core-3.4.0 lib/ey-core/requests/get_api_token.rb
ey-core-3.3.1 lib/ey-core/requests/get_api_token.rb
ey-core-3.3.0 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.6 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.5 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.4 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.3 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.2 lib/ey-core/requests/get_api_token.rb
ey-core-3.2.1 lib/ey-core/requests/get_api_token.rb