Module: ActiveCollab::API::Categories
- Included in:
- Client
- Defined in:
- lib/active_collab/api/categories.rb
Instance Method Summary collapse
Instance Method Details
#categories(project_id) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/active_collab/api/categories.rb', line 6 def categories(project_id) url = "#{@api_url}?path_info=/projects/#{project_id}/tasks/categories&auth_api_token=#{@api_key}" response = HTTParty.get(url) response_categories = response["categories"].first[1] categories = response_categories.collect do |c| ActiveCollab::Categorie.from_hash(c) end categories end |