Add Last Login to Users api call - desire2learn

Our customer wants to see a report of all their current users' last login dates, but I couldn't find a way to get that information from the current API:
http://docs.valence.desire2learn.com/res/user.html
It's a little frustrating, because it's so easy to get this data in the UI itself:
Is there any way we can get that data through the API? Thanks!

Currently, there is no way to get this information via an API call; however, you are not the first person to inquire about this, and I suspect it's on D2L's list of improvement items for their developer platform.

Related

How to check data sent to Omniture/adobe-analytics is correct or not

I am a beginner to Omniture/adobe web analytics. I want to know the some information like
How can we track data coming into Omniture?
How do we know if the tags are firing as expected?
I installed Omnibug extension and can track what are the parameters and their values being sent to Omniture, but not sure how can we track data in Omniture that was being sent.
Also, I tried to find unique visitors, visits, pageviews based on pageName. Is it possible to filter unique visitors based on pageName? If yes, can anyone guide me by providing list of instructions
Thanks
What you need to do to truly verify that the expected data is landing in Adobe Analytics is look at the Click Stream feeds and map the results against the data you expect to be there. https://marketing.adobe.com/resources/help/en_US/sc/clickstream/
It is not trivial, but is the deepest way of verifying the final result of page code, data collection, processing rules, vista and finally pre/post results.

How can I use the YouTube SUP API to retrieve recent uploads of some predefined users?

