You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
862 B

8 years ago
  1. attributes :id, :created_at, :in_reply_to_id, :sensitive, :visibility
  2. node(:uri) { |status| TagManager.instance.uri_for(status) }
  3. node(:content) { |status| Formatter.instance.format(status) }
  4. node(:url) { |status| TagManager.instance.url_for(status) }
  5. node(:reblogs_count) { |status| defined?(@reblogs_counts_map) ? (@reblogs_counts_map[status.id] || 0) : status.reblogs.count }
  6. node(:favourites_count) { |status| defined?(@favourites_counts_map) ? (@favourites_counts_map[status.id] || 0) : status.favourites.count }
  7. child :account do
  8. extends 'api/v1/accounts/show'
  9. end
  10. child :media_attachments, object_root: false do
  11. extends 'api/v1/statuses/_media'
  12. end
  13. child :mentions, object_root: false do
  14. extends 'api/v1/statuses/_mention'
  15. end
  16. child :tags, object_root: false do
  17. extends 'api/v1/statuses/_tags'
  18. end