From 6d3c0ae191bc13ac5372a143cd64d2c292da5990 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Wed, 30 Sep 2015 20:10:22 -0300 Subject: [PATCH] display articles voted by me --- lib/noosfero/api/v1/articles.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/noosfero/api/v1/articles.rb b/lib/noosfero/api/v1/articles.rb index 518b5cf..5debde7 100644 --- a/lib/noosfero/api/v1/articles.rb +++ b/lib/noosfero/api/v1/articles.rb @@ -126,6 +126,18 @@ module Noosfero end end + desc "Returns the articles I voted" do + detail 'Get the Articles I make a vote' + failure [[403, 'Forbidden']] + named 'ArticleFollowers' + end + + #FIXME refactor this method + get 'voted_by_me' do + present_articles_paginated(current_person.votes.collect(&:voteable)) +# present_articles(current_person, 'following_articles') + end + desc 'Perform a vote on a article by id' do detail 'Vote on a specific article with values: 1 (if you like) or -1 (if not)' params Noosfero::API::Entities::UserLogin.documentation -- libgit2 0.21.2