diff --git a/lib/api/v1/articles.rb b/lib/api/v1/articles.rb index 686f78e..4cd9eed 100644 --- a/lib/api/v1/articles.rb +++ b/lib/api/v1/articles.rb @@ -5,12 +5,12 @@ module API resource :articles do - # Collect comments from articles + # Collect articles # # Parameters: # from - date where the search will begin. If nothing is passed the default date will be the date of the first article created - # oldest - Collect the oldest comments from reference_id comment. If nothing is passed the newest comments are collected - # limit - amount of comments returned. The default value is 20 + # oldest - Collect the oldest articles. If nothing is passed the newest articles are collected + # limit - amount of articles returned. The default value is 20 # # Example Request: # 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 get do articles = select_filtered_collection_of(environment, 'articles', params) articles = articles.where(Article.display_filter(current_user.person, nil)[:conditions]) - present articles, :with => Entities::Article + present articles, :with => Entities::Article end desc "Return the article id" @@ -43,14 +43,14 @@ module API end - resource :communities do - segment '/:community_id' do + resource :communities do + segment '/:community_id' do resource :articles do get do community = environment.communities.find(params[:community_id]) articles = select_filtered_collection_of(community, 'articles', params) articles = articles.where(Article.display_filter(current_user.person, community)[:conditions]) - present articles, :with => Entities::Article + present articles, :with => Entities::Article end get '/:id' do @@ -81,7 +81,7 @@ module API end end - + end end end -- libgit2 0.21.2