|
| 1 | +module CreationJson |
| 2 | + def creation_json |
| 3 | + { |
| 4 | + "data"=>{ |
| 5 | + "id"=>"XIeQuGLw", |
| 6 | + "type"=>"creations", |
| 7 | + "attributes"=> creation_json_attributes, |
| 8 | + "relationships"=>{ |
| 9 | + "user"=>{ "data"=>{ "id"=>"xUt6Feou", "type"=>"users" } }, |
| 10 | + "creators"=>{ |
| 11 | + "data"=>[ |
| 12 | + { "id"=>"xUt6Feou", "type"=>"users" } |
| 13 | + ] |
| 14 | + }, |
| 15 | + "partner_application"=>{ "data"=>nil } |
| 16 | + } |
| 17 | + }, |
| 18 | + "included"=>[ |
| 19 | + { |
| 20 | + "id"=>"xUt6Feou", |
| 21 | + "type"=>"users", |
| 22 | + "attributes"=> user_json_attributes, |
| 23 | + "relationships"=>{ |
| 24 | + "school"=>{ "data"=>nil }, |
| 25 | + "custom_style"=> { "data"=>{ "id"=>"3584", "type"=>"custom_styles"} } |
| 26 | + } |
| 27 | + } |
| 28 | + ], |
| 29 | + "meta"=>{ "abilities"=>[], "user_bubbled_creations"=>[], "followed_users"=>[] } |
| 30 | + } |
| 31 | + end |
| 32 | + |
| 33 | + def creation_json_attributes |
| 34 | + { |
| 35 | + 'name' => 'A boat', |
| 36 | + "translated_names"=>[ |
| 37 | + { "code"=>"en", "name"=>"A boat", "original"=>true } |
| 38 | + ], |
| 39 | + "image"=>{ |
| 40 | + "links"=>{ |
| 41 | + "original"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/original/boat.jpg", |
| 42 | + "full_view"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/full_view/boat.jpg", |
| 43 | + "gallery_mobile"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/gallery_mobile/boat.jpg", |
| 44 | + "list_view_retina"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/list_view_retina/boat.jpg", |
| 45 | + "share"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/share/boat.jpg", |
| 46 | + "list_view"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/list_view/boat.jpg", |
| 47 | + "matrix_view_retina"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/matrix_view_retina/boat.jpg", |
| 48 | + "matrix_view"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/matrix_view/boat.jpg", |
| 49 | + "explore_mobile"=>"https://api.creatubbles.com/v2/creation/XIeQuGLw/explore_mobile/boat.jpg" |
| 50 | + } |
| 51 | + }, |
| 52 | + "image_status"=>3, |
| 53 | + "approved"=>true, |
| 54 | + "approval_status"=>"approved", |
| 55 | + "created_at_age"=>"at 14y", |
| 56 | + "created_at_age_per_creator"=>{"xUt6Feou"=>nil}, |
| 57 | + "reflection_text"=> 'My reflection', |
| 58 | + "reflection_video_url"=>nil, |
| 59 | + "play_iframe_url"=>nil, |
| 60 | + "obj_file_url"=>nil, |
| 61 | + "bubbles_count"=>1, |
| 62 | + "comments_count"=>0, |
| 63 | + "views_count"=>5, |
| 64 | + "last_bubbled_at"=>"2017-01-25T14:07:54.202+01:00", |
| 65 | + "last_commented_at"=>nil, |
| 66 | + "last_submitted_at"=>nil, |
| 67 | + 'short_url' => "https://ctbl.es/XIeQuGLw", |
| 68 | + "content_type"=>"video/quicktime", |
| 69 | + "tags" => [ 'School', 'Animals' ], |
| 70 | + "created_at"=>"2017-01-23T16:24:08.112+01:00", |
| 71 | + "updated_at"=>"2017-01-25T14:07:54.252+01:00" |
| 72 | + } |
| 73 | + end |
| 74 | +end |
0 commit comments