Class: Roster::Base
- Inherits:
-
Object
- Object
- Roster::Base
- Defined in:
- lib/roster/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token) ⇒ Base
constructor
A new instance of Base.
- #myself ⇒ Object
Constructor Details
#initialize(token) ⇒ Base
Returns a new instance of Base.
15 16 17 |
# File 'lib/roster/base.rb', line 15 def initialize(token) @token = token end |
Class Method Details
.get_login_url ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/roster/base.rb', line 5 def self.get_login_url url = URI.parse(Configuration.instance.endpoint) res = Net::HTTP.start(url.host, url.port) do |http| http.get('/') end raise if res.code != "302" res['location'] end |
Instance Method Details
#myself ⇒ Object
19 20 21 |
# File 'lib/roster/base.rb', line 19 def myself request '/myself' end |