Table of contents
    1. 1. Example
    2. 2. Code

    Example

    The following example shows the top search results for "mindtouch" on Twitter.

      Code

      Here is the code for searching twitter and displaying the search results.

      var query = "mindtouch";
      
      var atom = web.xml("http://search.twitter.com/search.atom" & { q: query });
      <ul>
          foreach(var entry in atom["//_:entry"]) {
              <li>
                  xml.text(entry, "_:title");
                  " (";
                  web.link(xml.text(entry, "_:author/_:uri"), xml.text(entry, "_:author/_:name"));
                  ")";
              </li>
          }
      </ul>

       

      Tag page
      You must login to post a comment.

      Copyright © 2011 MindTouch, Inc. Powered by