Shiny objects for MSDN and TechNet Social: #2 Custom feed queries

Continuing our series of cool new stuff you can do with our new social platform, Taylor Parsons has a post fully outlining all the conditions and parameters that you can use to slice and dice social platform queries.

Here's some examples using Taylor's instructions, broken down so that you can see how to construct them:

Today's forum threads tagged "WPF"

http://services.social.microsoft.com/feeds/feed/query/tag/wpf/eq/
ns/ForumThreads/eq/and/nsrecursion/true/eq/and/timespan/P1D/eq/and

OK, let's break this down:

  • http://services.social.microsoft.com/feeds/feed/query/ - this is the root of all feed queries.
  • tag/wpf/eq/ - This requests anything with a tag equal (eq) to "wpf"
  • ns/ForumThreads/eq/ - This specifies that results should be limited to the "forumthreads" namespace (only items of type "forum thread" will be returned).
  • and/ - Now that we have more than one qualifier, we need to start adding our operators (and / or).
  • nsrecursion/true/eq/ - Use this whenever you request forum threads because the forum namespace is hierarchical. If you leave this out, you won't get any results because it will only pull from the root namespace, which is empty.
  • and/ - Remember an operator after each condition.
  • timespan/P1D/eq/ - This specifies a time span of 1 day. This is why you won't see many results in this feed. But it might be a great mini-feed to have on your blog if you're a WPF guru...
  • and - the last operator.

Note that our system stacks all the operators (and's) at the end. Either way works, but I personally think it's less confusing this way.

50 most popular German MSDN bookmarks in the past month

http://services.social.microsoft.com/feeds/feed/query/locale/de-de/eq/ns/SocialBookmarking/eq/and/timespan/P30D/eq/
and/brand/msdn/eq/and/?sort=popularity&count=50

The breakdown:

  • http://services.social.microsoft.com/feeds/feed/query/ - the root.
  • locale/de-de/eq/ - Limits the results to those items saved from the German versions of the applications.
  • ns/SocialBookmarking/eq/and/timespan/P30D/eq/and/ - Note we're now refining to the SocialBookmarking namespace instead of forums. Also, the timespan is greater.
  • brand/msdn/eq/and - Here's how you limit to one of our four brands (msdn, technet, expression, or microsoft).
  • ?sort=popularity - This is a parameter noting the sort order. Default = recency.
  • &count=50 - Limits the results to the top 50.

The most popular items ever saved to TechNet on "Virtualization, Hyper-V and deployment"

http://services.social.microsoft.com/feeds/feed/?query=brand/Technet/eq/nsrecursion/True/eq/and/ns/SocialBookmarking/eq/
and/ns/ForumThreads/eq/and/tag/virtualization/eq/and/tag/hyper-v/eq/and/tag/deployment/eq/and&sort=Popularity

The breakdown:

  • http://services.social.microsoft.com/feeds/feed/query/ - the root.
  • brand/technet/eq/ - scoped to TechNet.
  • nsrecursion/True/eq/and/ns/SocialBookmarking/eq/
    and/ns/ForumThreads/eq/and/ -
    This gets us results from both forums and from social bookmarking.
  • tag/virtualization/eq/and/tag/hyper-v/eq/and/tag/deployment/eq/and - here's our three tags.
  • ?sort=popularity - sorted by popularity.
  • Because we don't specify a time frame, we get the "top" results from the entire database, regardless of date.

Note that the order of the conditions and parameters doesn't matter.

Let us know if you come up with some really useful queries or write some applications based on this. Would love your feedback.

Published 19 September 08 01:55 by cslemp

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Shiny objects for MSDN and TechNet Social: #2 Custom feed queries : EasyCoded said on September 19, 2008 5:03 PM:

PingBack from http://www.easycoded.com/shiny-objects-for-msdn-and-technet-social-2-custom-feed-queries/

# sto dev said on September 19, 2008 5:23 PM:

the query syntax is based on reverse polish notation

# Chris.blog.Microsoft said on September 29, 2008 12:58 PM:

In the last of my series of cool new toys we're adding to extend the new MSDN , TechNet , and Expression

# Charlie Calvert's Community Blog said on October 8, 2008 2:56 AM:

Social bookmarking plays a big role in my online life. Sites like Delicious , DotNetKicks and Digg are

# TrackBack said on October 19, 2008 5:06 PM:
# TrackBack said on October 19, 2008 5:06 PM:

Leave a Comment

(required) 
(optional)
(required) 
Page view tracker