55 lines
1.2 KiB
Ruby
55 lines
1.2 KiB
Ruby
object @recording
|
|
|
|
attributes :id, :band, :created_at, :duration, :comment_count, :like_count, :play_count
|
|
|
|
child(:band => :band) {
|
|
attributes :id, :name, :location, :photo_url
|
|
}
|
|
|
|
child(:owner => :owner) {
|
|
attributes :id, :name, :location, :photo_url
|
|
}
|
|
|
|
child(:mixes => :mixes) {
|
|
attributes :id, :is_completed
|
|
|
|
node :mp3_url do |mix|
|
|
mix[:mp3_url]
|
|
end
|
|
|
|
node :ogg_url do |mix|
|
|
mix[:ogg_url]
|
|
end
|
|
}
|
|
|
|
child(:recorded_tracks => :recorded_tracks) {
|
|
attributes :id, :fully_uploaded, :client_track_id, :client_id, :instrument_id
|
|
|
|
node :url do |recorded_track|
|
|
recorded_track[:url]
|
|
end
|
|
|
|
child(:user => :user) {
|
|
attributes :id, :first_name, :last_name, :city, :state, :country, :location, :photo_url
|
|
}
|
|
}
|
|
|
|
child(:comments => :comments) {
|
|
attributes :comment, :created_at
|
|
|
|
child(:user => :creator) {
|
|
attributes :id, :first_name, :last_name, :photo_url
|
|
}
|
|
}
|
|
|
|
child(:claimed_recordings => :claimed_recordings) {
|
|
|
|
attributes :id, :name, :description, :is_public, :is_downloadable, :genre_id
|
|
|
|
node :share_url do |claimed_recording|
|
|
unless claimed_recording.share_token.nil?
|
|
share_token_url(claimed_recording.share_token.token)
|
|
end
|
|
end
|
|
}
|