Thes87
Cadet 2nd Year
- Registriert
- Sep. 2014
- Beiträge
- 29
Hat jemand einen Tipp wie ich diese API auslesen könnte?
Habe schon sehr viel ausprobiert..komme nicht weiter.
Sobald ich $scope.bilder = data.items angebe, zerschießt mir die App.
Da es kein Array ist, macht data.items['@attributes'].title; auch keinen Sinn.
Wer kann mir das erklären?
Ich möchte gern an title, media usw. rankommen
Wäre für jeden Tipp sehr dankbar!
JS:
HTML:
API:
Habe schon sehr viel ausprobiert..komme nicht weiter.
Sobald ich $scope.bilder = data.items angebe, zerschießt mir die App.
Da es kein Array ist, macht data.items['@attributes'].title; auch keinen Sinn.
Wer kann mir das erklären?
Ich möchte gern an title, media usw. rankommen
Wäre für jeden Tipp sehr dankbar!
JS:
....$rootScope.flickrData.success(function(data) {
$scope.bilder = data;
}...
HTML:
...{{bilder}}...
API:
({
"title": "Recent Uploads tagged hamburg",
"link": "http://www.flickr.com/photos/tags/hamburg/",
"description": "",
"modified": "2016-01-26T20:11:26Z",
"generator": "http://www.flickr.com/",
"items": [
{
"title": "piggies conquer Hamburg, Germany",
"link": "http://www.flickr.com/photos/lovepiepenbrinck/24631854555/",
"media": {"m":"http://farm2.staticflickr.com/1535/24631854555_8f1bd44c8a_m.jpg"},
"date_taken": "2016-01-16T16:25:09-08:00",
"description": " <p><a href="http://www.flickr.com/people/lovepiepenbrinck/">lovepiepenbrinck<\/a> posted a photo:<\/p> <p><a href="http://www.flickr.com/photos/lovepiepenbrinck/24631854555/" title="piggies conquer Hamburg, Germany"><img src="http://farm2.staticflickr.com/1535/24631854555_8f1bd44c8a_m.jpg" width="240" height="180" alt="piggies conquer Hamburg, Germany" /><\/a><\/p> ",
"published": "2016-01-26T20:11:26Z",
"author": "nobody@flickr.com (lovepiepenbrinck)",
"author_id": "59929210@N08",
"tags": "streetart pasteup art germany piggy pig sticker hamburg super urbanart installation funk hyper flowerpower piggies loveisallyouneed 2016 hyperhyper streetartlondon lovep cheekypig hamburgschanzejuliusstrasse urbanartstreetartartanimal loveplovepiepenbrincklovepiepenbrinckbigpiggieslondonwaterloostation lovepiepenbrinck streetarturbanartart loveplovepiepenbrincklovepiepenbrincklovepiepenbrinck pigpiggypiggiesanimal hamburghamburgstreetarthamburgstreetartstreetarthamburgstreetarthamburggermany"
},
{
"title": "bus",
"link": "http://www.flickr.com/photos/marigoeli/24336275280/",
"media": {"m":"http://farm2.staticflickr.com/1591/24336275280_75e0df52cd_m.jpg"},
"date_taken": "2016-01-08T16:35:40-08:00",
"description": " <p><a href="http://www.flickr.com/people/marigoeli/">Elisa Marigo<\/a> posted a photo:<\/p> <p><a href="http://www.flickr.com/photos/marigoeli/24336275280/" title="bus"><img src="http://farm2.staticflickr.com/1591/24336275280_75e0df52cd_m.jpg" width="160" height="240" alt="bus" /><\/a><\/p> <p>bus in Hamburgh<\/p>",
"published": "2016-01-26T20:09:02Z",
"author": "nobody@flickr.com (Elisa Marigo)",
"author_id": "82106710@N06",
"tags": "street city winter bus vintage hamburg d800"
},
{
"title": "shabby chic",
"link": "http://www.flickr.com/photos/andreasmueller/24522780582/",
"media": {"m":"http://farm2.staticflickr.com/1621/24522780582_4ae21ba9e5_m.jpg"},
"date_taken": "2016-01-24T12:54:03-08:00",
"description": " <p><a href="http://www.flickr.com/people/andreasmueller/">staring @ botany<\/a> posted a photo:<\/p> <p><a href="http://www.flickr.com/photos/andreasmueller/24522780582/" title="shabby chic"><img src="http://farm2.staticflickr.com/1621/24522780582_4ae21ba9e5_m.jpg" width="240" height="159" alt="shabby chic" /><\/a><\/p> <p>City Nord, Hamburg<\/p>",
"published": "2016-01-26T19:27:50Z",
"author": "nobody@flickr.com (staring @ botany)",
"author_id": "68057036@N08",
"tags": "old building architecture office post hamburg neglected dirty retro moderne yesterday unkempt scruffy citynord"
},
{
"title": "Night Moon",
"link": "http://www.flickr.com/photos/128489216@N07/24335446710/",
"media": {"m":"http://farm2.staticflickr.com/1619/24335446710_8415e8194f_m.jpg"},
"date_taken": "2016-01-26T20:14:07-08:00",
"description": " <p><a href="http://www.flickr.com/people/128489216@N07/">obscure.atmosphere<\/a> posted a photo:<\/p> <p><a href="http://www.flickr.com/photos/128489216@N07/24335446710/" title="Night Moon"><img src="http://farm2.staticflickr.com/1619/24335446710_8415e8194f_m.jpg" width="240" height="135" alt="Night Moon" /><\/a><\/p> <p>My Nature Seasons Trailer - <a href="https://www.youtube.com/watch?v=USV6mbBj3Fs" rel="nofollow">www.youtube.com/watch?v=USV6mbBj3Fs<\/a><\/p>",
"published": "2016-01-26T19:15:37Z",
"author": "nobody@flickr.com (obscure.atmosphere)",
"author_id": "128489216@N07",
"tags": "trees winter light sky paisajes naturaleza moon cold tree abandoned nature night clouds forest lune germany dark landscape deutschland mond noche licht cool woods heaven darkness nacht hiver hamburg natur selva himmel wolken luna evergreen bosque cielo lumiere nubes invierno nuages paysage 雲 region landschaft 自然 wald bäume nuit foret 冬 baum dunkel conifer 光 dunkelheit 밤 자연 ligero 景色 天 夜 숲 月 naturista 森林 cieux 겨울 하늘 klövensteen 구름 nadelbaum 빛 달 의풍경"
},
{
"title": "Umi Sonoda",
"link": "http://www.flickr.com/photos/bengun/24335211880/",
"media": {"m":"http://farm2.staticflickr.com/1508/24335211880_8e8af6f533_m.jpg"},
"date_taken": "2015-12-13T15:18:10-08:00",
"description": " <p><a href="http://www.flickr.com/people/bengun/">Ben Gun<\/a> posted a photo:<\/p> <p><a href="http://www.flickr.com/photos/bengun/24335211880/" title="Umi Sonoda"><img src="http://farm2.staticflickr.com/1508/24335211880_8e8af6f533_m.jpg" width="131" height="240" alt="Umi Sonoda" /><\/a><\/p> <p><b><br /> Models: <a href="https://www.model-kartei.de/sedcards/model/483498/capu/" rel="nofollow">Capu @ MK<\/a> / <a href="https://www.facebook.com/CapuChuPlay/" rel="nofollow">Capu @ FB<\/a> <br /> Cosplay: Umi Sonoda from the series <i>Love Live - School Idol Festival<\/i>.<br /> <\/b><br /> <br /> One last shot of our christmas cosplay shooting in dezember \'15 in the city of Hamburg.<\/p>",
"published": "2016-01-26T19:08:13Z",
"author": "nobody@flickr.com (Ben Gun)",
"author_id": "36418237@N06",
"tags": "christmas girls portrait girl rock weihnachten 50mm nikon colorful cosplay outdoor f14 edited flash hamburg gimp skirt wig mounted shooting weihnachtsbaum miniskirt onlocation chrismtas perrücke d7100"
}
]
})
Zuletzt bearbeitet: