Commit 662484b4138d6f2ecff814afbeed7952187ac59a

Authored by Aurélio A. Heckert
1 parent 2077d2b6

add a description to People API

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
lib/noosfero/api/v1/people.rb
@@ -4,6 +4,8 @@ module Noosfero @@ -4,6 +4,8 @@ module Noosfero
4 class People < Grape::API 4 class People < Grape::API
5 before { authenticate! } 5 before { authenticate! }
6 6
  7 + desc 'API Root'
  8 +
7 resource :people do 9 resource :people do
8 10
9 # -- A note about privacy -- 11 # -- A note about privacy --
@@ -26,6 +28,8 @@ module Noosfero @@ -26,6 +28,8 @@ module Noosfero
26 # Example Request: 28 # Example Request:
27 # GET /people?from=2013-04-04-14:41:43&until=2014-04-04-14:41:43&limit=10 29 # GET /people?from=2013-04-04-14:41:43&until=2014-04-04-14:41:43&limit=10
28 # GET /people?reference_id=10&limit=10&oldest 30 # GET /people?reference_id=10&limit=10&oldest
  31 +
  32 + desc "Find environment's people"
29 get do 33 get do
30 people = select_filtered_collection_of(environment, 'people', params) 34 people = select_filtered_collection_of(environment, 'people', params)
31 people = people.visible_for_person(current_person) 35 people = people.visible_for_person(current_person)