lib/qiita_trend/trend.rb in qiita_trend-0.2.4 vs lib/qiita_trend/trend.rb in qiita_trend-0.2.5
- old
+ new
@@ -20,12 +20,14 @@
@data.each_with_object([]) do |trend, value|
result = {}
result['title'] = trend['node']['title']
result['user_name'] = trend['node']['author']['urlName']
result['user_image'] = trend['node']['author']['profileImageUrl']
+ result['user_page'] = "#{Page::QIITA_URI}#{trend['node']['author']['urlName']}"
+ result['article'] = "#{Page::QIITA_URI}#{trend['node']['author']['urlName']}/items/#{trend['node']['uuid']}"
+ result['created_at'] = trend['node']['createdAt']
result['likes_count'] = trend['node']['likesCount']
result['is_new_arrival'] = trend['isNewArrival']
- result['article'] = "#{Page::QIITA_URI}#{trend['node']['author']['urlName']}/items/#{trend['node']['uuid']}"
value << result
end
end
def new_items