Class: Digto::Client
- Inherits:
-
Object
- Object
- Digto::Client
- Defined in:
- lib/digto.rb
Overview
Client
Instance Attribute Summary collapse
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
Instance Method Summary collapse
-
#initialize(subdomain) ⇒ Client
constructor
A new instance of Client.
- #next ⇒ Object
Constructor Details
#initialize(subdomain) ⇒ Client
Returns a new instance of Client.
11 12 13 14 |
# File 'lib/digto.rb', line 11 def initialize(subdomain) @api_url = 'https://digto.org' @subdomain = subdomain end |
Instance Attribute Details
#api_url ⇒ Object
Returns the value of attribute api_url.
9 10 11 |
# File 'lib/digto.rb', line 9 def api_url @api_url end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
9 10 11 |
# File 'lib/digto.rb', line 9 def subdomain @subdomain end |
Instance Method Details
#next ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/digto.rb', line 16 def next url = "#{@api_url}/#{@subdomain}" res = HTTP.get(url) Digto.check_res_err(res) Session.new(url, res) end |