Class: LearnProxy::Client
- Inherits:
-
Object
- Object
- LearnProxy::Client
- Defined in:
- lib/common_tools/learn_proxy.rb
Constant Summary collapse
- CSV_URL =
-> (batch_id) {"https://learn.co/batches/#{batch_id}/students.csv"}
Instance Method Summary collapse
- #csv_for(batch_id) ⇒ Object
-
#initialize(credentials) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(credentials) ⇒ Client
Returns a new instance of Client.
9 10 11 |
# File 'lib/common_tools/learn_proxy.rb', line 9 def initialize(credentials) @credentials = credentials end |
Instance Method Details
#csv_for(batch_id) ⇒ Object
13 14 15 |
# File 'lib/common_tools/learn_proxy.rb', line 13 def csv_for(batch_id) connection.get(CSV_URL[batch_id]).body end |