Я использую Yammer RESTful API с AngularJS. Мне удалось заставить API-интерфейс yammer user.json работать, но мне нужно руководство по использованию и отображению API-интерфейса yammer messages.json. Если бы кто-нибудь мог помочь с синтаксисом области видимости, это было бы здорово.
Разобрать json для возврата сообщений > body > rich Вот код:
Контроллер
function YammerGetUserCtrl($scope, $http ) {
$http.get('https://api.yammer.com/api/v1/messages.json', {headers: {'Authorization': 'Bearer xxxxxxxxxxxxxxx'}}).
success(function(data) {
$scope.users = data;
console.log($scope.users)
});
}
JSON
{
"threaded_extended": {},
"messages": [
{
"id": 654897910,
"sender_id": 1506696042,
"replied_to_id": null,
"created_at": "2016/02/12 20:55:02 +0000",
"network_id": 11319,
"message_type": "update",
"sender_type": "user",
"url": "https://www.yammer.com/api/v1/messages/654897910",
"web_url": "https://www.yammer.com/arrow.com/messages/654897910",
"body": {
"urls": [
"https://www.youtube.com/watch?v=yueP7V6Wddc&index=7&list=PLKsggbHA8DermEtbMcC80M38cuR5rFdgi"
],
"parsed": "Our shiny new aerospace [[tag:8909387]] that ran in Colorado markets during Super Bowl 50 is going viral! In less than one week since broadcast, we have more than 414,000 views on YouTube, increasing by thousands an hour. The [[tag:8898375]] has caught media attention around the world in the UK, Ireland, Australia, Germany and more. Even mention by MIT Media Lab.\n\nhttps://www.youtube.com/watch?v=yueP7V6Wddc&index=7&list=PLKsggbHA8DermEtbMcC80M38cuR5rFdgi",
"plain": "Our shiny new aerospace #ad that ran in Colorado markets during Super Bowl 50 is going viral! In less than one week since broadcast, we have more than 414,000 views on YouTube, increasing by thousands an hour. The #video has caught media attention around the world in the UK, Ireland, Australia, Germany and more. Even mention by MIT Media Lab.\n\nhttps://www.youtube.com/watch?v=yueP7V6Wddc&index=7&list=PLKsggbHA8DermEtbMcC80M38cuR5rFdgi",
"rich": "Our shiny new aerospace <span class='yammer-object' data-yammer-object='tag:8909387' data-resource-id='8909387' data-resource-model='tag'>#<a href='https://www.yammer.com/arrow.com/topics/11782336'>ad</a></span> that ran in Colorado markets during Super Bowl 50 is going viral! In less than one week since broadcast, we have more than 414,000 views on YouTube, increasing by thousands an hour. The <span class='yammer-object' data-yammer-object='tag:8898375' data-resource-id='8898375' data-resource-model='tag'>#<a href='https://www.yammer.com/arrow.com/topics/8400514'>video</a></span> has caught media attention around the world in the UK, Ireland, Australia, Germany and more. Even mention by MIT Media Lab.<br><br><a class=\"linkified\" href=\"https://www.youtube.com/watch?v=yueP7V6Wddc&index=7&list=PLKsggbHA8DermEtbMcC80M38cuR5rFdgi\" title=\"https://www.youtube.com/watch?v=yueP7V6Wddc&index=7&list=PLKsggbHA8DermEtbMcC80M38cuR5rFdgi\" target=\"_blank\"
.....
}
Поэтому я хотел бы отобразить URL-адрес и богатый отрывок из тела. Как мне это сделать?