Class: DssReuters::User

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/dss_reuters.rb

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ User

Returns a new instance of User.



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/dss_reuters.rb', line 47

def initialize(session)
  @session = session
  path = "/RestApi/v1/Users/Users(#{Config::DSS_USERNAME})"
  options = {
    headers: {
      "Prefer" => "respond-async",
      "Authorization" => "Token #{@session.token}"
    }
  }
  resp = self.class.get path, options
  @session.logger.debug resp
end