Commit 294b2f50d8219e03419f351a5557e785d0fcd493

Authored by Victor Costa
Committed by Rodrigo Souto
1 parent 7f14c33d

api: fix documentation for articles

Showing 1 changed file with 8 additions and 8 deletions   Show diff stats
lib/api/v1/articles.rb
... ... @@ -5,12 +5,12 @@ module API
5 5  
6 6 resource :articles do
7 7  
8   - # Collect comments from articles
  8 + # Collect articles
9 9 #
10 10 # Parameters:
11 11 # from - date where the search will begin. If nothing is passed the default date will be the date of the first article created
12   - # oldest - Collect the oldest comments from reference_id comment. If nothing is passed the newest comments are collected
13   - # limit - amount of comments returned. The default value is 20
  12 + # oldest - Collect the oldest articles. If nothing is passed the newest articles are collected
  13 + # limit - amount of articles returned. The default value is 20
14 14 #
15 15 # Example Request:
16 16 # GET /api/v1/articles?from=2013-04-04-14:41:43&until=2014-04-04-14:41:43&limit=10&content_type=Hub
... ... @@ -20,7 +20,7 @@ module API
20 20 get do
21 21 articles = select_filtered_collection_of(environment, 'articles', params)
22 22 articles = articles.where(Article.display_filter(current_user.person, nil)[:conditions])
23   - present articles, :with => Entities::Article
  23 + present articles, :with => Entities::Article
24 24 end
25 25  
26 26 desc "Return the article id"
... ... @@ -43,14 +43,14 @@ module API
43 43  
44 44 end
45 45  
46   - resource :communities do
47   - segment '/:community_id' do
  46 + resource :communities do
  47 + segment '/:community_id' do
48 48 resource :articles do
49 49 get do
50 50 community = environment.communities.find(params[:community_id])
51 51 articles = select_filtered_collection_of(community, 'articles', params)
52 52 articles = articles.where(Article.display_filter(current_user.person, community)[:conditions])
53   - present articles, :with => Entities::Article
  53 + present articles, :with => Entities::Article
54 54 end
55 55  
56 56 get '/:id' do
... ... @@ -81,7 +81,7 @@ module API
81 81 end
82 82  
83 83 end
84   -
  84 +
85 85 end
86 86 end
87 87 end
... ...