闭社主体 forked from https://github.com/tootsuite/mastodon
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.

27 lines
958 B

8 years ago
  1. attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id, :sensitive, :spoiler_text, :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 :application do
  8. extends 'api/v1/apps/show'
  9. end
  10. child :account do
  11. extends 'api/v1/accounts/show'
  12. end
  13. child :media_attachments, object_root: false do
  14. extends 'api/v1/statuses/_media'
  15. end
  16. child :mentions, object_root: false do
  17. extends 'api/v1/statuses/_mention'
  18. end
  19. child :tags, object_root: false do
  20. extends 'api/v1/statuses/_tags'
  21. end