module AP::Client::Category
Public Instance Methods
categories()
click to toggle source
Returns an array of AP::Category
objects representing the news categories
# File lib/ap/client/category.rb, line 5 def categories self.class.get("/v2/categories.svc/")["feed"]["entry"].collect { |e| AP::Category.new_from_api_data(e) } end
category(id)
click to toggle source
Returns an array of AP::Articles objects representing recent news in a category
# File lib/ap/client/category.rb, line 10 def category(id) self.class.get("/v2/categories.svc/#{id}")["feed"]["entry"].collect { |e| AP::Article.new_from_api_data(e) } end