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.

29 lines
991 B

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