I wish to be able to check for the latest videos (in near realtime or at most a couple of minutes out) for a set of users (up to 200 or so) in a single call to the YouTube API and then store the IDs of uploaded videos in my own database. The only solution I believe there is for this is the YouTube SUP API but I'm not entirely clear on how it works and was wondering if someone could please explain it. I have read the entire API documentation on it but am still not completely clear.
I was assuming that one can call the SUP URL (http://gdata.youtube.com/sup) and check if the user hash has had any activity recently and if they have, then do something with that. My issue is I don't understand how you interpret the activity from ["b305e88","afd4"] in the SUP feed and is there any way to specify a subset of users or must you search through the entire feed? It seems to take a fair few seconds to load the SUP feed.
On the SUP API page it also states that you can visit a URL such as https://gdata.youtube.com/feeds/api/users/bbc/events?v=2 to obtain the hash key for a user's feed, but as you can see if you try to visit it, the link appears to be broken. How else could I obtain the hash?
I'm currently wanting to do this in a Rails project while using the youtube_it gem but I don't believe this has support for it. Correct me if I'm wrong.
Edit
My mistake. The developer key is required to obtain the events of a user such as https://gdata.youtube.com/feeds/api/users/bbc/events?v=2&key=YOUR_DEVELOPER_KEY
Still no progress with the SUP method although I'm potentially considering using a channel and just automatically subscribing to each user. Every minute I will then poll for the list of new videos by the users.
I'd suggest using PubSubHubbub: http://apiblog.youtube.com/2010/10/pubsubhubbub-for-youtube-activities.html
A handler in your web application will automatically receive a POST whenever one of the feeds you're watching is updated, and the content of the POST will be the updated feed itself, saving you the trouble of having to fetch it.
There isn't much documentation specific to using PuSH and the YouTube API beyond that blog post, but the general PuSH docs all apply: https://pubsubhubbub.appspot.com/
Failing that, SUP should still work, so we could try to debug that further if you'd rather use that.

Utterly confused about OAuth and Google Calendar Gadget

I'm working on a Google Calendar Gadget and need to load data for the user from a remote server. It's simple stuff, like favorite color, but I need the user's ID. Using makeRequest works in general, but I need to send the account name, or a hash of it, or any sort of identifier to my server so it gets the right data. What's the easiest way to get that info? Currently it asks the user via HTML form, every single time it loads, which is pretty lame.
I've been looking at OAuth stuff, trying examples, and nothing works... I got an OAuth client key but don't know how/where to use it (or if I do use it with a Gadget). I found the Calendar feed/scope URI but I'm not really sure if that's correct to just get a user identifier, maybe I should use accounts. Half the examples are for OAuth 1.0...it's really frustrating.
Does anyone know a way to do this, or a good example/tutorial that explains how, for a Gadget? I think Gadgets are different since they run on Google's servers...but don't really know how this makes them different in this context.
See the answer to this: osapi.people.get() returns 404 in google calendar sidebar gadget. Then associate the google user ID with your internal ID, if different.

How to get a list of all retweeters in Twitter?

I have seen numerous companies doing like Twitter lotteries where users got to retweet their tweet and then one of retweeters will get the prize or whatever.
I was wondering now how do they get the list of all retweeters or pick the winner?
I checked Twitter API and found only this thing: GET statuses/retweets/:id but it returns maximum of 100 retweeters. Is that the only way?
It looks likes there's a couple services out there doing almost exactly this. A quick google pulls up http://onekontest.com/ and there's a few other Twitter contest services, but they all seem to be different levels of broken since they haven't kept up with changes to the API.
As far as the Twitter API itself is concerned, if you were expecting more than 100 responses, I think using GET statuses/mentions makes the most sense. That API call returns any mentions of a user, and you can pass the flag include_rts to include any retweets of your tweets. Then, if you wanted to list RTs of a specific tweet, you could check the in_reply_to_status_id field in the returned data to see if it matches the original tweet ID. This API call only returns the last 800 status, 200 at a time, so if you expect a bunch of data, you would need to poll the API repeatedly over time to get all the tweets. I imagine services like favstar are doing exactly this, just on a larger scale.
If you're actually looking for code to do something like this, I wrote a sinatra app called twitter-rss-digest which handles querying Twitter over time to track different sorts of queries. It's pretty rough, and doesn't quite handle this specifically, but it might point you in the right direction if you want to code something.
The Twitter API has an endpoint that returns up to 100 retweeter IDs for a given tweet.
Note that for historical reasons, that endpoint only returns up to 100 results and the documentation about the cursor is useless. Twitter refused to fix the situation.
2013 note
That said, the first thread on the Developers site that surfaced in a quick google has #episod, a Twitter employee saying:
You can't likely get to all of them. The data is spread out. Your best bet is to use the REST API to determine many of the users who performed the retweet, but the data will still be constrained.
It's easiest to track retweets as they happen rather than try to find them from the past. Use the Streaming API for that.
I like muffinista's method, but I think if you want a 100% complete list of retweets, simply enable the retweet email notifications and write a script that polls the email box for those matching the subject "retweeted one of your Tweets!" and put the data into a table. Do this right from the start.
The site https://twren.ch/ enlists all the retweeters for a given tweet (note that it only enlists retweeters who are direct followers of the source tweeter.) Nevertheless its probably the only public source available.

Get follower count on Twitter API search results

What I'm trying to do is pull some search results, and sort them by users.
Right now I'm using
$to->OAuthRequest('http://search.twitter.com/search.json', array('q' => 'search-term'), 'GET');
to get the results, but I can't actually get information about the user like follower_count, etc. so I though I'd take each result's user_id, and run it through http://twitter.com/users/show.xml to get the rest of the information.
The problem is, if I get 50 results that way, that's 50 API calls, which is 1/3 of the hourly limit...
Is there a better way to do this?
Update:
I have requested whitelisting, and the guys at Twitter told me I should instead use the new Streaming API.
This kinda sucks since it's in Alpha testing, and the documentation is unclear, but the concept looks cool, and the limits are different than the regular API. Gonna dive into it later.
Only reliable user information you can get from twitter search results are username (from_user) and profile image url. If you want more information, you will have to call the users/show method for each user. There is no workaround or better way(that I'm aware of).
You will have to Cache user information and request whitelisting.

Resources