We are integrating Yammer with our web application. One of our requirement it to display the my yammer feeds and the feeds of topics which I am following. We are using yammer widget in yam.connect.embedFeed() our pages. Is there any way to do the filtering?
Is there any modification possible in the below code to achieve this?
yam.connect.embedFeed({
"feedType": "user",
"feedId": 1530760345,
"config": {
"use_sso": false,
"header": true,
"footer": true,
"showOpenGraphPreview": false,
"defaultToCanonical": false,
"hideNetworkName": false
},
"container": "#embedded-feed"
});
You can change feedType to topic, and set the feedID to the topic ID. This will show all messages with a particular topic ID. More user-specific filtering is not supported.
Related
I would like to use Google Analytics from a script (using explicit HTTP requests) and understand that Google Analytics 4 with the Measurement Protocol would be the way to go. I have created a new Property, added a Web tag and created an API key for the Measurement Protocol there. Then I send this request:
{
"client_id": "Test-User",
"user_id": "test_user_id",
"events": [
{
"name": "MyEvent",
"params": {}
}
]
}
To this URL: https://www.google-analytics.com/mp/collect?measurement_id=G-LQDLGRLGZS&api_secret=JXGZ_CyvTt29ucNi9y0DkA
The measurement gets logged there in a corner of the report:
These events don't show up as users. And in reports I don't quite see how to analyze these events. Is there some way to track user sessions by sending special events?
I had the same problem and the answer is here
GA4 Measurement Protocol returns events not the users
Under the events branch of the JSON, when I added
"engagement_time_msec" : 1
the users started to be counted.
"events" : [{
"name" : "SoftMeter_event",
"params" : {
"action" : "From UA-xxxxx [muted]",
"engagement_time_msec" : 1,
"label" : "SoftMeter-dev/v1.0.2/lib v1.4.4 DEBUG"
}
}],
The Measurement Protocol V4 is for GA4 properties(which is also the
one you are using).
According to the official document:
https://support.google.com/analytics/answer/9408920 It says "Google
Analytics 4 properties counts users who engaged with your app/site for
any non-zero amount of time during the previous 30 minutes".
GA4 uses "engagement_time_msec" parameter to identify user interaction
time. This explains why you can see the number of events but not the
number of users. If you want users sent from MP to be counted as
active user, simply add the "engagement_time_msec" parameter to your
event.
client_id is wrong. This id is set by google, so you should get your real id.
You can get it from your cookies for testing. Or, if you use gtag.js you can add this code to your web page.
<script>
gtag('get', <yourMeasurementID>, 'client_id', (clientID) => {
// here you can use clientID
});
</script>
We're building a web based self service for our employees, to speed up/improve everyones DevOps experience. The self service utilizes the Azure Devops REST API and most of it works fine but as I'm about to implement the branch policies I get stuck for lack of documentation (or my inability to find it).
I think I have found what documentation is available for creating policy configurations, like this article. There's just a general mention of "settings" needs to be a JObject and then seven examples for various scenarios but if there are any reference articles for the 14 supported policy types then I have missed it.
Am I just blind or did Microsoft just not bother with documenting how to form the JObjects for the different kinds of configurations?
Azure Devops REST API documentation for policies is missing?
For me, I am more inclined that the document does not explicitly point out the content of JObject.
When we check that REST API document Configurations - Create, we could get following info:
Indeed, it only states that its type is a JSON object without specific content or examples.
To get the content of this JSON object, I use the REST API Configurations - Get to get the content of the Response body, I could get following response body:
"settings": {
"minimumApproverCount": 2,
"creatorVoteCounts": false,
"allowDownvotes": false,
"resetOnSourcePush": false,
"requireVoteOnLastIteration": false,
"resetRejectionsOnSourcePush": false,
"blockLastPusherVote": false,
"scope": [
{
"refName": "refs/heads/Dev",
"matchKind": "Exact",
"repositoryId": "dcb40ef6-dae0-4e3c-b581-2f71c76e09a6"
}
]
},
So, we could to know the content is indeed a JSON object and it will be different due to the different policies we set.
Now, we move back to the samples in that document, we could find that there are many such settings, like:
Approval count policy:
{
"isEnabled": true,
"isBlocking": false,
"type": {
"id": "fa4e907d-c16b-4a4c-9dfa-4906e5d171dd"
},
"settings": {
"minimumApproverCount": 1,
"creatorVoteCounts": false,
"scope": [
{
"repositoryId": null,
"refName": "refs/heads/master",
"matchKind": "exact"
}
]
}
}
If we want to set any other supported policy types, we can manually set it on the UI, and then get the corresponding response body about it.
Following the instructions on this page Working with users, groups, and items—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers and the Add Item documentation I was able build a POST request in POSTMAN to add a new item to the user.
After getting the token, when I try the POST request to add the web map I get this error
{"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
This is the JSON that contain some simple Web Map data,
{
"operationalLayers": [],
"baseMap": {
"baseMapLayers": [
{
"id": "defaultBasemap",
"layerType": "ArcGISTiledMapServiceLayer",
"url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
"visibility": true,
"opacity": 1,
"title": "Topographic"
}
],
"title": "Topographic"
},
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"authoringApp": "WebMapViewer",
"authoringAppVersion": "5.4",
"version": "2.11"
}
I was using the wrong access token.
I was using the access token I had for the app I was testing instead of the user's access token that I had to get with oauth2.
I'm leaving this here for future newbies.
I am trying to paginate the track list of a set/playlist obtained via soundcloud JSON API. Pagination technique described here works fine if I want to generate tracklist of x number of tracks for next page only. What I am trying to do is to make a numbered pagination with multiple page links. I didn't find any parameter such as "track_count" which returns the total number of tracks for "/user/tracks". So, can anyone give me any insights on making a numbered pagination for a playlist when getting data via soundcloud JSON API? thanks
/users endpoint has "track_count" property in the returned representation of user:
$ curl "http://api.soundcloud.com/users/3207.json?client_id=YOUR_CLIENT_ID"
{
"id": 3207,
"permalink": "jwagener",
"username": "Johannes Wagener",
"uri": "http://api.soundcloud.com/users/3207",
"permalink_url": "http://soundcloud.com/jwagener",
"avatar_url": "http://i1.sndcdn.com/avatars-000001552142-pbw8yd-large.jpg?142a848",
"country": "Germany",
"full_name": "Johannes Wagener",
"city": "Berlin",
"description": "<b>Hacker at SoundCloud</b>\r\n\r\nSome of my recent Hacks:\r\n\r\nsoundiverse.com \r\nbrowse recordings with the FiRe app by artwork\r\n\r\ntopbillin.com \r\nfind people to follow on SoundCloud\r\n\r\nchatter.fm \r\nget your account hooked up with a voicebox\r\n\r\nrecbutton.com \r\nrecord straight to your soundcloud account",
"discogs_name": null,
"myspace_name": null,
"website": "http://johannes.wagener.cc",
"website_title": "johannes.wagener.cc",
"online": true,
"track_count": 12,
"playlist_count": 1,
"followers_count": 417,
"followings_count": 174,
"public_favorites_count": 26
}
This question is already old, but I hope this could help other people.
You could use either of this endpoint:
http://api.soundcloud.com/playlists/{playlist_id}?client_id={client_id}
https://api.soundcloud.com/playlists/{playlist_id}?oauth_token={oauth_token}
The 2nd API is undocumented, the first endpoint suddenly started to return 401 for no reason which is from the SoundCloud API documentation. I still provided the 1st endpoint as it's only not working at work, but behaves correctly at home IP address. I suggest if you'd use the 2nd API to generate and use a non-expiring token.
SoundCloud is not a reliable provider anymore as there's no app support for developers. You just have to figure things out by yourself.
On the JSON response, look for track_count. That'll give you the number of tracks in a playlist.
Tracks for "The Hives" claims to be streamable, but are returning 404s.
Here's the JSON response for Civilization's Dying id 3644317 (http://api.soundcloud.com/tracks/3644317.json?client_id=):
{
"kind": "track",
"id": 3644317,
…
"sharing": "public",
"streamable": true,
"embeddable_by": "all",
"downloadable": false,
"title": "Civilization's Dying",
…
"stream_url": "http://api.soundcloud.com/tracks/3644317/stream"
}
the streamable is true and it gives a stream_url, when trying to access it with my client_id (like I've done with other tracks) it returns 404.
Edit: Sharing is public. Added the info back to the payload and a link to the api page with the full response for reference.
There's currently a bug affecting some artists whose tracks are not actually streamable any more, but the API response not showing that fact. This should be fixed very shortly.
Make sure this song has "sharing" set to "public" in the returned track get request. If not, you will need to authenticate with Soundcloud.
http://developers.soundcloud.com/docs#authentication
I encountered this issue as well when I tried to stream Lorde's (Royals) tracks. (Soundcloud userid: 27622444)
After examining the track properties returned from the API I noticed that the streamable property had been set to false
API return data:
(...)
sharing: "public"
state: "finished"
streamable: false
tag_list: ""
title: "Swingin' Party"
(...)
Hope that helps!
Cheers,
T