PageRenderTime 54ms CodeModel.GetById 41ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/apidocs/pyechonest.search_tracks-pysrc.html

http://echo-nest-remix.googlecode.com/
HTML | 131 lines | 100 code | 10 blank | 21 comment | 0 complexity | b0e20f025a87fe61784ef48971a6eedb MD5 | raw file
  1<?xml version="1.0" encoding="ascii"?>
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3          "DTD/xhtml1-transitional.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5<head>
  6  <title>pyechonest.search_tracks</title>
  7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8  <script type="text/javascript" src="epydoc.js"></script>
  9</head>
 10
 11<body bgcolor="white" text="black" link="blue" vlink="#204080"
 12      alink="#204080">
 13<!-- ==================== NAVIGATION BAR ==================== -->
 14<table class="navbar" border="0" width="100%" cellpadding="0"
 15       bgcolor="#a0c0ff" cellspacing="0">
 16  <tr valign="middle">
 17
 18  <!-- Tree link -->
 19      <th>&nbsp;&nbsp;&nbsp;<a
 20        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 21
 22  <!-- Index link -->
 23      <th>&nbsp;&nbsp;&nbsp;<a
 24        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 25
 26  <!-- Help link -->
 27      <th>&nbsp;&nbsp;&nbsp;<a
 28        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 29
 30  <!-- Project homepage -->
 31      <th class="navbar" align="right" width="100%">
 32        <table border="0" cellpadding="0" cellspacing="0">
 33          <tr><th class="navbar" align="center"
 34            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">The Echo Nest Remix API, SVN Revision: 448</a></th>
 35          </tr></table></th>
 36  </tr>
 37</table>
 38<table width="100%" cellpadding="0" cellspacing="0">
 39  <tr valign="top">
 40    <td width="100%">
 41      <span class="breadcrumbs">
 42        <a href="pyechonest-module.html">Package&nbsp;pyechonest</a> ::
 43        Module&nbsp;search_tracks
 44      </span>
 45    </td>
 46    <td>
 47      <table cellpadding="0" cellspacing="0">
 48        <!-- hide/show private -->
 49        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 50    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 51        <tr><td align="right"><span class="options"
 52            >[<a href="frames.html" target="_top">frames</a
 53            >]&nbsp;|&nbsp;<a href="pyechonest.search_tracks-pysrc.html"
 54            target="_top">no&nbsp;frames</a>]</span></td></tr>
 55      </table>
 56    </td>
 57  </tr>
 58</table>
 59<h1 class="epydoc">Source Code for <a href="pyechonest.search_tracks-module.html">Module pyechonest.search_tracks</a></h1>
 60<pre class="py-src">
 61<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
 62<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"># encoding: utf-8</tt> </tt>
 63<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 64<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">A Python interface to the The Echo Nest's web API.  See</tt> </tt>
 65<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">http://developer.echonest.com/ for details.</tt> </tt>
 66<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 67<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"> </tt>
 68<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module pyechonest.util=pyechonest.util-module.html"><a title="pyechonest.util" class="py-name" href="#" onclick="return doclink('link-0', 'util', 'link-0');">util</a></tt> </tt>
 69<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
 70<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">json</tt> </tt>
 71<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
 72<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">simplejson</tt> <tt class="py-keyword">as</tt> <tt class="py-name">json</tt> </tt>
 73<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"> </tt>
 74<a name="search_tracks"></a><div id="search_tracks-def"><a name="L14"></a><tt class="py-lineno">14</tt> <a class="py-toggle" href="#" id="search_tracks-toggle" onclick="return toggle('search_tracks');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.search_tracks-module.html#search_tracks">search_tracks</a><tt class="py-op">(</tt><tt class="py-param">artist</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">sort</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">query</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">count</tt><tt class="py-op">=</tt><tt class="py-number">20</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 75</div><div id="search_tracks-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="search_tracks-expanded"><a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">    <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name"><a title="pyechonest.util" class="py-name" href="#" onclick="return doclink('link-1', 'util', 'link-0');">util</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Function pyechonest.util.call()=pyechonest.util-module.html#call"><a title="pyechonest.util.call" class="py-name" href="#" onclick="return doclink('link-2', 'call', 'link-2');">call</a></tt><tt class="py-op">(</tt><tt class="py-string">'alpha_search_tracks'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'query'</tt><tt class="py-op">:</tt><tt class="py-name">query</tt><tt class="py-op">,</tt> <tt class="py-string">'sort'</tt><tt class="py-op">:</tt><tt class="py-name">sort</tt><tt class="py-op">,</tt> <tt class="py-string">'results'</tt><tt class="py-op">:</tt><tt class="py-name">count</tt> <tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">checkstatus</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt> </tt>
 76<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">json</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
 77</div><a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 78<!--
 79expandto(location.href);
 80// -->
 81</script>
 82</pre>
 83<br />
 84<!-- ==================== NAVIGATION BAR ==================== -->
 85<table class="navbar" border="0" width="100%" cellpadding="0"
 86       bgcolor="#a0c0ff" cellspacing="0">
 87  <tr valign="middle">
 88
 89  <!-- Tree link -->
 90      <th>&nbsp;&nbsp;&nbsp;<a
 91        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 92
 93  <!-- Index link -->
 94      <th>&nbsp;&nbsp;&nbsp;<a
 95        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 96
 97  <!-- Help link -->
 98      <th>&nbsp;&nbsp;&nbsp;<a
 99        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
100
101  <!-- Project homepage -->
102      <th class="navbar" align="right" width="100%">
103        <table border="0" cellpadding="0" cellspacing="0">
104          <tr><th class="navbar" align="center"
105            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">The Echo Nest Remix API, SVN Revision: 448</a></th>
106          </tr></table></th>
107  </tr>
108</table>
109<table border="0" cellpadding="0" cellspacing="0" width="100%%">
110  <tr>
111    <td align="left" class="footer">
112    Generated by Epydoc 3.0.1 on Wed May 26 12:18:03 2010
113    </td>
114    <td align="right" class="footer">
115      <a target="mainFrame" href="http://epydoc.sourceforge.net"
116        >http://epydoc.sourceforge.net</a>
117    </td>
118  </tr>
119</table>
120
121<script type="text/javascript">
122  <!--
123  // Private objects are initially displayed (because if
124  // javascript is turned off then we want them to be
125  // visible); but by default, we want to hide them.  So hide
126  // them unless we have a cookie that says to show them.
127  checkCookie();
128  // -->
129</script>
130</body>
131</html>