Get all of the videos and activities from a Youtube user - c#

I'm trying to get all of the videos uploaded by a Youtube user, the Uri I used is this one : https://gdata.youtube.com/feeds/api/users/userId/uploads, which I've got from this link.
The same goes with the user activities it seems I can't get all of the user activities using the Uri described in the same website.
So anyone has any idea how to get all of the user's uploads and activities?

There are 7 (in words: seven) samples of how to get the uploaded videos with the new awesome v3 Api here:
https://developers.google.com/youtube/v3/code_samples/
It should be easy to look at one and convert it into the language of your desire.
With this tool you can test all the variations of input to find out how to get all videos:
https://developers.google.com/youtube/v3/docs/playlistItems/list#try-it
(Spoiler: Default settings)
You can get the PlaylistID that contains all uploads by fetching the channel Informations:
https://developers.google.com/youtube/v3/docs/channels/list#try-it
I recommend that you take a look at the V3 API and good luck!

Related

Office365 Unified Api - Share file with specific user and get file thumbnail

I am trying to do the following two things:- Share file with specific user- Get thumbnail for a file
I am currently using the Office 365 Unified Api and I'd like to keep it that way if possible.
I thought it would be possible to get the thumbnails for a file like this:
"https://<tenant>.sharepoint.com/_api/v1.0/me/files/" + id + "/thumbnails"
This returns the following error
{
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": "The expression drive/items/<id>/thumbnails is not valid."
}
As for the file sharing, I have no idea where to start. I hope someone can help me out with this, thanks in advance.
The thumbnails feature is available in the v2 of the Files API - please refer to https://dev.onedrive.com/items/thumbnails.htm. The feature to share file with a specific user will be available in this API by the end of the month.
You can find the complete documentation at http://dev.onedrive.com. This API is currently in preview, and general availability is planned to happen before the end of the year. Please note that all new features and fixes are being added to the v2 API.

cloudfront private time limited url

I have a client that wants to sell tutorial videos online. I already got previews of his tutorials streaming from CF (This is public). Now I want to use the c# sdk to generate private, time limited URLs to allow customers who purchased the tutorials to download them for a limited time period.
Once the payment has been confirmed, I want to generate a URL and send it to the client via email.
Does CF/.NET SDK support this?
Can someone point me at a sample. I have searched Google, and got a little information overload. Different examples from different versions of sdk/management console. Please help me make sense of it all :)
If you look at the class Amazon.CloudFront.AmazonCloudFrontUrlSigner that has helper methods for creating presigned URL to private distributions. For example this code snippet creates a url that is valid for one day.
var url = AmazonCloudFrontUrlSigner.GetCannedSignedURL(AmazonCloudFrontUrlSigner.Protocol.http, domainName, cloudFrontPrivateKey, file, cloudFrontKeyPairID, DateTime.Now.AddDays(1));
There are other utility methods in that class for adding more specific access rules.
Note this class was added in version 1.5.2.0 of the SDK which came out in late Augest
Yes Amazon S3 as well as CloudFront both support preSignedUrl access. If you want to faster content delivery the you should use CloudFront. Mr. Norm Johanson saying correct. To generate signed url you will need of Public-Private key pair. You can user your own key pair and lets associate with you account of Amazon S3 or you can also generate it at amazon s3 account and download to generate presigned url
You can use the GUI or code in S3SignURL to sign your URL
https://github.com/DigitalBodyGuard/S3SignURL
You can't do this with CloudFront (CF), but you can do this directly with S3. You simply call the GetPreSignedURL function to generate a time-limited URL to a specific (private) S3 item. This approach is covered in a tutorial here.
The simplest code sample is this:
AmazonS3 client;
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest();
request.WithBucketName(bucketName);
request.WithKey(objectKey);
request.Verb = HttpVerb.GET; // Default.
request.WithExpires(DateTime.Now.AddMinutes(5));
string url = client.GetPreSignedURL(request);

Rss Reader (aggregator) based on google reader

I have created an RSS reader (web-app), with usual stuff read rss in xml format parse and display it to user. Every thing is working fine.
Now I want 'my reader app' to use google-reader account as back end, my work flow goes like this
Ask user to log into google account (through pop window).
Google ask user-Id password and after login it says " 'xyz' app want to access you acount 'Allow' 'Deny'"
After allow, access google reader account and get list of subscriptions
If user reads a feed tell google reader (may be thru web API), this item has been read
I just dont know how to accomplish this part. I have tried googling and have read many posts/blog but nothing worked i dont know from where to start.
Please help, Thanks
As you can read in this blog post from Martin Doms, you should be able to get a session token using an HttpWebRequest object with an URL like:
https://www.google.com/accounts/ClientLogin?service=reader&Email=me#gmail.com&Passwd=pass
The whole blog (the article is composed of 3 parts) is worth reading to have a complete overview of the approach.
You can also read about the Google Reader API on this site.

How to convert IP Address to GeoLocation using ASP.Net or Razor Systax or Bing Map?

I build the ASP.Net (.cshtml) site, and I need to get current location of user to show in Bing Map. How can I do this feature?
MaxMind offers a IP geolocation library and API, see: http://www.maxmind.com/app/api
They offer a number of Windows APIs, including C#. see: http://www.maxmind.com/app/windows
(Disclaimer: not affiliated, just a happy customer. I've not used the Windows APIs).
I wouldn't ever try to implement this myself. Using HTML5 you can actually get the best location available for the computer/device trying to view the page. One of the fallbacks that browsers use when there isn't a GPS device attached it to lookup the location of the IP address. This only works in HTML5 browsers but it's a very fast and cheap solution.
Javascript:
navigator.geolocation.getCurrentPosition(show_map);
function show_map(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
}
If you want more details I find this site really useful.
http://diveintohtml5.ep.io/geolocation.html
did you checked nerddinner tutorial, chapter 11: Integration with an ajax map? http://nerddinnerbook.s3.amazonaws.com/Part11.htm
Nerddinner uses js files -included in the example - plus a location request - included in the example too - .
to download files http://nerddinner.codeplex.com/SourceControl/list/changesets if you want razor´s examples, otherwise http://nerddinner.codeplex.com/
Full tutorial starts here http://nerddinnerbook.s3.amazonaws.com/Intro.htm
brgds.

Posting image/video to MySpace using API?

I am Working in Asp.net 3.5 with c# 2008.I have done authentication part & I'm also able to get all image URLs or videos from my application. I'm also able to send messages to MySpace. Now I would like to post images & videos.
Please let me know how can I post images/videos from my application.
Here is a link to the Documentation on using Media Items API.
http://wiki.developer.myspace.com/index.php?title=OpenSocial_0.9_MediaItems
It explains how to use it.
you need to Issue a POST request on following URL
http://api.myspace.com/1.0/mediaItems/{personId}/{selector}/#videos
if its image then set content-type to image/{type} like content-type="image/jpg" for jpg
these formats are supported: .jpg, .gif, .bmp, .tiff, .png.
similarly for videos use content type like content-type=”video/mpeg”
these formats are supported .avi,.mov,.mpg,.wmv.
For more details please consider checking out above link.
For details on what a POST request is or what is its structure check out this http://www.jmarshall.com/easy/http/

Categories