Spaces Platform... 的个人资料Spaces Developer Platfor...日志列表网络 工具 帮助

日志


10月16日

Windows Live Events: Create Event API and Event RSS

You’ve probably heard about the launch of Windows Live Events, but unless you’ve been using a web debugging proxy like Fiddler, you probably didn’t know that there’s a way to programmatically instantiate a Windows Live Event.  Try clicking this link:

http://spaces.live.com/api.aspx?wx_action=createEvent&wx_targetSite=eventSpace&wxp_name=Movie+Night:+Live+Free+or+Die+Hard&wxp_alias=livefreeordiehard&wxp_contactName=John+Smith&wxp_contactPhone=206-555-1212&wxp_location=Space+Needle&wxp_address=4th+Ave.+and+Broad+St.+in+Seattle&wxp_latlong=47.62061,-122.34942&wxp_mapType=h&wxp_mapZoom=18&wxp_description=%3cimg%20src='http://entimg.msn.com/i/150/mo/OneSheets/new3/LiveFreeorDieHard.jpg'%3e&wxp_template=IIEventOscarParty.xml

API Details
The link should have taken you to an event create page with all of the specified parameters pre-populated.  Yep, it’s a long link, but it’s intended to show all of the parameters (most of which are optional.)  Here’s the link in a more read-able format:

http://spaces.live.com/api.aspx
?wx_action=createEvent
&wx_targetSite=eventSpace
&wxp_name=Movie+Night:+Live+Free+or+Die+Hard
&wxp_alias=livefreeordiehard
&wxp_contactName=John+Smith
&wxp_contactPhone=206-555-1212
&wxp_location=Space+Needle
&wxp_address=4th+Ave.+and+Broad+St.+in+Seattle
&wxp_latlong=47.62061,-122.34942
&wxp_mapType=h
&wxp_mapZoom=18
&wxp_description=%3cimg%20src='http://entimg.msn.com/i/150/mo/OneSheets/new3/LiveFreeorDieHard.jpg'%3e
&wxp_template=IIEventOscarParty.xml

As you can see, parameters are URL encoded.   The mapping parameters (mapType, mapZoom) are consistent with Virtual Earth.  Check out their interactive SDK for more info. 

Potential uses
Below are just a few ideas for how you might use the Create Event API:

  • If you own a site that lists local events or venues like MSN CityGuides or eventful, the Create Event API will hopefully help you enable your users to easily create Windows Live Event spaces to invite their friends to the events that you listed
  • If you’re a local band, DJ, comic, etc., adding a create event link to your list of upcoming shows will make it easy for your fans to invite their friends
  • If you own a venue like a restaurant, bar, club, etc., consider adding a create event link to your website to help your visitors get their friends together at your establishment
  • If you’re a political candidate or advocacy organization, you could add a link to your website to make it easy for your supporters to create a coffee, house party, or debate watch party
  • If you’re an athletic team, you could add a great an event link to your game schedule so people could easily schedule an outing

These are just a few ideas for using the Create Event API.  I hope you find these useful and if you have feedback on the API or other suggestions for potential uses, please leave a comment.  Thanks—
--Rob

RSS
P.S. Publicly accessible events also include an RSS feed.  You can see this by adding /feed.rss to the event’s URL AND in additional to basic RSS elements like <title>, <link>, <description>, and <pubDate>; <geo> and <georss> elements are also included.

Update: 12 November 2007
Thanks to Thomas J. who pointed out the following:
* More full documentation will be posted on MSDN
* The "wx_targetSite" parameter is unnecessary

12月31日

Secrets of Searching Spaces

(cross-posted from: http://thespacecraft.spaces.live.com/ as this may be interesting for Dev folks - Rob)

Have you ever wondered… wow, there’s all of that stuff (blogs, photos, profiles, lists, etc.) in Spaces, but I just can’t find what I’m looking for using the Spaces Search?  Well, I’m writing to share the Secrets of Searching Spaces.  It may come as no surprise to you that the Search experience on Windows Live Spaces is powered by Live Search.  We’re actually just using some publicly available features of Live Search.

Search Spaces Blogs

For starters, let’s say that we want to search for Spaces blog entries that talk about a specific topic, for example “Ms Dewey.”  Of course you could go to Spaces to do your search, but this is about exposing the “Secrets of Searching Spaces” so let me show you how to do this using Live Search:
1. Go to Live Search (http://search.live.com)
2. Enter “Ms Dewey site:spaces.live.com meta:search.pt(blogs)”

Now I’ll explain:
· “Ms Dewey” are your standard keyword search terms
· The “site:” parameter scopes your search to URL’s that start with that site
· The “meta:” parameter tells Live Search to look for the meta word “search.ptwhich containsblogs.”  Other “search.pt” metawords that you can use are “spaces” and “people” for the front page of a user’s space and the profile page respectively.  Nikhil, who was the developer of our original Spaces Search experience tells me that “pt” stands for page type.

Search within a Space

One of the feature requests I hear from time-to-time is for the ability to search within a specific Windows Live Space.  This can be done using the site: parameter.  For example: “Ms Dewey site:robdolin.spaces.live.com meta:search.pt(blogs)” will search within my personal space for any blog entries about “Ms Dewey.” 

Search within a Market

Another “secret” is to use the meta word “search.market” to search for spaces in a specific language or from a specific market.  This uses market identifiers like “en-us” for English-USA or “fr-fr” for French-France.  Windows Live Spaces supports about 35 markets (and hopefully more soon J.) 

List of Meta Words

Below I have included a list of meta words that you can query on:
· search.pt – page type; values of “spaces,” “people,” and “blogs”
· search.st – space title; for example “Rob Dolin’s space”
· search.sa – space alias; for example “robdolin”
· search.market – the market code; for example: en-us, es-es, en-au, fr-fr

What’s Next

I hope you use the above “secrets” to search Spaces (or other data.)  You might even want to build a Gadget or other mash-up.  You can also access the data in Live Search by adding “&format=rss” to your search query or by using Live Search’s SOAP API’s.  On the Spaces team, we’re working to expose additional meta words.  If you do build a great Gadget or mash-up, please leave a comment about it with this post.

Happy searching—
--Rob