<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Odata on naveen srinivasan</title><link>https://naveensrinivasan.com/categories/odata/</link><description>Recent content in Odata on naveen srinivasan</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 03 Nov 2010 01:56:34 +0000</lastBuildDate><atom:link href="https://naveensrinivasan.com/categories/odata/index.xml" rel="self" type="application/rss+xml"/><item><title>Downloading PDC10 videos using the new async feature</title><link>https://naveensrinivasan.com/?p=1156/</link><pubDate>Wed, 03 Nov 2010 01:56:34 +0000</pubDate><guid>https://naveensrinivasan.com/?p=1156/</guid><description>&lt;p&gt;I knew PDC10 has an OData endpoint which is &lt;a href="http://odata.microsoftpdc.com/ODataSchedule.svc/"&gt;http://odata.microsoftpdc.com/ODataSchedule.svc/&lt;/a&gt; . The best part about  OData is querying for specific data that we are looking for. And here is my OData url for filtering twitter hashtag #languages&lt;/p&gt;&#10;&lt;p&gt;[sourcecode]&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="http://odata.microsoftpdc.com/ODataSchedule.svc/Sessions%28%29?$filter=startswith%28TwitterHashtag,&amp;amp;#8217;%23languages&amp;amp;%238217;%29&amp;amp;$expand=DownloadableContent&amp;amp;$select=DownloadableContent"&gt;http://odata.microsoftpdc.com/ODataSchedule.svc/Sessions()?$filter=startswith(TwitterHashtag,&amp;#8217;%23languages&amp;#8217;)&amp;$expand=DownloadableContent&amp;$select=DownloadableContent&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;[/sourcecode]&lt;/p&gt;&#10;&lt;p&gt;With the above OData feed I could get urls for low bandwidth mp4’s that I can download. And here is the sample code for filtering&lt;/p&gt;&#10;&lt;p&gt;[sourcecode language=”csharp”]&lt;/p&gt;&#10;&lt;p&gt;var x =XDocument.Load(@&amp;ldquo;c:tempsession.xml&amp;rdquo;).Descendants().AsParallel().Where(xd =&amp;gt; xd.Name.LocalName==&amp;ldquo;Url&amp;rdquo;&lt;/p&gt;</description></item><item><title>Combining Stack Overflow RSS, OData and API to query</title><link>https://naveensrinivasan.com/?p=978/</link><pubDate>Wed, 14 Jul 2010 03:18:05 +0000</pubDate><guid>https://naveensrinivasan.com/?p=978/</guid><description>&lt;p&gt;In my opinion &lt;a href="http://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt; has a ton of knowledge to learn new tricks. And there are some really smart people in the SO community. I try and learn new things when I find time.&lt;/p&gt;&#10;&lt;p&gt;I subscribe to RSS feeds for new questions on a particular topic. Example, here is one for F# from Stack Overflow &lt;a href="http://stackoverflow.com/feeds/tag/f%23"&gt;http://stackoverflow.com/feeds/tag/f%23&lt;/a&gt;. The advantage of the RSS feed is I get to see new questions, but the drawback is I would have to navigate to the site to look for answers. AFAIK the &lt;a href="http://stacky.codeplex.com/"&gt;stacky&lt;/a&gt; (stack overflow API) does not provide a mechanism for querying new questions based on a tag.&lt;/p&gt;</description></item><item><title>Using Tech-Ed OData to download videos</title><link>https://naveensrinivasan.com/?p=2071/</link><pubDate>Tue, 15 Jun 2010 12:20:32 +0000</pubDate><guid>https://naveensrinivasan.com/?p=2071/</guid><description>&lt;p&gt;I wanted to watch the Teched 2010 videos, but the problem I had was going to the site manually to download files for offline viewing.  And I was also interested only in Dev sessions which were level 300 / 400. Thanks to OData for teched &lt;a href="http://odata.msteched.com/sessions.svc/"&gt;http://odata.msteched.com/sessions.svc/&lt;/a&gt; ,I  could write 3 statements in linqpad and had them all downloaded using &lt;a href="http://gnuwin32.sourceforge.net/packages/wget.htm"&gt;wget&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;[sourcecode language=”csharp”]&lt;/p&gt;&#10;&lt;p&gt;File.Delete(@&amp;ldquo;C:tempdownload.txt&amp;rdquo;);&lt;/p&gt;&#10;&lt;p&gt;Sessions&lt;/p&gt;&#10;&lt;p&gt;.Where (s =&amp;gt; (s.Level.StartsWith(&amp;ldquo;400&amp;rdquo;) ||  s.Level.StartsWith(&amp;ldquo;300&amp;rdquo;) ) &amp;amp;&amp;amp; s.Code.StartsWith(&amp;ldquo;DEV&amp;rdquo;))&lt;/p&gt;</description></item></channel></rss>