Class: Roistat::Resources::Projects
- Defined in:
- lib/roistat/resources/projects.rb,
sig/roistat.rbs
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#counter_list ⇒ Object
POST /project/settings/counter/list — same product idea as modules_list; listed on help-en.
-
#create(name:, currency:) ⇒ Object
POST /account/project/create — API key only.
-
#list ⇒ Object
GET /user/projects — API key only.
-
#modules_list(method: :get) ⇒ Object
GET|POST /project/settings/module/list — project-scoped (help-ru).
Methods inherited from Base
Constructor Details
This class inherits a constructor from Roistat::Resources::Base
Instance Method Details
#counter_list ⇒ Object
POST /project/settings/counter/list — same product idea as modules_list; listed on help-en.
27 28 29 |
# File 'lib/roistat/resources/projects.rb', line 27 def counter_list client.post("project/settings/counter/list") end |
#create(name:, currency:) ⇒ Object
POST /account/project/create — API key only.
10 11 12 |
# File 'lib/roistat/resources/projects.rb', line 10 def create(name:, currency:) api_key_client.post("account/project/create", body: {name: name, currency: currency}) end |
#list ⇒ Object
GET /user/projects — API key only.
5 6 7 |
# File 'lib/roistat/resources/projects.rb', line 5 def list api_key_client.get("user/projects") end |
#modules_list(method: :get) ⇒ Object
GET|POST /project/settings/module/list — project-scoped (help-ru).
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/roistat/resources/projects.rb', line 15 def modules_list(method: :get) case method.to_sym when :get client.get("project/settings/module/list") when :post client.post("project/settings/module/list") else raise ArgumentError, "method must be :get or :post" end end |