Class: Researchable::FreedcampApi::ListProjects
- Inherits:
-
Endpoint
- Object
- ActiveInteraction::Base
- Endpoint
- Researchable::FreedcampApi::ListProjects
- Defined in:
- lib/researchable/freedcamp_api/list_projects.rb
Instance Method Summary collapse
- #execute ⇒ Object private
-
#list_projects(project_id) ⇒ Object
sig do params( project_id: T.nilable(Integer) ).returns( T::Array ) end.
Instance Method Details
#execute ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/researchable/freedcamp_api/list_projects.rb', line 13 def execute list_projects(project_id) end |
#list_projects(project_id) ⇒ Object
sig do params( project_id: T.nilable(Integer) ).returns( T::Array ) end
24 25 26 27 28 29 30 |
# File 'lib/researchable/freedcamp_api/list_projects.rb', line 24 def list_projects(project_id) project_query = project_id ? "/#{project_id}" : '/' fetch_all('projects') do |limit, offset| session.get("/projects#{project_query}?limit=#{limit} &offset=#{offset}") end end |