Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
77f78ebbb6
|
@ -100,6 +100,10 @@
|
|||
<actionMethod actionName="index"/>
|
||||
<actionMethod actionName="help"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="Recorder">
|
||||
<actionMethod actionName="index"/>
|
||||
<actionMethod actionName="getShowSchedule"/>
|
||||
</controllerFile>
|
||||
</controllersDirectory>
|
||||
<formsDirectory>
|
||||
<formFile formName="Login"/>
|
||||
|
@ -325,6 +329,12 @@
|
|||
<viewControllerScriptsDirectory forControllerName="Schedule">
|
||||
<viewScriptFile forActionName="cancelShow"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Recorder">
|
||||
<viewScriptFile forActionName="index"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Recorder">
|
||||
<viewScriptFile forActionName="getShowSchedule"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
</viewScriptsDirectory>
|
||||
<viewHelpersDirectory/>
|
||||
<viewFiltersDirectory enabled="false"/>
|
||||
|
@ -370,6 +380,7 @@
|
|||
<testApplicationControllerFile filesystemName="NowplayingControllerTest.php"/>
|
||||
<testApplicationControllerFile filesystemName="PreferenceControllerTest.php"/>
|
||||
<testApplicationControllerFile filesystemName="DashboardControllerTest.php"/>
|
||||
<testApplicationControllerFile filesystemName="RecorderControllerTest.php"/>
|
||||
</testApplicationControllerDirectory>
|
||||
</testApplicationDirectory>
|
||||
<testLibraryDirectory>
|
||||
|
|
|
@ -28,6 +28,10 @@ Linked code:
|
|||
- Note: Only used for development, not needed to run Airtime.
|
||||
- License: LGPLv3
|
||||
|
||||
* Soundcloud php api wrapper
|
||||
- https://github.com/mptre/php-soundcloud/blob/master/Services/Soundcloud.php
|
||||
- License: MIT
|
||||
|
||||
----------------
|
||||
Non-linked code:
|
||||
----------------
|
||||
|
|
|
@ -21,7 +21,8 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
|||
->add(new Zend_Acl_Resource('nowplaying'))
|
||||
->add(new Zend_Acl_Resource('search'))
|
||||
->add(new Zend_Acl_Resource('dashboard'))
|
||||
->add(new Zend_Acl_Resource('preference'));
|
||||
->add(new Zend_Acl_Resource('preference'))
|
||||
->add(new Zend_Acl_Resource('recorder'));
|
||||
|
||||
/** Creating permissions */
|
||||
$ccAcl->allow('G', 'index')
|
||||
|
@ -29,13 +30,13 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('G', 'error')
|
||||
->allow('G', 'nowplaying')
|
||||
->allow('G', 'api')
|
||||
->allow('G', 'recorder')
|
||||
->allow('G', 'schedule')
|
||||
->allow('G', 'dashboard')
|
||||
->allow('H', 'library')
|
||||
->allow('H', 'search')
|
||||
->allow('H', 'plupload')
|
||||
->allow('H', 'playlist')
|
||||
->allow('H', 'sideplaylist')
|
||||
->allow('A', 'user')
|
||||
->allow('A', 'preference');
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
class RecorderController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('contextSwitch');
|
||||
$ajaxContext->addActionContext('get-show-schedule', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
// action body
|
||||
}
|
||||
|
||||
public function getShowScheduleAction()
|
||||
{
|
||||
//$from = $this->_getParam("from");
|
||||
//$to = $this->_getParam("to");
|
||||
|
||||
$today_timestamp = date("Y-m-d H:i:s");
|
||||
|
||||
$this->view->shows = Show::getShows($today_timestamp, null, $excludeInstance=NULL, $onlyRecord=TRUE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -110,10 +110,11 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
{
|
||||
$controller = strtolower($request->getControllerName());
|
||||
|
||||
if ($controller == 'api'){
|
||||
$this->setRoleName("G");
|
||||
|
||||
} else if (!Zend_Auth::getInstance()->hasIdentity()){
|
||||
if ($controller == 'api' || $controller == 'recorder'){
|
||||
|
||||
$this->setRoleName("G");
|
||||
}
|
||||
else if (!Zend_Auth::getInstance()->hasIdentity()){
|
||||
|
||||
if ($controller !== 'login') {
|
||||
|
||||
|
|
|
@ -1,183 +0,0 @@
|
|||
<?
|
||||
/**
|
||||
* AccessRecur class
|
||||
*
|
||||
* Handles recursive accessPlaylist/releasePlaylist.
|
||||
* Should be 'required_once' from LocStor.php only.
|
||||
*
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class AccessRecur {
|
||||
public $ls;
|
||||
public $sessid;
|
||||
|
||||
public function __construct(&$ls, $sessid)
|
||||
{
|
||||
$this->ls =& $ls;
|
||||
$this->sessid = $sessid;
|
||||
}
|
||||
|
||||
|
||||
public static function accessPlaylist(&$ls, $sessid, $plid, $parent='0')
|
||||
{
|
||||
$ppa = new AccessRecur($ls, $sessid);
|
||||
$r = $ls->accessPlaylist($sessid, $plid, FALSE, $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$plRes = $r;
|
||||
$r = StoredFile::RecallByGunid($plid);
|
||||
if (is_null($r) || PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$ac = $r;
|
||||
$r = $ac->md->genPhpArray();
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$pla = $r;
|
||||
$r = $ppa->processPlaylist($pla, $plRes['token']);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$plRes['content'] = $r;
|
||||
return $plRes;
|
||||
}
|
||||
|
||||
|
||||
public static function releasePlaylist(&$ls, $sessid, $token)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$ppa = new AccessRecur($ls, $sessid);
|
||||
$r = $CC_DBC->getAll("
|
||||
SELECT to_hex(token)as token2, to_hex(gunid)as gunid
|
||||
FROM ".$CC_CONFIG['accessTable']."
|
||||
WHERE parent=x'{$token}'::bigint
|
||||
");
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$arr = $r;
|
||||
foreach ($arr as $i => $item) {
|
||||
extract($item); // token2, gunid
|
||||
$r = BasicStor::GetType($gunid);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$ftype = $r;
|
||||
# echo "$ftype/$token2\n";
|
||||
switch (strtolower($ftype)) {
|
||||
case "audioclip":
|
||||
$r = $ppa->ls->releaseRawAudioData($ppa->sessid, $token2);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
# var_dump($r);
|
||||
break;
|
||||
case "playlist":
|
||||
$r = $ppa->releasePlaylist($ppa->ls, $ppa->sessid, $token2);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
# var_dump($r);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
$r = $ppa->ls->releasePlaylist($ppa->sessid, $token, FALSE);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
private function processPlaylist($pla, $parent)
|
||||
{
|
||||
$res = array();
|
||||
foreach ($pla['children'] as $ple) {
|
||||
switch ($ple['elementname']) {
|
||||
case "playlistElement":
|
||||
$r = $this->processPlaylistElement($ple, $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
// $res = array_merge($res, $r);
|
||||
$res[] = $r;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
private function processAudioClip($gunid, $parent)
|
||||
{
|
||||
$r = $this->ls->accessRawAudioData($this->sessid, $gunid, $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
private function processPlaylistElement($ple, $parent='0')
|
||||
{
|
||||
foreach ($ple['children'] as $ac) {
|
||||
switch ($ac['elementname']) {
|
||||
case "audioClip":
|
||||
$r = $this->processAudioClip($ac['attrs']['id'], $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return $r;
|
||||
case "playlist":
|
||||
// if(empty($ac['children'])){
|
||||
$r = $this->accessPlaylist($this->ls, $this->sessid,
|
||||
$ac['attrs']['id'], $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
if ($r->getCode() != GBERR_NOTF) {
|
||||
return $r;
|
||||
} else {
|
||||
$r = $this->processPlaylist($ac, $parent);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$r = array(
|
||||
'content' => $r,
|
||||
'url' => NULL,
|
||||
'token' => NULL,
|
||||
'chsum' => NULL,
|
||||
'size' => NULL,
|
||||
'warning' => 'inline playlist?',
|
||||
);
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
/*
|
||||
}else{
|
||||
$r = $this->processPlaylist($ac, $parent);
|
||||
if(PEAR::isError($r)) return $r;
|
||||
$res = array(
|
||||
'content' => $r,
|
||||
'url' => NULL,
|
||||
'token' => NULL,
|
||||
'chsum' => NULL,
|
||||
'size' => NULL,
|
||||
'warning' => 'inline playlist',
|
||||
);
|
||||
return $res;
|
||||
}
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
} // class AccessRecur
|
|
@ -19,33 +19,6 @@ class Alib {
|
|||
/* ----------------------------------------------- session/authentication */
|
||||
|
||||
/* -------------------------------------------------------- authorization */
|
||||
/**
|
||||
* Insert permission record
|
||||
*
|
||||
* @param int $sid
|
||||
* local user/group id
|
||||
* @param string $action
|
||||
* @param int $oid
|
||||
* local object id
|
||||
* @param string $type
|
||||
* 'A'|'D' (allow/deny)
|
||||
* @return int
|
||||
* local permission id
|
||||
*/
|
||||
public static function AddPerm($sid, $action, $oid, $type='A')
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$permid = $CC_DBC->nextId($CC_CONFIG['permSequence']);
|
||||
$sql = "INSERT INTO ".$CC_CONFIG['permTable']." (permid, subj, action, obj, type)"
|
||||
." VALUES ($permid, $sid, '$action', $oid, '$type')";
|
||||
$r = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($r)) {
|
||||
return($r);
|
||||
}
|
||||
return $permid;
|
||||
} // fn addPerm
|
||||
|
||||
|
||||
/**
|
||||
* Remove permission record
|
||||
*
|
||||
|
|
|
@ -1,486 +0,0 @@
|
|||
<?php
|
||||
define('BACKUP_EXT', 'tar');
|
||||
define('ACCESS_TYPE', 'backup');
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class Backup
|
||||
{
|
||||
/**
|
||||
* Name of logfile
|
||||
* @var string
|
||||
*/
|
||||
private $logFile;
|
||||
|
||||
/**
|
||||
* Session id
|
||||
* @var string
|
||||
*/
|
||||
private $sessid;
|
||||
|
||||
/**
|
||||
* struct - see search criteria
|
||||
* @var array
|
||||
*/
|
||||
private $criteria;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* name of statusfile
|
||||
* @var string
|
||||
*/
|
||||
private $statusFile;
|
||||
|
||||
/**
|
||||
* Affected gunids
|
||||
* @var array
|
||||
*/
|
||||
private $ids;
|
||||
|
||||
/**
|
||||
* Array of affected filenames
|
||||
* @var array
|
||||
*/
|
||||
private $filenames = array();
|
||||
|
||||
/**
|
||||
* Base tmp name
|
||||
* @var string
|
||||
*/
|
||||
private $tmpName;
|
||||
|
||||
/**
|
||||
* Name of temporary tarball file
|
||||
* @var string
|
||||
*/
|
||||
private $tmpFile;
|
||||
|
||||
/**
|
||||
* Name of temporary directory
|
||||
* @var string
|
||||
*/
|
||||
private $tmpDir;
|
||||
|
||||
/**
|
||||
* Name of temporary playlist directory
|
||||
* @var string
|
||||
*/
|
||||
private $tmpDirPlaylist;
|
||||
|
||||
/**
|
||||
* Name of temporary audioclip directory
|
||||
* @var string
|
||||
*/
|
||||
private $tmpDirClip;
|
||||
|
||||
/**
|
||||
* Name of temporary metafile directory
|
||||
* @var string
|
||||
*/
|
||||
private $tmpDirMeta;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $loglevel = 'warn'; # 'debug';
|
||||
|
||||
/**
|
||||
* @var GreenBox
|
||||
*/
|
||||
private $gb;
|
||||
|
||||
/**
|
||||
* @param GreeenBox $gb
|
||||
*/
|
||||
public function __construct(&$gb)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$this->gb =& $gb;
|
||||
$this->token = null;
|
||||
$this->logFile = $CC_CONFIG['bufferDir'].'/'.ACCESS_TYPE.'.log';
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." construct\n");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open a backup
|
||||
* Create a backup file (tarball)
|
||||
*
|
||||
* @param string $sessid
|
||||
* @param array $criteria
|
||||
* struct - see search criteria
|
||||
* @return array
|
||||
* hasharray with field:
|
||||
* token string: backup token
|
||||
*/
|
||||
public function openBackup($sessid, $criteria='')
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." openBackup - sessid:$sessid\n");
|
||||
}
|
||||
$this->sessid = $sessid;
|
||||
$this->criteria = $criteria;
|
||||
|
||||
// get ids (and real filenames) which files match with criteria
|
||||
$srch = $this->gb->localSearch($this->criteria,$this->sessid);
|
||||
if (PEAR::isError($srch)) {
|
||||
return $srch;
|
||||
}
|
||||
$this->setIDs($srch);
|
||||
|
||||
// get real filenames
|
||||
if (is_array($this->ids)) {
|
||||
$this->setFilenames();
|
||||
|
||||
$this->setEnviroment(true);
|
||||
|
||||
// write a status file
|
||||
file_put_contents($this->statusFile, 'working');
|
||||
|
||||
// save the metafile to tmpdir
|
||||
$hostname = trim(`hostname`);
|
||||
$ctime = time();
|
||||
$ctime_f = date("Ymd-H:i:s");
|
||||
file_put_contents("{$this->tmpDirMeta}/storage.xml",
|
||||
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n".
|
||||
"<storage\n".
|
||||
" type=\"".ACCESS_TYPE."\"\n".
|
||||
" version=\"1.0\"\n".
|
||||
" ctime=\"$ctime\"\n".
|
||||
" hostname=\"$hostname\"\n".
|
||||
"/><!-- $ctime_f -->\n"
|
||||
);
|
||||
|
||||
// copy all file to tmpdir
|
||||
$this->copyAllFiles();
|
||||
|
||||
// do everything
|
||||
$this->doIt();
|
||||
|
||||
return array('token'=>$this->token);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the status of backup.
|
||||
*
|
||||
* @param unknown $token
|
||||
* @return array
|
||||
* status : string - susccess | working | fault
|
||||
* faultString: string - description of fault
|
||||
* token : stirng - backup token
|
||||
* url : string - access url
|
||||
* tmpfile : string - access filename
|
||||
*/
|
||||
public function checkBackup($token)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." checkBackup - token:$token\n");
|
||||
}
|
||||
$this->token = $token;
|
||||
$this->setEnviroment();
|
||||
$status = file_get_contents($this->statusFile);
|
||||
if (strpos($status,'fault')!==false) {
|
||||
list($status,$faultString) = explode('|',$status);
|
||||
}
|
||||
switch ($status) {
|
||||
case 'success':
|
||||
$r['url'] = BasicStor::GetUrlPart()."access/$token.".BACKUP_EXT;
|
||||
$r['tmpfile'] = $CC_CONFIG['accessDir']."/$token.".BACKUP_EXT;
|
||||
case 'working':
|
||||
case 'fault':
|
||||
$r['status'] = $status;
|
||||
$r['faultString'] = $faultString;
|
||||
$r['token'] = $token;
|
||||
break;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close a backup
|
||||
*
|
||||
* @param unknown $token
|
||||
* @return boolean
|
||||
*/
|
||||
public function closeBackup($token)
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." closeBackup - token:$token\n");
|
||||
}
|
||||
# post procedures
|
||||
$this->token = $token;
|
||||
$this->setEnviroment();
|
||||
BasicStor::bsRelease($token, ACCESS_TYPE);
|
||||
Backup::rRmDir($this->tmpDir);
|
||||
unlink($this->statusFile);
|
||||
unlink($this->tmpFile);
|
||||
if (is_file($this->tmpName)) {
|
||||
unlink($this->tmpName);
|
||||
}
|
||||
return !is_file($this->tmpFile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* list of unclosed backups
|
||||
*
|
||||
* @param string $stat
|
||||
* if this parameter is not set, then return with all unclosed backups
|
||||
* @return array of hasharray with field:
|
||||
* status : string - susccess | working | fault
|
||||
* token : stirng - backup token
|
||||
* url : string - access url
|
||||
*/
|
||||
public function listBackups($stat='')
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." listBackups - stat:$stat\n");
|
||||
}
|
||||
// open temporary dir
|
||||
$tokens = BasicStor::GetTokensByType(ACCESS_TYPE);
|
||||
// echo '<XMP>tokens:'; print_r($tokens); echo '</XMP>';
|
||||
foreach ($tokens as $token) {
|
||||
$st = $this->checkBackup($token);
|
||||
if ($stat=='' || $st['status']==$stat) {
|
||||
$r[] = $st;
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the ids from searchResult
|
||||
*
|
||||
* @param array $searchResult : array of gunids
|
||||
*/
|
||||
private function setIDs($searchResult)
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." setIDs\n");
|
||||
}
|
||||
if (is_array($searchResult['results'])) {
|
||||
$this->ids = $searchResult['results'];
|
||||
} else {
|
||||
$this->addLogItem("-E- ".date("Ymd-H:i:s")." setIDs - the parameter is not array!\n");
|
||||
return PEAR::raiseError('The IDs variable isn\'t array.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the filenames from ids.
|
||||
*
|
||||
*/
|
||||
private function setFilenames()
|
||||
{
|
||||
// if ($this->loglevel=='debug') {
|
||||
// $this->addLogItem("-I- ".date("Ymd-H:i:s")." setFilenames\n");
|
||||
// }
|
||||
// if (is_array($this->ids)) {
|
||||
// foreach ($this->ids as $i => $item) {
|
||||
// $gunid = $item['gunid'];
|
||||
// // get a stored file object of this gunid
|
||||
// $sf = StoredFile::RecallByGunid($gunid);
|
||||
// if (is_null($sf) || PEAR::isError($sf)) {
|
||||
// return $sf;
|
||||
// }
|
||||
// $lid = BasicStor::IdFromGunid($gunid);
|
||||
// if (($res = BasicStor::Authorize('read', $lid, $this->sessid)) !== TRUE) {
|
||||
// $this->addLogItem("-E- ".date("Ymd-H:i:s")." setFilenames - authorize gunid:$gunid\n");
|
||||
// return PEAR::raiseError('Backup::setFilenames : Authorize ... error.');
|
||||
// }
|
||||
// // if the file is a playlist then it has only a meta file
|
||||
// if (strtolower($sf->md->format) != 'playlist') {
|
||||
// $this->filenames[] = array(
|
||||
// 'filename' => $sf->getRealFileName(),
|
||||
// 'format' => $sf->md->format
|
||||
// );
|
||||
// }
|
||||
// $this->filenames[] = array(
|
||||
// 'filename' => $sf->getRealMetadataFileName(),
|
||||
// 'format' => $sf->md->format
|
||||
// );
|
||||
// if ($this->loglevel=='debug') {
|
||||
// $this->addLogItem("-I- ".date("Ymd-H:i:s")." setFilenames - add file: {$sf->md->format}|".$sf->getRealMetadataFileName()."\n");
|
||||
// }
|
||||
// }
|
||||
// return $this->filenames;
|
||||
// } else {
|
||||
// $this->addLogItem("-E- ".date("Ymd-H:i:s")." setFilenames - The IDs variable isn't array.\n");
|
||||
// return PEAR::raiseError('Backup::setFilenames : The IDs variable isn\'t array.');
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the tarball - call the shell script
|
||||
*
|
||||
*/
|
||||
private function doIt()
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." doIt\n");
|
||||
}
|
||||
$command = dirname(__FILe__)."/../bin/backup.sh"
|
||||
." {$this->tmpDir}"
|
||||
." {$this->tmpFile}"
|
||||
." {$this->statusFile}"
|
||||
." >> {$this->logFile} &";
|
||||
$res = system("$command");
|
||||
sleep(2);
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." doIt - command:$command\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy the real files into the tmp dirs to tar they.
|
||||
*
|
||||
*/
|
||||
private function copyAllFiles()
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." copyAllFiles\n");
|
||||
}
|
||||
//echo '<XMP>this->filenames:'; print_r($this->filenames); echo '</XMP>';
|
||||
if (is_array($this->filenames)) {
|
||||
foreach ($this->filenames as $v) {
|
||||
# get the filename from full path
|
||||
$fn = substr($v['filename'],strrpos($v['filename'],'/'));
|
||||
switch (strtolower($v['format'])) {
|
||||
case 'playlist':
|
||||
# if playlist then copy to the playlist dir
|
||||
copy($v['filename'],$this->tmpDirPlaylist.$fn);
|
||||
break;
|
||||
case 'audioclip':
|
||||
# if audioclip then copy to the audioclip dir
|
||||
copy($v['filename'],$this->tmpDirClip.$fn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Figure out the enviroment to the backup
|
||||
*
|
||||
*/
|
||||
private function setEnviroment($createDir=false)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." setEnviroment - createDirs:$createDir\n");
|
||||
}
|
||||
// create temporary directories
|
||||
if (is_null($this->token) && $createDir) {
|
||||
$this->tmpName = tempnam($CC_CONFIG['bufferDir'], ACCESS_TYPE.'_');
|
||||
$this->tmpFile = $this->tmpName.'.'.BACKUP_EXT;
|
||||
$this->tmpDir = $this->tmpName.'.dir';
|
||||
$this->tmpDirPlaylist = $this->tmpDir. '/playlist';
|
||||
$this->tmpDirClip = $this->tmpDir. '/audioClip';
|
||||
$this->tmpDirMeta = $this->tmpDir. '/meta-inf';
|
||||
touch($this->tmpFile);
|
||||
mkdir($this->tmpDir);
|
||||
mkdir($this->tmpDirPlaylist);
|
||||
mkdir($this->tmpDirClip);
|
||||
mkdir($this->tmpDirMeta);
|
||||
$this->genToken();
|
||||
} else {
|
||||
$symlink = $CC_CONFIG['accessDir'].'/'.$this->token.'.'.BACKUP_EXT;
|
||||
if (is_link($symlink) && is_file(readlink($symlink))) {
|
||||
$this->tmpName = str_replace('.tar','',readlink($symlink));
|
||||
$this->tmpFile = $this->tmpName.'.'.BACKUP_EXT;
|
||||
$this->tmpDir = $this->tmpName.'.dir';
|
||||
$this->tmpDirPlaylist = $this->tmpDir. '/playlist';
|
||||
$this->tmpDirClip = $this->tmpDir. '/audioClip';
|
||||
$this->tmpDirMeta = $this->tmpDir. '/meta-inf';
|
||||
} else {
|
||||
$this->addLogItem("-E- ".date("Ymd-H:i:s")." setEnviroment - Corrupt symbolic link.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->statusFile = $CC_CONFIG['accessDir'].'/'.$this->token.'.'.BACKUP_EXT.'.status';
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("this->tmpName: $this->tmpName\n");
|
||||
$this->addLogItem("this->tmpFile: $this->tmpFile\n");
|
||||
$this->addLogItem("this->tmpDir: $this->tmpDir\n");
|
||||
$this->addLogItem("this->tmpDirPlaylist: $this->tmpDirPlaylist\n");
|
||||
$this->addLogItem("this->tmpDirClip: $this->tmpDirClip\n");
|
||||
$this->addLogItem("this->tmpDirMeta: $this->tmpDirMeta\n");
|
||||
$this->addLogItem("this->token: $this->token\n");
|
||||
$this->addLogItem("this->statusFile: $this->statusFile\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate a new token.
|
||||
* @return void
|
||||
*/
|
||||
private function genToken()
|
||||
{
|
||||
$acc = BasicStor::bsAccess($this->tmpFile, BACKUP_EXT, null, ACCESS_TYPE);
|
||||
if (PEAR::isError($acc)) {
|
||||
return $acc;
|
||||
}
|
||||
$this->token = $acc['token'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a line to the logfile.
|
||||
*
|
||||
* @param string $item
|
||||
* the new row of log file
|
||||
*/
|
||||
private function addLogItem($item)
|
||||
{
|
||||
$f = fopen($this->logFile,'a');
|
||||
fwrite($f,$item);
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete a directory recursive
|
||||
*
|
||||
* @param string $dirname
|
||||
* path of dir.
|
||||
*/
|
||||
private static function rRmDir($dirname)
|
||||
{
|
||||
if (is_dir($dirname)) {
|
||||
$dir_handle = opendir($dirname);
|
||||
}
|
||||
while ($file = readdir($dir_handle)) {
|
||||
if ( ($file != ".") && ($file != "..") ) {
|
||||
if (!is_dir($dirname."/".$file)) {
|
||||
unlink ($dirname."/".$file);
|
||||
} else {
|
||||
Backup::rRmDir($dirname."/".$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir_handle);
|
||||
rmdir($dirname);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // classs Backup
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,351 +0,0 @@
|
|||
<?
|
||||
define('INDCH', ' ');
|
||||
|
||||
/**
|
||||
* M3uPlaylist class
|
||||
*
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class M3uPlaylist {
|
||||
|
||||
/**
|
||||
* Parse M3U file or string
|
||||
*
|
||||
* @param string $data
|
||||
* local path to M3U file or M3U string
|
||||
* @param string $loc
|
||||
* location: 'file'|'string'
|
||||
* @return array
|
||||
* reference, parse result tree (or PEAR::error)
|
||||
*/
|
||||
function &parse($data='', $loc='file')
|
||||
{
|
||||
switch ($loc) {
|
||||
case "file":
|
||||
if (!is_file($data)) {
|
||||
return PEAR::raiseError(
|
||||
"M3uPlaylist::parse: file not found ($data)"
|
||||
);
|
||||
}
|
||||
if (!is_readable($data)) {
|
||||
return PEAR::raiseError(
|
||||
"M3uPlaylist::parse: can't read file ($data)"
|
||||
);
|
||||
}
|
||||
$data = file_get_contents($data);
|
||||
case "string":
|
||||
$arr = preg_split("|\n#EXTINF: |", $data);
|
||||
if ($arr[0] != '#EXTM3U') {
|
||||
return PEAR::raiseError(
|
||||
"M3uPlaylist::parse: invalid M3U header"
|
||||
);
|
||||
}
|
||||
array_shift($arr);
|
||||
break;
|
||||
default:
|
||||
return PEAR::raiseError(
|
||||
"M3uPlaylist::parse: unsupported data location ($loc)"
|
||||
);
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Import M3U file to storage
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* @param string $aPath
|
||||
* absolute path part of imported file (e.g. /home/user/airtime)
|
||||
* @param string $rPath
|
||||
* relative path/filename part of imported file
|
||||
* (e.g. playlists/playlist_1.smil)
|
||||
* @param array $gunids
|
||||
* hash relation from filenames to gunids
|
||||
* @param string $plid
|
||||
* playlist gunid
|
||||
* @param int $subjid
|
||||
* local subject (user) id (id of user doing the import)
|
||||
* @return Playlist
|
||||
*/
|
||||
function import(&$gb, $aPath, $rPath, &$gunids, $plid, $subjid=NULL)
|
||||
{
|
||||
// $path = realpath("$aPath/$rPath");
|
||||
// if (FALSE === $path) {
|
||||
// return PEAR::raiseError(
|
||||
// "M3uPlaylist::import: file doesn't exist ($aPath/$rPath)"
|
||||
// );
|
||||
// }
|
||||
// $arr = M3uPlaylist::parse($path);
|
||||
// if (PEAR::isError($arr)) {
|
||||
// return $arr;
|
||||
// }
|
||||
// require_once("Playlist.php");
|
||||
// $pl =& Playlist::create($gb, $plid, "imported_M3U");
|
||||
// if (PEAR::isError($pl)) {
|
||||
// return $pl;
|
||||
// }
|
||||
// $r = $pl->lock($gb, $subjid);
|
||||
// if (PEAR::isError($r)) {
|
||||
// return $r;
|
||||
// }
|
||||
// foreach ($arr as $i => $it) {
|
||||
// list($md, $uri) = preg_split("|\n|", $it);
|
||||
// list($length, $title) = preg_split("|, *|", $md);
|
||||
// // $gunid = StoredFile::CreateGunid();
|
||||
// $gunid = ( isset($gunids[basename($uri)]) ? $gunids[basename($uri)] : NULL);
|
||||
// $acId = BasicStor::IdFromGunid($gunid);
|
||||
// if (PEAR::isError($acId)) {
|
||||
// return $acId;
|
||||
// }
|
||||
// $length = Playlist::secondsToPlaylistTime($length);
|
||||
// $offset = '???';
|
||||
// if (preg_match("|\.([a-zA-Z0-9]+)$|", $uri, $va)) {
|
||||
// switch (strtolower($ext = $va[1])) {
|
||||
// case "lspl":
|
||||
// case "xml":
|
||||
// case "smil":
|
||||
// case "m3u":
|
||||
// $acId = $gb->bsImportPlaylistRaw($gunid,
|
||||
// $aPath, $uri, $ext, $gunids, $subjid);
|
||||
// if (PEAR::isError($acId)) {
|
||||
// break;
|
||||
// }
|
||||
// //no break!
|
||||
// default:
|
||||
// if (is_null($gunid)) {
|
||||
// return PEAR::raiseError(
|
||||
// "M3uPlaylist::import: no gunid");
|
||||
// }
|
||||
// $r = $pl->addAudioClip($acId);
|
||||
// if (PEAR::isError($r)) {
|
||||
// return $r;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// $r = $pl->unlock($gb);
|
||||
// if (PEAR::isError($r)) {
|
||||
// return $r;
|
||||
// }
|
||||
// return $pl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Import M3U file to storage
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* @param string $data
|
||||
* local path to M3U file
|
||||
* @return string
|
||||
* XML playlist in Airtime playlist format
|
||||
*/
|
||||
function convert2lspl(&$gb, $data)
|
||||
{
|
||||
$arr = M3uPlaylist::parse($data);
|
||||
if (PEAR::isError($arr)) {
|
||||
return $arr;
|
||||
}
|
||||
$ind = '';
|
||||
$ind2 = $ind.INDCH;
|
||||
$ind3 = $ind2.INDCH;
|
||||
$res = '';
|
||||
foreach ($arr as $i => $it) {
|
||||
list($md, $uri) = preg_split("|\n|", $it);
|
||||
list($length, $title) = preg_split("|, *|", $md);
|
||||
$gunid = StoredFile::CreateGunid();
|
||||
$gunid2 = StoredFile::CreateGunid();
|
||||
$length = Playlist::secondsToPlaylistTime($length);
|
||||
$offset = '???';
|
||||
$clipStart = '???';
|
||||
$clipEnd = '???';
|
||||
$clipLength = '???';
|
||||
$uri_h = preg_replace("|--|", "d;d;", htmlspecialchars("$uri"));
|
||||
if (preg_match("|\.([a-zA-Z0-9]+)$|", $uri, $va)) {
|
||||
switch (strtolower($ext = $va[1])) {
|
||||
case "lspl":
|
||||
case "xml":
|
||||
case "smil":
|
||||
case "m3u":
|
||||
$acOrPl = "$ind3<playlist id=\"$gunid2\" ".
|
||||
"playlength=\"$length\" title=\"$title\"/> ".
|
||||
"<!-- $uri_h -->\n";
|
||||
break;
|
||||
default:
|
||||
$acOrPl = "$ind3<audioClip id=\"$gunid2\" ".
|
||||
"playlength=\"$length\" title=\"$title\"/> ".
|
||||
"<!-- $uri_h -->\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
$res .= "$ind2<playlistElement id=\"$gunid\" relativeOffset=\"$offset\" clipStart=\"$clipStart\" clipEnd=\"$clipEnd\" clipLength=\"$clipLength\">\n".
|
||||
$acOrPl.
|
||||
"$ind2</playlistElement>\n";
|
||||
}
|
||||
$res = "$ind<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n".
|
||||
"$ind<playlist id=\"$gunid\" playlength=\"$playlength\" title=\"\">\n".
|
||||
"$ind2<metadata/>\n".
|
||||
"$res".
|
||||
"$ind</playlist>\n";
|
||||
return $res;
|
||||
}
|
||||
} // class M3uPlaylist
|
||||
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class M3uPlaylistBodyElement {
|
||||
function convert2lspl(&$tree, $ind='')
|
||||
{
|
||||
$ind2 = $ind.INDCH;
|
||||
if ($tree->name != 'body') {
|
||||
return PEAR::raiseError("M3uPlaylist::parse: body tag expected");
|
||||
}
|
||||
if (isset($tree->children[1])) {
|
||||
return PEAR::raiseError(sprintf(
|
||||
"M3uPlaylist::parse: unexpected tag %s in tag body",
|
||||
$tree->children[1]->name
|
||||
));
|
||||
}
|
||||
$res = M3uPlaylistParElement::convert2lspl($tree->children[0], $ind2);
|
||||
if (PEAR::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
$gunid = StoredFile::CreateGunid();
|
||||
$playlength = '???'; // ***
|
||||
$res = "$ind<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n".
|
||||
"$ind<playlist id=\"$gunid\" playlength=\"$playlength\" title=\"\">\n".
|
||||
"$ind2<metadata/>\n".
|
||||
"$res".
|
||||
"$ind</playlist>\n";
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class M3uPlaylistParElement {
|
||||
function convert2lspl(&$tree, $ind='')
|
||||
{
|
||||
if ($tree->name != 'par') {
|
||||
return PEAR::raiseError("M3uPlaylist::parse: par tag expected");
|
||||
}
|
||||
$res = '';
|
||||
foreach ($tree->children as $i => $ch) {
|
||||
$ch =& $tree->children[$i];
|
||||
$r = M3uPlaylistAudioElement::convert2lspl($ch, $ind.INDCH);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$res .= $r;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class M3uPlaylistAudioElement {
|
||||
function convert2lspl(&$tree, $ind='')
|
||||
{
|
||||
$ind2 = $ind.INDCH;
|
||||
if ($tree->name != 'audio') {
|
||||
return PEAR::raiseError("M3uPlaylist::parse: audio tag expected");
|
||||
}
|
||||
if (isset($tree->children[2])) {
|
||||
return PEAR::raiseError(sprintf(
|
||||
"M3uPlaylist::parse: unexpected tag %s in tag audio",
|
||||
$tree->children[2]->name
|
||||
));
|
||||
}
|
||||
$res = ''; $fadeIn = 0; $fadeOut = 0;
|
||||
foreach ($tree->children as $i => $ch) {
|
||||
$ch =& $tree->children[$i];
|
||||
$r = M3uPlaylistAnimateElement::convert2lspl($ch, $ind2);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
switch ($r['type']) {
|
||||
case "fadeIn":
|
||||
$fadeIn = $r['val'];
|
||||
break;
|
||||
case "fadeOut":
|
||||
$fadeOut = $r['val'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($fadeIn > 0 || $fadeOut > 0) {
|
||||
$fadeIn = Playlist::secondsToPlaylistTime($fadeIn);
|
||||
$fadeOut = Playlist::secondsToPlaylistTime($fadeOut);
|
||||
$fInfo = "$ind2<fadeInfo fadeIn=\"$fadeIn\" fadeOut=\"$fadeOut\"/>\n";
|
||||
} else {
|
||||
$fInfo = '';
|
||||
}
|
||||
$plElGunid = StoredFile::CreateGunid();
|
||||
$aGunid = StoredFile::CreateGunid();
|
||||
$title = basename($tree->attrs['src']->val);
|
||||
$offset = Playlist::secondsToPlaylistTime($tree->attrs['begin']->val);
|
||||
$playlength = '???'; # ***
|
||||
$res = "$ind<playlistElement id=\"$plElGunid\" relativeOffset=\"$offset\">\n".
|
||||
"$ind2<audioClip id=\"$aGunid\" playlength=\"$playlength\" title=\"$title\"/>\n".
|
||||
$fInfo.
|
||||
"$ind</playlistElement>\n";
|
||||
return $res;
|
||||
}
|
||||
} // class M3uPlaylistAudioElement
|
||||
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class M3uPlaylistAnimateElement {
|
||||
function convert2lspl(&$tree, $ind='') {
|
||||
if ($tree->name != 'animate') {
|
||||
return PEAR::raiseError("M3uPlaylist::parse: animate tag expected");
|
||||
}
|
||||
if ($tree->attrs['attributeName']->val == 'soundLevel' &&
|
||||
$tree->attrs['from']->val == '0%' &&
|
||||
$tree->attrs['to']->val == '100%' &&
|
||||
$tree->attrs['calcMode']->val == 'linear' &&
|
||||
$tree->attrs['fill']->val == 'freeze' &&
|
||||
$tree->attrs['begin']->val == '0s' &&
|
||||
preg_match("|^([0-9.]+)s$|", $tree->attrs['end']->val, $va)
|
||||
) {
|
||||
return array('type'=>'fadeIn', 'val'=>$va[1]);
|
||||
}
|
||||
if ($tree->attrs['attributeName']->val == 'soundLevel' &&
|
||||
$tree->attrs['from']->val == '100%' &&
|
||||
$tree->attrs['to']->val == '0%' &&
|
||||
$tree->attrs['calcMode']->val == 'linear' &&
|
||||
$tree->attrs['fill']->val == 'freeze' &&
|
||||
preg_match("|^([0-9.]+)s$|", $tree->attrs['begin']->val, $vaBegin) &&
|
||||
preg_match("|^([0-9.]+)s$|", $tree->attrs['end']->val, $vaEnd)
|
||||
) {
|
||||
return array('type'=>'fadeOut', 'val'=>($vaEnd[1] - $vaBegin[1]));
|
||||
}
|
||||
return PEAR::raiseError(
|
||||
"M3uPlaylistAnimateElement::convert2lspl: animate parameters too general"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
<?php
|
||||
|
||||
define('INDCH', ' ');
|
||||
|
||||
/**
|
||||
* Auxiliary class for GreenBox playlist editing methods.
|
||||
*
|
||||
* remark: dcterms:extent format: hh:mm:ss.ssssss
|
||||
*
|
||||
* @package Airtime
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<?php
|
||||
|
||||
require_once("GreenBox.php");
|
||||
|
||||
/**
|
||||
* Preference storage class.
|
||||
*
|
||||
|
@ -14,17 +11,11 @@ require_once("GreenBox.php");
|
|||
/* ================== Prefs ================== */
|
||||
class Prefs {
|
||||
|
||||
public $gb;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* GreenBox object reference
|
||||
*/
|
||||
public function __construct(&$gb)
|
||||
public function __construct()
|
||||
{
|
||||
$this->gb =& $gb;
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,7 +33,7 @@ class Prefs {
|
|||
*/
|
||||
function loadPref($sessid, $key)
|
||||
{
|
||||
$subjid = GreenBox::GetSessUserId($sessid);
|
||||
$subjid = Alib::GetSessUserId($sessid);
|
||||
if (PEAR::isError($subjid)) {
|
||||
return $subjid;
|
||||
}
|
||||
|
@ -75,7 +66,7 @@ class Prefs {
|
|||
*/
|
||||
function savePref($sessid, $key, $value)
|
||||
{
|
||||
$subjid = GreenBox::GetSessUserId($sessid);
|
||||
$subjid = Alib::GetSessUserId($sessid);
|
||||
if (PEAR::isError($subjid)) {
|
||||
return $subjid;
|
||||
}
|
||||
|
@ -107,7 +98,7 @@ class Prefs {
|
|||
*/
|
||||
function delPref($sessid, $key)
|
||||
{
|
||||
$subjid = GreenBox::GetSessUserId($sessid);
|
||||
$subjid = Alib::GetSessUserId($sessid);
|
||||
if (PEAR::isError($subjid)) {
|
||||
return $subjid;
|
||||
}
|
||||
|
@ -180,7 +171,7 @@ class Prefs {
|
|||
*/
|
||||
function saveGroupPref($sessid, $group, $key, $value)
|
||||
{
|
||||
$uid = GreenBox::GetSessUserId($sessid);
|
||||
$uid = Alib::GetSessUserId($sessid);
|
||||
if (PEAR::isError($uid)) {
|
||||
return $uid;
|
||||
}
|
||||
|
@ -230,7 +221,7 @@ class Prefs {
|
|||
*/
|
||||
function delGroupPref($sessid, $group, $key)
|
||||
{
|
||||
$uid = GreenBox::GetSessUserId($sessid);
|
||||
$uid = Alib::GetSessUserId($sessid);
|
||||
if (PEAR::isError($uid)) {
|
||||
return $uid;
|
||||
}
|
||||
|
|
|
@ -1,289 +0,0 @@
|
|||
<?php
|
||||
define('RENDER_EXT', 'ogg');
|
||||
|
||||
require_once("Playlist.php");
|
||||
|
||||
/**
|
||||
* Renderer caller class
|
||||
*
|
||||
* Playlist to file rendering - PHP layer, caller to the renderer executable
|
||||
*
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
* @see LocStor
|
||||
*/
|
||||
class Renderer
|
||||
{
|
||||
|
||||
/**
|
||||
* Render playlist to ogg file (open handle)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $plid
|
||||
* playlist gunid
|
||||
* @param int $owner
|
||||
* local subject id, owner of token
|
||||
* @return array
|
||||
* token: string - render token
|
||||
*/
|
||||
function rnRender2FileOpen(&$gb, $plid, $owner=NULL)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
// recall playlist:
|
||||
$pl = StoredFile::RecallByGunid($plid);
|
||||
if (is_null($pl) || PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
}
|
||||
// smil export:
|
||||
$smil = $pl->outputToSmil();
|
||||
if (PEAR::isError($smil)) {
|
||||
return $smil;
|
||||
}
|
||||
// temporary file for smil:
|
||||
$tmpn = tempnam($CC_CONFIG['bufferDir'], 'plRender_');
|
||||
$smilf = "$tmpn.smil";
|
||||
file_put_contents($smilf, $smil);
|
||||
$url = "file://$smilf";
|
||||
// output file:
|
||||
$outf = "$tmpn.".RENDER_EXT;
|
||||
touch($outf);
|
||||
// logging:
|
||||
$logf = $CC_CONFIG['bufferDir']."/renderer.log";
|
||||
file_put_contents($logf, "--- ".date("Ymd-H:i:s")."\n", FILE_APPEND);
|
||||
// open access to output file: /*gunid*/ /*parent*/
|
||||
$acc = BasicStor::bsAccess($outf, RENDER_EXT, $plid, 'render', 0, $owner);
|
||||
if (PEAR::isError($acc)) {
|
||||
return $acc;
|
||||
}
|
||||
extract($acc);
|
||||
$statf = Renderer::getStatusFile($gb, $token);
|
||||
file_put_contents($statf, "working");
|
||||
// command:
|
||||
$stServDir = dirname(__FILE__)."/..";
|
||||
$renderExe = "$stServDir/bin/renderer.sh";
|
||||
$command = "$renderExe -p $url -o $outf -s $statf >> $logf &";
|
||||
file_put_contents($logf, "$command\n", FILE_APPEND);
|
||||
$res = system($command);
|
||||
if ($res === FALSE) {
|
||||
return PEAR::raiseError(
|
||||
'Renderer::rnRender2File: Error running renderer'
|
||||
);
|
||||
}
|
||||
return array('token'=>$token);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render playlist to ogg file (check results)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* GreenBox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array
|
||||
* status : string - success | working | fault
|
||||
* url : string - readable url
|
||||
*/
|
||||
function rnRender2FileCheck(&$gb, $token)
|
||||
{
|
||||
$statf = Renderer::getStatusFile($gb, $token);
|
||||
if (!file_exists($statf)) {
|
||||
return PEAR::raiseError(
|
||||
'Renderer::rnRender2FileCheck: Invalid token'
|
||||
);
|
||||
}
|
||||
$status = trim(file_get_contents($statf));
|
||||
$url = Renderer::getUrl($gb, $token);
|
||||
$tmpfile= Renderer::getLocalFile($gb, $token);
|
||||
return array('status'=>$status, 'url'=>$url, 'tmpfile'=>$tmpfile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render playlist to ogg file (list results)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $stat
|
||||
* status (optional) if this parameter is not set, then return with all unclosed backups
|
||||
* @return array
|
||||
* array of hasharray:
|
||||
* status : string - success | working | fault
|
||||
* url : string - readable url
|
||||
*/
|
||||
function rnRender2FileList(&$gb,$stat='') {
|
||||
// open temporary dir
|
||||
$tokens = BasicStor::GetTokensByType('render');
|
||||
foreach ($tokens as $token) {
|
||||
$st = Renderer::rnRender2FileCheck($gb, $token);
|
||||
if ( ($stat=='') || ($st['status']==$stat) ) {
|
||||
$r[] = $st;
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render playlist to ogg file (close handle)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return mixed
|
||||
* TRUE or PEAR_Error
|
||||
*/
|
||||
function rnRender2FileClose(&$gb, $token)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$r = BasicStor::bsRelease($token, 'render');
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$realOgg = $r['realFname'];
|
||||
$tmpn = $CC_CONFIG['bufferDir']."/".basename($realOgg, '.'.RENDER_EXT);
|
||||
$smilf = "$tmpn.smil";
|
||||
$statf = Renderer::getStatusFile($gb, $token);
|
||||
@unlink($statf);
|
||||
@unlink($realOgg);
|
||||
@unlink($smilf);
|
||||
@unlink($tmpn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render playlist to storage as audioClip (check results)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array
|
||||
* status : string - success | working | fault
|
||||
* gunid: string - global unique id of result file
|
||||
*/
|
||||
function rnRender2StorageCheck(&$gb, $token)
|
||||
{
|
||||
$r = Renderer::rnRender2FileCheck($gb, $token);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$status = $r['status'];
|
||||
$res = array('status' => $status, 'gunid'=>'NULL');
|
||||
switch ($status) {
|
||||
case "fault":
|
||||
$res['faultString'] = "Error runing renderer";
|
||||
break;
|
||||
case "success":
|
||||
$r = Renderer::rnRender2StorageCore($gb, $token);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$res['gunid'] = $r['gunid'];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render playlist to storage as audioClip (core method)
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array:
|
||||
* gunid: string - global unique id of result file
|
||||
*/
|
||||
function rnRender2StorageCore(&$gb, $token)
|
||||
{
|
||||
// $r = BasicStor::bsRelease($token, 'render');
|
||||
// if (PEAR::isError($r)) {
|
||||
// return $r;
|
||||
// }
|
||||
// $realOgg = $r['realFname'];
|
||||
// $owner = $r['owner'];
|
||||
// $gunid = $r['gunid'];
|
||||
// $fileName = 'rendered_playlist';
|
||||
// $id = BasicStor::IdFromGunid($gunid);
|
||||
// if (PEAR::isError($id)) {
|
||||
// return $id;
|
||||
// }
|
||||
// $mdata = '';
|
||||
// foreach (array('dc:title', 'dcterms:extent', 'dc:creator', 'dc:description') as $item) {
|
||||
// $val = $gb->bsGetMetadataValue($id, $item);
|
||||
// $mdata .= " <$item>$val</$item>\n";
|
||||
// }
|
||||
// $mdata = "<audioClip>\n <metadata>\n$mdata </metadata>\n</audioClip>\n";
|
||||
// //$mdata = "<audioClip>\n <metadata>\n$mdata<dcterms:extent>0</dcterms:extent>\n</metadata>\n</audioClip>\n";
|
||||
// $values = array(
|
||||
// "filename" => $fileName,
|
||||
// "filepath" => $realOgg,
|
||||
// "metadata" => $mdata,
|
||||
// "filetype" => "audioclip"
|
||||
// );
|
||||
// $storedFile = $gb->bsPutFile($values);
|
||||
// if (PEAR::isError($storedFile)) {
|
||||
// return $storedFile;
|
||||
// }
|
||||
// return array('gunid' => $storedFile->getGunid());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return local filepath of rendered file
|
||||
*
|
||||
* @param Greenbox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array
|
||||
*/
|
||||
function getLocalFile(&$gb, $token)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$token = StoredFile::NormalizeGunid($token);
|
||||
return $CC_CONFIG['accessDir']."/$token.".RENDER_EXT;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return filepath of render status file
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array
|
||||
*/
|
||||
function getStatusFile(&$gb, $token)
|
||||
{
|
||||
return Renderer::getLocalFile($gb, $token).".status";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return remote accessible URL for rendered file
|
||||
*
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
* @param string $token
|
||||
* render token
|
||||
* @return array
|
||||
*/
|
||||
function getUrl(&$gb, $token)
|
||||
{
|
||||
$token = StoredFile::NormalizeGunid($token);
|
||||
return BasicStor::GetUrlPart()."access/$token.".RENDER_EXT;
|
||||
}
|
||||
|
||||
} // class Renderer
|
||||
|
|
@ -1,436 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class Restore {
|
||||
/**
|
||||
* Name of logfile
|
||||
* @var string
|
||||
*/
|
||||
private $logFile;
|
||||
|
||||
/**
|
||||
* session id
|
||||
* @var string
|
||||
*/
|
||||
private $sessid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* Name of statusfile
|
||||
* @var string
|
||||
*/
|
||||
private $statusFile;
|
||||
|
||||
/**
|
||||
* Name of temporary directory, to here extract the backup tarball
|
||||
* @var string
|
||||
*/
|
||||
private $tmpDir;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
// private $loglevel = 'warn';
|
||||
public $loglevel = 'warn';
|
||||
// public $loglevel = 'debug';
|
||||
|
||||
/**
|
||||
* @var GreenBox
|
||||
*/
|
||||
private $gb;
|
||||
|
||||
private $ACCESS_TYPE = 'restore';
|
||||
|
||||
/**
|
||||
* @param GreenBox $gb
|
||||
* greenbox object reference
|
||||
*/
|
||||
public function __construct(&$gb)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$this->gb =& $gb;
|
||||
$this->token = null;
|
||||
$this->logFile = $CC_CONFIG['bufferDir'].'/'.$this->ACCESS_TYPE.'.log';
|
||||
if ($this->loglevel == 'debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." construct\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call asyncronously the restore procedure. Restore from backup.
|
||||
*
|
||||
* @param string $sessid
|
||||
* session id
|
||||
* @param string $backup_file
|
||||
* path of the backup file
|
||||
* @return array
|
||||
* hasharray with field:
|
||||
* token string: backup token
|
||||
*/
|
||||
function openRestore($sessid, $backup_file)
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I-".date("Ymd-H:i:s")." doRestore - sessid:$sessid\n");
|
||||
}
|
||||
$this->sessid = $sessid;
|
||||
|
||||
// generate token
|
||||
$this->token = StoredFile::CreateGunid();
|
||||
|
||||
// status file -> working
|
||||
$this->setEnviroment();
|
||||
file_put_contents($this->statusFile, 'working');
|
||||
|
||||
//call the restore script in background
|
||||
$command = dirname(__FILE__).'/../bin/restore.php';
|
||||
$runLog = "/dev/null";
|
||||
$params = "{$backup_file} {$this->statusFile} {$this->token} {$sessid}>> $runLog &";
|
||||
$ret = system("$command $params", $st);
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I-".date("Ymd-H:i:s")." restore.php call: $st/$ret\n");
|
||||
}
|
||||
|
||||
return array('token'=>$this->token);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the status of restore
|
||||
*
|
||||
* @param string $token
|
||||
* @return array
|
||||
* hasharray with field:
|
||||
* status : string - susccess | working | fault
|
||||
* faultString : string - description of fault
|
||||
* token : stirng - backup token
|
||||
* url : string - access url
|
||||
* tmpfile : string - access filename
|
||||
*/
|
||||
function checkRestore($token)
|
||||
{
|
||||
if ($this->loglevel == 'debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." checkBackup - token:$token\n");
|
||||
}
|
||||
$this->token = $token;
|
||||
$this->setEnviroment();
|
||||
if (is_file($this->statusFile)) {
|
||||
$r = array();
|
||||
$stat = file_get_contents($this->statusFile);
|
||||
if (strpos($stat,'fault|') !== false) {
|
||||
list($stat,$message) = explode('|',$stat);
|
||||
}
|
||||
$r['status'] = $stat;
|
||||
if ($stat=='fault') {
|
||||
$r['faultString'] = $message;
|
||||
} else {
|
||||
$r['faultString'] = '';
|
||||
}
|
||||
return $r;
|
||||
} else {
|
||||
return PEAR::raiseError('Restore::checkRestore: invalid token!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the status of restore.
|
||||
*
|
||||
* @param string $token
|
||||
* @return array
|
||||
* hasharray with field:
|
||||
* status : boolean - is success
|
||||
*/
|
||||
function closeRestore($token)
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." checkBackup - token:$token\n");
|
||||
}
|
||||
$this->token = $token;
|
||||
$this->setEnviroment();
|
||||
$this->rRmDir($this->tmpDir);
|
||||
unlink($this->statusFile);
|
||||
return array("status" => !is_file($this->statusFile));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do restore in background
|
||||
*
|
||||
* this function is called from the asyncron commandline script
|
||||
* ../bin/restore.php
|
||||
*
|
||||
* @param string $backupfile
|
||||
* path of backupfile
|
||||
* @param string $token
|
||||
* restore token
|
||||
* @param string $sessid
|
||||
* session id
|
||||
*/
|
||||
function startRestore($backupfile, $token, $sessid)
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." startRestore - bufile:$backupfile | token:$token\n");
|
||||
}
|
||||
$this->token = $token;
|
||||
$this->sessid = $sessid;
|
||||
$this->setEnviroment();
|
||||
|
||||
// extract tarball
|
||||
$command = 'tar -xf '.$backupfile .' --directory '.$this->tmpDir;
|
||||
$res = system($command);
|
||||
//$this->addLogItem('command: '.$command."\n");
|
||||
//$this->addLogItem('res: '.$res."\n");
|
||||
|
||||
//simple check of archive format
|
||||
if (is_dir($this->tmpDir.'audioClip/') &&
|
||||
is_dir($this->tmpDir.'meta-inf/') &&
|
||||
is_dir($this->tmpDir.'playlist/')) {
|
||||
//search metafiles
|
||||
$this->metafiles = $this->getMetaFiles();
|
||||
#$this->addLogItem('metafiles:'.print_r($this->metafiles,true));
|
||||
//add to storage server
|
||||
foreach ($this->metafiles as $info) {
|
||||
$r = $this->addFileToStorage($info['file'],$info['type'],$info['id']);
|
||||
if (PEAR::isError($r)) {
|
||||
$this->addLogItem("-E- ".date("Ymd-H:i:s").
|
||||
" startRestore - addFileToStorage \n".
|
||||
"(".$put->getMessage()."/".$put->getUserInfo().")\n"
|
||||
);
|
||||
file_put_contents($this->statusFile, 'fault|'.$put->getMessage()."/".$put->getUserInfo());
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->addLogItem("-E- ".date("Ymd-H:i:s")." startRestore - invalid archive format\n");
|
||||
file_put_contents($this->statusFile, 'fault|invalid archive format');
|
||||
return;
|
||||
}
|
||||
file_put_contents($this->statusFile, 'success');
|
||||
// unlink($backupfile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the metafiles.
|
||||
*
|
||||
* @return array
|
||||
* array of hasharray with field:
|
||||
* file : string - metafile path
|
||||
* type : stirng - audioClip | playlist
|
||||
* id : string - the backuped gunid
|
||||
*/
|
||||
function getMetaFiles()
|
||||
{
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." getMetaFiles - tmpDir:{$this->tmpDir}\n");
|
||||
}
|
||||
$audioclips = scandir($this->tmpDir.'audioClip/');
|
||||
$playlists = scandir($this->tmpDir.'playlist/');
|
||||
for ($i = 0; $i < count($audioclips); $i++) {
|
||||
if (strpos($audioclips[$i],'xml')!==false)
|
||||
$r[] = array('file' => $this->tmpDir.'audioClip/'.$audioclips[$i],
|
||||
'type' => 'audioClip',
|
||||
'id' => str_replace('.xml','',$audioclips[$i]));
|
||||
}
|
||||
for ($i = 0; $i < count($playlists); $i++) {
|
||||
if (strpos($playlists[$i],'xml') !== false)
|
||||
$r[] = array('file' => $this->tmpDir.'playlist/'.$playlists[$i],
|
||||
'type' => 'playlist',
|
||||
'id' => str_replace('.xml','',$playlists[$i]));
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the file to the storage server.
|
||||
*
|
||||
* @param string $file
|
||||
* path of metafile
|
||||
* @param string $type
|
||||
* restore token
|
||||
* @param string $sessid
|
||||
* session id
|
||||
*
|
||||
* @return mixed
|
||||
* true if success or PEAR_error
|
||||
*/
|
||||
// function addFileToStorage($file,$type,$gunid)
|
||||
// {
|
||||
// if ($this->loglevel=='debug') {
|
||||
// $this->addLogItem("-I- ".date("Ymd-H:i:s")." addFileToStorage - file:$file | type:$type | id:$gunid\n");
|
||||
// }
|
||||
// require_once("XmlParser.php");
|
||||
// $tree = XmlParser::parse($file);
|
||||
// $mediaFileLP = str_replace('.xml','',$file);
|
||||
// $mediaFileLP = ($type=='audioClip' && is_file($mediaFileLP))?$mediaFileLP:'';
|
||||
// $ex = $this->gb->existsFile($this->sessid,$gunid);
|
||||
// if (PEAR::isError($ex)) {
|
||||
// $this->addLogItem("-E- ".date("Ymd-H:i:s").
|
||||
// " addFileToStorage - existsFile($gunid) ".
|
||||
// "(".$ex->getMessage()."/".$ex->getUserInfo().")\n"
|
||||
// );
|
||||
// }
|
||||
// if (!PEAR::isError($ex) && $ex) { // file is exists in storage server
|
||||
// //replace it
|
||||
// $id = BasicStor::IdFromGunid($gunid);
|
||||
// $replace = $this->gb->replaceFile(
|
||||
// $id, # id int, virt.file's local id
|
||||
// $mediaFileLP, # mediaFileLP string, local path of media file
|
||||
// $file, # mdataFileLP string, local path of metadata file
|
||||
// $this->sessid); # sessid string, session id
|
||||
// if (PEAR::isError($replace)) {
|
||||
// $this->addLogItem("-E- ".date("Ymd-H:i:s").
|
||||
// " addFileToStorage - replaceFile Error ".
|
||||
// "(".$replace->getMessage()."/".$replace->getUserInfo().")\n"
|
||||
// );
|
||||
// file_put_contents($this->statusFile, 'fault|'.$replace->getMessage()."/".$replace->getUserInfo());
|
||||
// return $replace;
|
||||
// }
|
||||
// #$this->addLogItem("replace it \n");
|
||||
// } else {
|
||||
// // add as new
|
||||
// $name = $tree->children[0]->children[0]->content;
|
||||
// if (empty($name)) {
|
||||
// $name = $tree->attrs['title']->val;
|
||||
// }
|
||||
// if (empty($name)) {
|
||||
// $name = '???';
|
||||
// }
|
||||
// if ($this->loglevel=='debug') {
|
||||
// $this->addLogItem("-I- ".date("Ymd-H:i:s")." putFile\n".
|
||||
// "$name, $mediaFileLP, $file, {$this->sessid}, $gunid, $type \n"
|
||||
// );
|
||||
// }
|
||||
// $values = array(
|
||||
// "filename" => $name,
|
||||
// "filepath" => $mediaFileLP,
|
||||
// "metadata" => $file,
|
||||
// "gunid" => $gunid,
|
||||
// "filetype" => $type
|
||||
// );
|
||||
// $put = $this->gb->putFile($values, $this->sessid);
|
||||
// //$this->addLogItem("add as new \n");
|
||||
// if (PEAR::isError($put)) {
|
||||
// $this->addLogItem("-E- ".date("Ymd-H:i:s").
|
||||
// " addFileToStorage - putFile Error ".
|
||||
// "(".$put->getMessage()."/".$put->getUserInfo().")\n"
|
||||
// ."\n---\n".file_get_contents($file)."\n---\n"
|
||||
// );
|
||||
// file_put_contents($this->statusFile, 'fault|'.$put->getMessage()."/".$put->getUserInfo());
|
||||
// //$this->addLogItem("Error Object: ".print_r($put,true)."\n");
|
||||
// return $put;
|
||||
// }
|
||||
// }
|
||||
// $ac = StoredFile::RecallByGunid($gunid);
|
||||
// if (is_null($ac) || PEAR::isError($ac)) {
|
||||
// return $ac;
|
||||
// }
|
||||
// $res = $ac->setState('ready');
|
||||
// if (PEAR::isError($res)) {
|
||||
// return $res;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* Figure out the environment to the backup.
|
||||
*
|
||||
*/
|
||||
function setEnviroment()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
if ($this->loglevel=='debug') {
|
||||
$this->addLogItem("-I- ".date("Ymd-H:i:s")." setEnviroment\n");
|
||||
}
|
||||
$this->statusFile = $CC_CONFIG['accessDir'].'/'.$this->token.'.status';
|
||||
$this->tmpDir = '/tmp/ls_restore/'.$this->token.'/';
|
||||
$this->rMkDir($this->tmpDir);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a line to the logfile.
|
||||
*
|
||||
* @param string $item
|
||||
* the new row of log file
|
||||
*/
|
||||
function addLogItem($item)
|
||||
{
|
||||
$f = fopen ($this->logFile,'a');
|
||||
flock($f,LOCK_SH);
|
||||
fwrite($f,$item);
|
||||
flock($f,LOCK_UN);
|
||||
fclose($f);
|
||||
//echo file_get_contents($this->logFile)."<BR><BR>\n\n";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete a directory recursive
|
||||
*
|
||||
* @param string $dirname
|
||||
* path of dir
|
||||
*
|
||||
* @return boolean
|
||||
* is success
|
||||
*/
|
||||
function rRmDir($dirname)
|
||||
{
|
||||
if (is_dir($dirname)) {
|
||||
$dir_handle = opendir($dirname);
|
||||
}
|
||||
while ($file = readdir($dir_handle)) {
|
||||
if ($file!="." && $file!="..") {
|
||||
if (!is_dir($dirname."/".$file)) {
|
||||
unlink ($dirname."/".$file);
|
||||
} else {
|
||||
Restore::rRmDir($dirname."/".$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir_handle);
|
||||
rmdir($dirname);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a directory recursive
|
||||
*
|
||||
* @param string $dirname
|
||||
* path of dir.
|
||||
* @param int $mode
|
||||
* octal - rights of dir.
|
||||
* @param boolean $recursive
|
||||
* do it recursive.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function rMkDir($dirname, $mode=0777, $recursive=true)
|
||||
{
|
||||
if (is_null($dirname) || $dirname === "" ) {
|
||||
return false;
|
||||
}
|
||||
if (is_dir($dirname) || $dirname === "/" ) {
|
||||
return true;
|
||||
}
|
||||
if ($this->rMkDir(dirname($dirname), $mode, $recursive)) {
|
||||
return mkdir($dirname, $mode);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // class Restore
|
||||
|
|
@ -175,15 +175,26 @@ class Show {
|
|||
Show::populateShowUntilLastGeneratedDate($showId);
|
||||
}
|
||||
|
||||
public static function getShows($start_timestamp, $end_timestamp, $excludeInstance=NULL) {
|
||||
public static function getShows($start_timestamp, $end_timestamp, $excludeInstance=NULL, $onlyRecord=FALSE) {
|
||||
global $CC_DBC;
|
||||
|
||||
$sql = "SELECT starts, ends, show_id, name, description, color, background_color, cc_show_instances.id AS instance_id
|
||||
FROM cc_show_instances
|
||||
LEFT JOIN cc_show ON cc_show.id = cc_show_instances.show_id
|
||||
WHERE ((starts >= '{$start_timestamp}' AND starts < '{$end_timestamp}')
|
||||
LEFT JOIN cc_show ON cc_show.id = cc_show_instances.show_id";
|
||||
|
||||
//only want shows that are starting at the time or later.
|
||||
if($onlyRecord) {
|
||||
|
||||
$sql = $sql." WHERE (starts >= '{$start_timestamp}' AND starts < timestamp '{$start_timestamp}' + interval '2 hours')";
|
||||
$sql = $sql." AND (record = TRUE)";
|
||||
}
|
||||
else {
|
||||
|
||||
$sql = $sql." WHERE ((starts >= '{$start_timestamp}' AND starts < '{$end_timestamp}')
|
||||
OR (ends > '{$start_timestamp}' AND ends <= '{$end_timestamp}')
|
||||
OR (starts <= '{$start_timestamp}' AND ends >= '{$end_timestamp}'))";
|
||||
}
|
||||
|
||||
|
||||
if(isset($excludeInstance)) {
|
||||
foreach($excludeInstance as $instance) {
|
||||
|
@ -196,7 +207,6 @@ class Show {
|
|||
}
|
||||
|
||||
//echo $sql;
|
||||
|
||||
return $CC_DBC->GetAll($sql);
|
||||
}
|
||||
|
||||
|
|
|
@ -1271,14 +1271,14 @@ class StoredFile {
|
|||
if (!file_exists($this->filepath) || @unlink($this->filepath)) {
|
||||
$this->exists = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return PEAR::raiseError(
|
||||
"StoredFile::deleteFile: unlink failed ({$this->filepath})",
|
||||
GBERR_FILEIO
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->exists = FALSE;
|
||||
return TRUE;
|
||||
|
@ -1304,7 +1304,7 @@ class StoredFile {
|
|||
|
||||
Playlist::DeleteFileFromAllPlaylists($this->id);
|
||||
}
|
||||
|
||||
|
||||
$sql = "DELETE FROM ".$CC_CONFIG['filesTable']
|
||||
." WHERE gunid='{$this->gunid}'";
|
||||
$res = $CC_DBC->query($sql);
|
||||
|
@ -1717,7 +1717,7 @@ class StoredFile {
|
|||
|
||||
foreach($searchCols as $col) {
|
||||
$escapedTerm = pg_escape_string($term);
|
||||
$innerCond[] = "{$col}::text ILIKE '%{$escapedTerm}%'";
|
||||
$innerCond[] = "{$col}::text ILIKE '%{$escapedTerm}%'";
|
||||
}
|
||||
$outerCond[] = "(".join(" OR ", $innerCond).")";
|
||||
}
|
||||
|
|
|
@ -13,48 +13,11 @@ define('ALIBERR_BADSMEMB', 21);
|
|||
* @subpackage Alib
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
* @see ObjClasses
|
||||
* @see Alib
|
||||
*/
|
||||
class Subjects {
|
||||
|
||||
/* ======================================================= public methods */
|
||||
|
||||
/**
|
||||
* Add new subject (a.k.a. "user")
|
||||
*
|
||||
* @param string $p_login
|
||||
* @param string $p_pass
|
||||
* @param string $p_realname
|
||||
* @param boolean $p_passenc
|
||||
* password already encrypted if true
|
||||
* @return int|PEAR_Error
|
||||
*/
|
||||
public static function AddSubj($p_login, $p_pass=NULL, $p_realname='', $p_passenc=FALSE)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
if (!$p_login) {
|
||||
return $CC_DBC->raiseError("Subjects::AddSubj: empty login");
|
||||
}
|
||||
$id = $CC_DBC->nextId($CC_CONFIG['subjSequence']);
|
||||
if (PEAR::isError($id)) {
|
||||
return $id;
|
||||
}
|
||||
if (!is_null($p_pass) && !$p_passenc) {
|
||||
$p_pass = md5($p_pass);
|
||||
}
|
||||
$sql = "INSERT INTO ".$CC_CONFIG['subjTable']." (id, login, pass, type, realname)"
|
||||
." VALUES ($id, '$p_login', ".
|
||||
(is_null($p_pass) ? "'!', 'G'" : "'$p_pass', 'U'").",
|
||||
'$p_realname')";
|
||||
$r = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check login and password
|
||||
*
|
||||
|
@ -77,28 +40,6 @@ class Subjects {
|
|||
} // fn authenticate
|
||||
|
||||
|
||||
/**
|
||||
* Set lastlogin or lastfail timestamp
|
||||
*
|
||||
* @param string $login
|
||||
* @param boolean $failed
|
||||
* true=> set lastfail, false=> set lastlogin
|
||||
* @return boolean|int|PEAR_Error
|
||||
*/
|
||||
public static function SetTimeStamp($login, $failed=FALSE)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$fld = ($failed ? 'lastfail' : 'lastlogin');
|
||||
$sql = "UPDATE ".$CC_CONFIG['subjTable']." SET $fld=now()"
|
||||
." WHERE login='$login'";
|
||||
$r = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return TRUE;
|
||||
} // fn setTimeStamp
|
||||
|
||||
|
||||
/**
|
||||
* Change user password
|
||||
*
|
||||
|
@ -137,52 +78,6 @@ class Subjects {
|
|||
|
||||
/* --------------------------------------------------------------- groups */
|
||||
|
||||
/**
|
||||
* Add {login} and direct/indirect members to {gname} and to groups,
|
||||
* where {gname} is [in]direct member
|
||||
*
|
||||
* @param string $login
|
||||
* @param string $gname
|
||||
* @return int|PEAR_Error
|
||||
*/
|
||||
public static function AddSubjectToGroup($login, $gname)
|
||||
{
|
||||
$uid = Subjects::GetSubjId($login);
|
||||
if (PEAR::isError($uid)) {
|
||||
return $uid;
|
||||
}
|
||||
$gid = Subjects::GetSubjId($gname);
|
||||
if (PEAR::isError($gid)) {
|
||||
return $gid;
|
||||
}
|
||||
$isgr = Subjects::IsGroup($gid);
|
||||
if (PEAR::isError($isgr)) {
|
||||
return $isgr;
|
||||
}
|
||||
if (!$isgr) {
|
||||
return PEAR::raiseError("Subjects::addSubj2Gr: Not a group ($gname)", ALIBERR_NOTGR);
|
||||
}
|
||||
// add subject and all [in]direct members to group $gname:
|
||||
$mid = Subjects::_plainAddSubjectToGroup($uid, $gid);
|
||||
if (PEAR::isError($mid)) {
|
||||
return $mid;
|
||||
}
|
||||
// add it to all groups where $gname is [in]direct member:
|
||||
$marr = Subjects::_listRMemb($gid);
|
||||
if (PEAR::isError($marr)) {
|
||||
return $marr;
|
||||
}
|
||||
foreach ($marr as $k => $v) {
|
||||
$r = Subjects::_plainAddSubjectToGroup(
|
||||
$uid, $v['gid'], intval($v['level'])+1, $v['id']);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
return $mid;
|
||||
} // fn addSubj2Gr
|
||||
|
||||
|
||||
/* --------------------------------------------------------- info methods */
|
||||
|
||||
/**
|
||||
|
@ -201,114 +96,6 @@ class Subjects {
|
|||
} // fn getSubjId
|
||||
|
||||
|
||||
/**
|
||||
* Get subject name (login) from id
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $fld
|
||||
* @return string|PEAR_Error
|
||||
*/
|
||||
public static function GetSubjName($id, $fld='login')
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
global $CC_DBC;
|
||||
$sql = "SELECT $fld FROM ".$CC_CONFIG['subjTable']
|
||||
." WHERE id='$id'";
|
||||
return $CC_DBC->getOne($sql);
|
||||
} // fn getSubjName
|
||||
|
||||
|
||||
/**
|
||||
* Get one subject from the table.
|
||||
*
|
||||
* @param string $p_fieldValue
|
||||
* @param string $p_fieldName
|
||||
* @return array
|
||||
*/
|
||||
public static function GetSubject($p_fieldValue, $p_fieldName='login')
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
if (!in_array($p_fieldName, array("login", "id"))) {
|
||||
return null;
|
||||
}
|
||||
$escapedValue = pg_escape_string($p_fieldValue);
|
||||
$sql = "SELECT * FROM ".$CC_CONFIG['subjTable']
|
||||
." WHERE $p_fieldName='$escapedValue'";
|
||||
$row = $CC_DBC->GetRow($sql);
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all subjects
|
||||
*
|
||||
* @param string $flds
|
||||
* @return array|PEAR_Error
|
||||
*/
|
||||
public static function GetSubjects($flds='id, login')
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT $flds FROM ".$CC_CONFIG['subjTable'];
|
||||
return $CC_DBC->getAll($sql);
|
||||
} // fn getSubjects
|
||||
|
||||
|
||||
/**
|
||||
* Get subjects with count of direct members
|
||||
*
|
||||
* @return array|PEAR_Error
|
||||
*/
|
||||
public static function GetSubjectsWCnt()
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT count(m.uid)as cnt, s.id, s.login, s.type"
|
||||
." FROM ".$CC_CONFIG['subjTable']." s"
|
||||
." LEFT JOIN ".$CC_CONFIG['smembTable']." m ON m.gid=s.id"
|
||||
." WHERE m.mid is null"
|
||||
." GROUP BY s.id, s.login, s.type"
|
||||
." ORDER BY s.id";
|
||||
return $CC_DBC->getAll($sql);
|
||||
} // fn getSubjectsWCnt
|
||||
|
||||
|
||||
/**
|
||||
* Return true if subject is a group
|
||||
*
|
||||
* @param int $gid
|
||||
* @return boolean|PEAR_Error
|
||||
*/
|
||||
public static function IsGroup($gid)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
if (empty($gid)) {
|
||||
return FALSE;
|
||||
}
|
||||
$sql = "SELECT type FROM ".$CC_CONFIG['subjTable']
|
||||
." WHERE id='$gid'";
|
||||
$r = $CC_DBC->getOne($sql);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return ($r === 'G');
|
||||
} // fn isGroup
|
||||
|
||||
|
||||
/**
|
||||
* List direct members of group
|
||||
*
|
||||
* @param int $gid
|
||||
* @return array|PEAR_Error
|
||||
*/
|
||||
public static function ListGroup($gid)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT s.id, s.login, s.type"
|
||||
." FROM ".$CC_CONFIG['smembTable']." m, ".$CC_CONFIG['subjTable']." s"
|
||||
." WHERE m.uid=s.id AND m.mid is null AND m.gid='$gid'";
|
||||
return $CC_DBC->getAll($sql);
|
||||
} // fn listGroup
|
||||
|
||||
|
||||
/**
|
||||
* Return true if uid is [id]direct member of gid
|
||||
*
|
||||
|
@ -332,180 +119,5 @@ class Subjects {
|
|||
} // fn isMemberOf
|
||||
|
||||
|
||||
/* ==================================================== "private" methods */
|
||||
|
||||
/**
|
||||
* Create membership record
|
||||
*
|
||||
* @param int $uid
|
||||
* @param int $gid
|
||||
* @param int $level
|
||||
* @param int $mid
|
||||
* @return int|PEAR_Error
|
||||
*/
|
||||
private static function _addMemb($uid, $gid, $level=0, $mid='null')
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
if ($uid == $gid) {
|
||||
return PEAR::raiseError("Subjects::_addMemb: uid==gid ($uid)", ALIBERR_BADSMEMB);
|
||||
}
|
||||
$sql = "SELECT id, level, mid FROM ".$CC_CONFIG['smembTable']
|
||||
." WHERE uid='$uid' AND gid='$gid' ORDER BY level ASC";
|
||||
$a = $CC_DBC->getAll($sql);
|
||||
if (PEAR::isError($a)) {
|
||||
return $a;
|
||||
}
|
||||
if (count($a) > 0) {
|
||||
$a0 = $a[0];
|
||||
$id = $a0['id'];
|
||||
if ($level < intval($a0['level'])){
|
||||
$sql2 = "UPDATE ".$CC_CONFIG['smembTable']
|
||||
." SET level='$level', mid=$mid WHERE id='{$a0['id']}'";
|
||||
$r = $CC_DBC->query($sql2);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$id = $CC_DBC->nextId($CC_CONFIG['smembSequence']);
|
||||
if (PEAR::isError($id)) {
|
||||
return $id;
|
||||
}
|
||||
$sql3 = "INSERT INTO ".$CC_CONFIG['smembTable']." (id, uid, gid, level, mid)"
|
||||
." VALUES ($id, $uid, $gid, $level, $mid)";
|
||||
$r = $CC_DBC->query($sql3);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
return $id;
|
||||
} // fn _addMemb
|
||||
|
||||
|
||||
/**
|
||||
* Remove membership record
|
||||
*
|
||||
* @param int $mid
|
||||
* @return null|PEAR_Error
|
||||
*/
|
||||
private static function _removeMemb($mid)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "DELETE FROM ".$CC_CONFIG['smembTable']
|
||||
." WHERE id='$mid'";
|
||||
return $CC_DBC->query($sql);
|
||||
} // fn _removeMemb
|
||||
|
||||
|
||||
/**
|
||||
* List [in]direct members of group
|
||||
*
|
||||
* @param int $gid
|
||||
* @param int $uid
|
||||
* @return array|PEAR_Error
|
||||
*/
|
||||
private static function _listMemb($gid, $uid=NULL)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT id, uid, level FROM ".$CC_CONFIG['smembTable']
|
||||
." WHERE gid='$gid'".(is_null($uid) ? '' : " AND uid='$uid'");
|
||||
return $CC_DBC->getAll($sql);
|
||||
} // fn _listMemb
|
||||
|
||||
|
||||
/**
|
||||
* List groups where uid is [in]direct member
|
||||
*
|
||||
* @param int $gid
|
||||
* @param int $uid
|
||||
* @return array|PEAR_Error
|
||||
*/
|
||||
private static function _listRMemb($uid, $gid=NULL)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$sql = "SELECT id, gid, level FROM ".$CC_CONFIG['smembTable']
|
||||
." WHERE uid='$uid'".(is_null($gid) ? '' : " AND gid='$gid'");
|
||||
return $CC_DBC->getAll($sql);
|
||||
} // fn listRMemb
|
||||
|
||||
|
||||
/**
|
||||
* Add uid and its [in]direct members to gid
|
||||
*
|
||||
* @param int $uid
|
||||
* @param int $gid
|
||||
* @param int $level
|
||||
* @param int $rmid
|
||||
* @return int|PEAR_Error
|
||||
*/
|
||||
private static function _plainAddSubjectToGroup($uid, $gid, $level=0, $rmid='null')
|
||||
{
|
||||
$mid = Subjects::_addMemb($uid, $gid, $level, $rmid);
|
||||
if (PEAR::isError($mid)) {
|
||||
return $mid;
|
||||
}
|
||||
$marr = Subjects::_listMemb($uid);
|
||||
if (PEAR::isError($marr)) {
|
||||
return $marr;
|
||||
}
|
||||
foreach ($marr as $k => $v) {
|
||||
$r = Subjects::_addMemb(
|
||||
$v['uid'], $gid, intval($v['level'])+$level+1, $mid
|
||||
);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
return $mid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rebuild indirect membership records<br>
|
||||
* it's probably more complicated to do removing without rebuild ...
|
||||
*
|
||||
* @return true|PEAR_Error
|
||||
*/
|
||||
private static function _rebuildRels()
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$CC_DBC->query("BEGIN");
|
||||
$r = $CC_DBC->query("LOCK TABLE ".$CC_CONFIG['smembTable']);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$sql = "DELETE FROM ".$CC_CONFIG['smembTable']
|
||||
." WHERE mid is not null";
|
||||
$r = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$arr = $CC_DBC->getAll("SELECT uid, gid FROM ".$CC_CONFIG['smembTable']);
|
||||
// WHERE mid is null
|
||||
if (PEAR::isError($arr)) {
|
||||
return $arr;
|
||||
}
|
||||
foreach ($arr as $it) {
|
||||
$marr = Subjects::_listRMemb($it['gid']);
|
||||
if (PEAR::isError($marr)) {
|
||||
return $marr;
|
||||
}
|
||||
foreach ($marr as $k => $v) {
|
||||
$r = Subjects::_plainAddSubjectToGroup(
|
||||
$it['uid'], $v['gid'], intval($v['level'])+1, $v['id']
|
||||
);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
}
|
||||
$r = $CC_DBC->query("COMMIT");
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return TRUE;
|
||||
} // fn _rebuildRels
|
||||
|
||||
|
||||
} // class Subjects
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,419 +0,0 @@
|
|||
<?php
|
||||
|
||||
define('TR_LEAVE_CLOSED', TRUE);
|
||||
|
||||
/**
|
||||
* Auxiliary class for transport records
|
||||
*
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class TransportRecord
|
||||
{
|
||||
/**
|
||||
* @var DB
|
||||
*/
|
||||
//public $dbc;
|
||||
|
||||
/**
|
||||
* @var GreenBox
|
||||
*/
|
||||
private $gb;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
//private $config;
|
||||
|
||||
/**
|
||||
* @var Transport
|
||||
*/
|
||||
private $tr;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $recalled = FALSE;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $dropped = FALSE;
|
||||
|
||||
|
||||
/**
|
||||
* @param Transport $tr
|
||||
* @return TransportRecord
|
||||
*/
|
||||
public function __construct(&$tr)
|
||||
{
|
||||
$this->tr =& $tr;
|
||||
$this->gb =& $tr->gb;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Factory method
|
||||
*
|
||||
* @param Transport $tr
|
||||
* @param string $trtype
|
||||
* transport type (see Transport::install)
|
||||
* @param string $direction
|
||||
* 'up' | 'down'
|
||||
* @param array $defaults
|
||||
* default parameters (optional, internal use)
|
||||
* @return TransportRecord
|
||||
*/
|
||||
function create(&$tr, $trtype, $direction='up', $defaults=array())
|
||||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
$trec = new TransportRecord($tr);
|
||||
$trec->trtok = $trtok = $tr->_createTransportToken();
|
||||
$trec->row = array_merge($defaults,
|
||||
array('trtype'=>$trtype, 'direction'=>$direction));
|
||||
$trec->recalled = TRUE;
|
||||
if (!isset($defaults['title'])) {
|
||||
$defaults['title'] = $trec->getTitle();
|
||||
if (PEAR::isError($defaults['title'])) {
|
||||
return $defaults['title'];
|
||||
}
|
||||
}
|
||||
$id = $CC_DBC->nextId($CC_CONFIG['transSequence']);
|
||||
$names = "id, trtok, direction, state, trtype, start, ts";
|
||||
$values = "$id, '$trtok', '$direction', 'init', '$trtype', now(), now()";
|
||||
foreach ($defaults as $k => $v) {
|
||||
$sqlVal = $trec->_getSqlVal($k, $v);
|
||||
$names .= ", $k";
|
||||
$values .= ", $sqlVal";
|
||||
}
|
||||
$query = "
|
||||
INSERT INTO ".$CC_CONFIG['transTable']."
|
||||
($names)
|
||||
VALUES
|
||||
($values)
|
||||
";
|
||||
$res = $CC_DBC->query($query);
|
||||
if (PEAR::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
return $trec;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recall transport record from DB
|
||||
*
|
||||
* @param Transport $tr
|
||||
* @param string $trtok
|
||||
* transport token
|
||||
* @return TransportRecord
|
||||
*/
|
||||
function recall(&$tr, $trtok)
|
||||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
$trec = new TransportRecord($tr);
|
||||
$trec->trtok = $trtok;
|
||||
$row = $CC_DBC->getRow("
|
||||
SELECT
|
||||
id, trtok, state, trtype, direction,
|
||||
to_hex(gunid)as gunid, to_hex(pdtoken)as pdtoken,
|
||||
fname, localfile, url, rtrtok, mdtrtok, uid,
|
||||
expectedsize, realsize, expectedsum, realsum,
|
||||
errmsg, title, jobpid
|
||||
FROM ".$CC_CONFIG['transTable']."
|
||||
WHERE trtok='$trtok'
|
||||
");
|
||||
if (PEAR::isError($row)) {
|
||||
return $row;
|
||||
}
|
||||
if (is_null($row)) {
|
||||
return PEAR::raiseError("TransportRecord::recall:".
|
||||
" invalid transport token ($trtok)", TRERR_TOK
|
||||
);
|
||||
}
|
||||
$row['pdtoken'] = StoredFile::NormalizeGunid($row['pdtoken']);
|
||||
$row['gunid'] = StoredFile::NormalizeGunid($row['gunid']);
|
||||
$trec->row = $row;
|
||||
$trec->recalled = TRUE;
|
||||
return $trec;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set state of transport record
|
||||
*
|
||||
* @param string $newState
|
||||
* @param array $data
|
||||
* other data fields to set
|
||||
* @param string $oldState
|
||||
* check old state and do nothing if differ
|
||||
* @param boolean $lock
|
||||
* check lock and do nothing if differ
|
||||
* @return boolean success
|
||||
*/
|
||||
function setState($newState, $data=array(), $oldState=NULL, $lock=NULL)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$set = " state='$newState', ts=now()";
|
||||
if (!is_null($lock)) {
|
||||
$slock = ($lock ? 'Y' : 'N');
|
||||
$nlock = (!$lock);
|
||||
$snlock = ($nlock ? 'Y' : 'N');
|
||||
$set .= ", lock='$snlock'";
|
||||
}
|
||||
foreach ($data as $k => $v) {
|
||||
$set .= ", $k=".$this->_getSqlVal($k, $v);
|
||||
}
|
||||
$r = $CC_DBC->query("
|
||||
UPDATE ".$CC_CONFIG['transTable']."
|
||||
SET $set
|
||||
WHERE trtok='{$this->trtok}'".
|
||||
(is_null($oldState) ? '' : " AND state='$oldState'").
|
||||
(is_null($lock) ? '' : " AND lock = '$slock'")
|
||||
);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
// return TRUE;
|
||||
$affRows = $CC_DBC->affectedRows();
|
||||
if (PEAR::isError($affRows)) {
|
||||
return $affRows;
|
||||
}
|
||||
return ($affRows == 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return state of transport record
|
||||
*
|
||||
* @return string
|
||||
* state
|
||||
*/
|
||||
function getState()
|
||||
{
|
||||
if (!$this->recalled) {
|
||||
return PEAR::raiseError("TransportRecord::getState:".
|
||||
" not recalled ({$this->trtok})", TRERR_TOK
|
||||
);
|
||||
}
|
||||
return $this->row['state'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set lock on transport record and save/clear process id
|
||||
*
|
||||
* @param boolean $lock
|
||||
* lock if true, release lock if false
|
||||
* @param int $pid
|
||||
* process id
|
||||
* @return mixed
|
||||
* true or error
|
||||
*/
|
||||
function setLock($lock, $pid=NULL)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$pidsql = (is_null($pid) ? "NULL" : "$pid" );
|
||||
if ($this->dropped) {
|
||||
return TRUE;
|
||||
}
|
||||
$slock = ($lock ? 'Y' : 'N');
|
||||
$nlock = (!$lock);
|
||||
$snlock = ($nlock ? 'Y' : 'N');
|
||||
$r = $CC_DBC->query("
|
||||
UPDATE ".$CC_CONFIG['transTable']."
|
||||
SET lock='$slock', jobpid=$pidsql, ts=now()
|
||||
WHERE trtok='{$this->trtok}' AND lock = '$snlock'"
|
||||
);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$affRows = $CC_DBC->affectedRows();
|
||||
if (PEAR::isError($affRows)) {
|
||||
return $affRows;
|
||||
}
|
||||
if ($affRows === 0) {
|
||||
$ltxt = ($lock ? 'lock' : 'unlock' );
|
||||
return PEAR::raiseError(
|
||||
"TransportRecord::setLock: can't $ltxt ({$this->trtok})"
|
||||
);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return type of transport
|
||||
*
|
||||
* @return string
|
||||
* Transport type
|
||||
*/
|
||||
function getTransportType()
|
||||
{
|
||||
if (!$this->recalled) {
|
||||
return PEAR::raiseError("TransportRecord::getTransportType:".
|
||||
" not recalled ({$this->trtok})", TRERR_TOK
|
||||
);
|
||||
}
|
||||
return $this->row['trtype'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Kill transport job (on pause or cancel)
|
||||
*
|
||||
* @return string
|
||||
* Transport type
|
||||
*/
|
||||
function killJob()
|
||||
{
|
||||
if (!$this->recalled) {
|
||||
return PEAR::raiseError("TransportRecord::getTransportType:".
|
||||
" not recalled ({$this->trtok})", TRERR_TOK
|
||||
);
|
||||
}
|
||||
$jobpid = $this->row['jobpid'];
|
||||
$res = system("pkill -P $jobpid", $status);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set state to failed and set error message in transport record
|
||||
*
|
||||
* @param string $txt
|
||||
* base part of error message
|
||||
* @param PEAR_Error $eo
|
||||
* (opt.) error msg can be construct from it
|
||||
* @return mixed
|
||||
* boolean true or error
|
||||
*/
|
||||
function fail($txt='', $eo=NULL)
|
||||
{
|
||||
if (!$this->recalled) {
|
||||
return PEAR::raiseError("TransportRecord::fail:".
|
||||
" not recalled ({$this->trtok})", TRERR_TOK
|
||||
);
|
||||
}
|
||||
$msg = $txt;
|
||||
if (!is_null($eo)) {
|
||||
$msg .= $eo->getMessage()." ".$eo->getUserInfo().
|
||||
" [".$eo->getCode()."]";
|
||||
}
|
||||
$r = $this->setState('failed', array('errmsg'=>$msg));
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close transport record
|
||||
*
|
||||
* @return mixed
|
||||
* boolean true or error
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
if (!$this->recalled) {
|
||||
return PEAR::raiseError("TransportRecord::close:".
|
||||
" not recalled ({$this->trtok})", TRERR_TOK
|
||||
);
|
||||
}
|
||||
if (TR_LEAVE_CLOSED) {
|
||||
$r = $this->setState('closed');
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
} else {
|
||||
$r = $CC_DBC->query("
|
||||
DELETE FROM ".$CC_CONFIG['transTable']."
|
||||
WHERE trtok='{$this->trtok}'
|
||||
");
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$this->recalled = FALSE;
|
||||
$this->dropped = TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add field specific envelopes to values (e.g. ' around strings)
|
||||
*
|
||||
* @param string $fldName
|
||||
* field name
|
||||
* @param mixed $fldVal
|
||||
* field value
|
||||
* @return string
|
||||
*/
|
||||
function _getSqlVal($fldName, $fldVal)
|
||||
{
|
||||
switch ($fldName) {
|
||||
case 'realsize':
|
||||
case 'expectedsize':
|
||||
case 'uid':
|
||||
return ("$fldVal"!='' ? "$fldVal" : "NULL");
|
||||
break;
|
||||
case 'gunid':
|
||||
case 'pdtoken':
|
||||
return "x'$fldVal'::bigint";
|
||||
break;
|
||||
default:
|
||||
$fldVal = pg_escape_string($fldVal);
|
||||
return "'$fldVal'";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get title from transported object's metadata (if exists)
|
||||
*
|
||||
* @return string
|
||||
* the title or descriptive string
|
||||
*/
|
||||
function getTitle()
|
||||
{
|
||||
$defStr = 'unknown';
|
||||
$trtype = $this->getTransportType(); //contains recall check
|
||||
if (PEAR::isError($trtype)) {
|
||||
return $trtype;
|
||||
}
|
||||
switch ($trtype) {
|
||||
case "audioclip":
|
||||
case "playlist":
|
||||
case "playlistPkg":
|
||||
case "metadata":
|
||||
$title = $this->gb->bsGetTitle(NULL, $this->row['gunid']);
|
||||
if (is_null($title)) {
|
||||
$title = $defStr;
|
||||
}
|
||||
if (PEAR::isError($title)) {
|
||||
if ($title->getCode() == GBERR_FOBJNEX) {
|
||||
$title = $defStr;
|
||||
} else {
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "searchjob":
|
||||
$title = 'searchjob';
|
||||
break;
|
||||
case "file":
|
||||
$title = ( isset($this->row['localfile']) ?
|
||||
basename($this->row['localfile']) : 'regular file');
|
||||
break;
|
||||
default:
|
||||
$title = $defStr;
|
||||
}
|
||||
return $title;
|
||||
}
|
||||
|
||||
} // class TransportRecord
|
||||
|
|
@ -1,385 +0,0 @@
|
|||
<?php
|
||||
define('VAL_ROOT', 110);
|
||||
define('VAL_NOREQE', 111);
|
||||
define('VAL_NOONEOF', 112);
|
||||
define('VAL_UNKNOWNE', 113);
|
||||
define('VAL_UNKNOWNA', 114);
|
||||
define('VAL_NOTDEF', 115);
|
||||
define('VAL_UNEXPONEOF', 116);
|
||||
define('VAL_FORMAT', 117);
|
||||
define('VAL_CONTENT', 118);
|
||||
define('VAL_NOREQA', 119);
|
||||
define('VAL_ATTRIB', 120);
|
||||
define('VAL_PREDXML', 121);
|
||||
|
||||
/**
|
||||
* Simple XML validator against structure stored in PHP hash-array hierarchy.
|
||||
*
|
||||
* Basic format files:
|
||||
* <ul>
|
||||
* <li>audioClipFormat.php</li>
|
||||
* <li>webstreamFormat.php</li>
|
||||
* <li>playlistFormat.php</li>
|
||||
* </ul>
|
||||
* It probably should be replaced by XML schema validation in the future.
|
||||
*
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
class Validator {
|
||||
/**
|
||||
* Format type of validated document
|
||||
* @var string
|
||||
*/
|
||||
private $format = NULL;
|
||||
|
||||
/**
|
||||
* Preloaded format tree structure
|
||||
* @var array
|
||||
*/
|
||||
private $formTree = NULL;
|
||||
|
||||
/**
|
||||
* Gunid of validated file for identification in mass input
|
||||
* @var string
|
||||
*/
|
||||
private $gunid = NULL;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $format
|
||||
* format type of validated document
|
||||
* @param string $gunid
|
||||
* gunid of validated file for identification in mass input
|
||||
*/
|
||||
public function __construct($format, $gunid)
|
||||
{
|
||||
$format = strtolower($format);
|
||||
$this->format = $format;
|
||||
$this->gunid = $gunid;
|
||||
$formats = array(
|
||||
'audioclip' => "audioClipFormat",
|
||||
'playlist' => "playlistFormat",
|
||||
'webstream' => "webstreamFormat",
|
||||
);
|
||||
if (!isset($formats[$format])) {
|
||||
return $this->_err(VAL_FORMAT);
|
||||
}
|
||||
$formatName = $formats[$format];
|
||||
$formatFile = dirname(__FILE__)."/$formatName.php";
|
||||
if (!file_exists($formatFile)) {
|
||||
return $this->_err(VAL_FORMAT);
|
||||
}
|
||||
require($formatFile);
|
||||
$this->formTree = $$formatName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate document - only wrapper for validateNode method
|
||||
*
|
||||
* @param object $data
|
||||
* validated object tree
|
||||
* @return mixed
|
||||
* TRUE or PEAR::error
|
||||
*/
|
||||
function validate(&$data)
|
||||
{
|
||||
$r = $this->validateNode($data, $this->formTree['_root']);
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate one metadata value (on insert/update)
|
||||
*
|
||||
* @param string $fname
|
||||
* parent element name
|
||||
* @param string $category
|
||||
* qualif.category name
|
||||
* @param string $predxml
|
||||
* 'A' | 'T' (attr or tag)
|
||||
* @param string $value
|
||||
* validated element value
|
||||
* @return TRUE|PEAR_Error
|
||||
*/
|
||||
function validateOneValue($fname, $category, $predxml, $value)
|
||||
{
|
||||
$formTree =& $this->formTree;
|
||||
switch ($predxml) {
|
||||
case 'T':
|
||||
if (!$this->isChildInFormat($fname, $category)) {
|
||||
return $this->_err(VAL_UNKNOWNE, "$category in $fname");
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
if (!$this->isAttrInFormat($fname, $category)) {
|
||||
return $this->_err(VAL_UNKNOWNA, "$category in $fname");
|
||||
}
|
||||
break;
|
||||
case 'N':
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
return $this->_err(VAL_PREDXML, $predxml);
|
||||
}
|
||||
if (isset($formTree[$category]['regexp'])) {
|
||||
// echo "XXX {$formTree[$fname]['regexp']} / ".$node->content."\n";
|
||||
if (!preg_match("|{$formTree[$category]['regexp']}|", $value)) {
|
||||
return $this->_err(VAL_CONTENT, "$category/$value");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validation of one element node from object tree
|
||||
*
|
||||
* @param object $node
|
||||
* validated node
|
||||
* @param string $fname
|
||||
* actual name in format structure
|
||||
* @return mixed
|
||||
* TRUE or PEAR::error
|
||||
*/
|
||||
function validateNode(&$node, $fname)
|
||||
{
|
||||
$dname = (($node->ns? $node->ns.":" : '').$node->name);
|
||||
$formTree =& $this->formTree;
|
||||
if (DEBUG) {
|
||||
echo"\nVAL::validateNode: 1 $dname/$fname\n";
|
||||
}
|
||||
// check root node name:
|
||||
if ($dname != $fname) {
|
||||
return $this->_err(VAL_ROOT, $fname);
|
||||
}
|
||||
// check if this element is defined in format:
|
||||
if (!isset($formTree[$fname])) {
|
||||
return $this->_err(VAL_NOTDEF, $fname);
|
||||
}
|
||||
// check element content
|
||||
if (isset($formTree[$fname]['regexp'])) {
|
||||
// echo "XXX {$formTree[$fname]['regexp']} / ".$node->content."\n";
|
||||
if (!preg_match("|{$formTree[$fname]['regexp']}|", $node->content)) {
|
||||
return $this->_err(VAL_CONTENT, "$fname/{$node->content}");
|
||||
}
|
||||
}
|
||||
// validate attributes:
|
||||
$ra = $this->validateAttributes($node, $fname);
|
||||
if (PEAR::isError($ra)) {
|
||||
return $ra;
|
||||
}
|
||||
// validate children:
|
||||
$r = $this->validateChildren($node, $fname);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validation of attributes
|
||||
*
|
||||
* @param object $node
|
||||
* validated node
|
||||
* @param string $fname
|
||||
* actual name in format structure
|
||||
* @return mixed
|
||||
* TRUE or PEAR::error
|
||||
*/
|
||||
function validateAttributes(&$node, $fname)
|
||||
{
|
||||
$formTree =& $this->formTree;
|
||||
$attrs = array();
|
||||
// check if all attrs are permitted here:
|
||||
foreach ($node->attrs as $i => $attr) {
|
||||
$aname = (($attr->ns? $attr->ns.":" : '').$attr->name);
|
||||
$attrs[$aname] =& $node->attrs[$i];
|
||||
if (!$this->isAttrInFormat($fname, $aname)) {
|
||||
return $this->_err(VAL_UNKNOWNA, $aname);
|
||||
}
|
||||
// check attribute format
|
||||
// echo "XXA $aname\n";
|
||||
if (isset($formTree[$aname]['regexp'])) {
|
||||
// echo "XAR {$formTree[$fname]['regexp']} / ".$node->content."\n";
|
||||
if (!preg_match("|{$formTree[$aname]['regexp']}|", $attr->val)) {
|
||||
return $this->_err(VAL_ATTRIB, "$aname [".var_export($attr->val,TRUE)."]");
|
||||
}
|
||||
}
|
||||
}
|
||||
// check if all required attrs are here:
|
||||
if (isset($formTree[$fname]['attrs'])) {
|
||||
$fattrs =& $formTree[$fname]['attrs'];
|
||||
if (isset($fattrs['required'])) {
|
||||
foreach ($fattrs['required'] as $i => $attr) {
|
||||
if (!isset($attrs[$attr])) {
|
||||
return $this->_err(VAL_NOREQA, $attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validation children nodes
|
||||
*
|
||||
* @param object $node
|
||||
* validated node
|
||||
* @param string $fname
|
||||
* actual name in format structure
|
||||
* @return mixed
|
||||
* TRUE or PEAR::error
|
||||
*/
|
||||
function validateChildren(&$node, $fname)
|
||||
{
|
||||
$formTree =& $this->formTree;
|
||||
$childs = array();
|
||||
// check if all children are permitted here:
|
||||
foreach ($node->children as $i => $ch) {
|
||||
$chname = (($ch->ns? $ch->ns.":" : '').$ch->name);
|
||||
// echo "XXE $chname\n";
|
||||
if (!$this->isChildInFormat($fname, $chname)) {
|
||||
return $this->_err(VAL_UNKNOWNE, $chname);
|
||||
}
|
||||
// call children recursive:
|
||||
$r = $this->validateNode($node->children[$i], $chname);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
$childs[$chname] = TRUE;
|
||||
}
|
||||
// check if all required children are here:
|
||||
if (isset($formTree[$fname]['childs'])) {
|
||||
$fchilds =& $formTree[$fname]['childs'];
|
||||
if (isset($fchilds['required'])) {
|
||||
foreach ($fchilds['required'] as $i => $ch) {
|
||||
if (!isset($childs[$ch])) return $this->_err(VAL_NOREQE, $ch);
|
||||
}
|
||||
}
|
||||
// required one from set
|
||||
if (isset($fchilds['oneof'])) {
|
||||
$one = FALSE;
|
||||
foreach ($fchilds['oneof'] as $i => $ch) {
|
||||
if (isset($childs[$ch])) {
|
||||
if ($one) {
|
||||
return $this->_err(VAL_UNEXPONEOF, "$ch in $fname");
|
||||
}
|
||||
$one = TRUE;
|
||||
}
|
||||
}
|
||||
if (!$one) {
|
||||
return $this->_err(VAL_NOONEOF);
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if child is presented in format structure
|
||||
*
|
||||
* @param string $fname
|
||||
* node name in format structure
|
||||
* @param string $chname
|
||||
* child node name
|
||||
* @return boolean
|
||||
*/
|
||||
function isChildInFormat($fname, $chname)
|
||||
{
|
||||
$listo = $this->isInFormatAs($fname, $chname, 'childs', 'optional');
|
||||
$listr = $this->isInFormatAs($fname, $chname, 'childs', 'required');
|
||||
$list1 = $this->isInFormatAs($fname, $chname, 'childs', 'oneof');
|
||||
return ($listo!==FALSE || $listr!==FALSE || $list1!==FALSE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if attribute is presented in format structure
|
||||
*
|
||||
* @param string $fname
|
||||
* node name in format structure
|
||||
* @param string $aname
|
||||
* attribute name
|
||||
* @return boolean
|
||||
*/
|
||||
function isAttrInFormat($fname, $aname)
|
||||
{
|
||||
$listr = $this->isInFormatAs($fname, $aname, 'attrs', 'required');
|
||||
$listi = $this->isInFormatAs($fname, $aname, 'attrs', 'implied');
|
||||
$listn = $this->isInFormatAs($fname, $aname, 'attrs', 'normal');
|
||||
return ($listr!==FALSE || $listi!==FALSE || $listn!==FALSE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if node/attribute is presented in format structure
|
||||
*
|
||||
* @param string $fname
|
||||
* node name in format structure
|
||||
* @param string $chname
|
||||
* node/attribute name
|
||||
* @param string $nType
|
||||
* 'childs' | 'attrs'
|
||||
* @param string $reqType
|
||||
* <ul>
|
||||
* <li>for elements: 'required' | 'optional' | 'oneof'</li>
|
||||
* <li>for attributes: 'required' | 'implied' | 'normal'</li>
|
||||
* </ul>
|
||||
* @return mixed
|
||||
* boolean/int (index int format array returned if found)
|
||||
*/
|
||||
function isInFormatAs($fname, $chname, $nType='childs', $reqType='required')
|
||||
{
|
||||
$formTree =& $this->formTree;
|
||||
$listed = (
|
||||
isset($formTree[$fname][$nType][$reqType]) ?
|
||||
array_search($chname, $formTree[$fname][$nType][$reqType]) :
|
||||
FALSE
|
||||
);
|
||||
return $listed;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Error exception generator
|
||||
*
|
||||
* @param int $errno
|
||||
* erron code
|
||||
* @param string $par
|
||||
* optional string for more descriptive error messages
|
||||
* @return PEAR_Error
|
||||
*/
|
||||
function _err($errno, $par='')
|
||||
{
|
||||
$msg = array(
|
||||
VAL_ROOT => 'Wrong root element',
|
||||
VAL_NOREQE => 'Required element missing',
|
||||
VAL_NOONEOF => 'One-of element missing',
|
||||
VAL_UNKNOWNE => 'Unknown element',
|
||||
VAL_UNKNOWNA => 'Unknown attribute',
|
||||
VAL_NOTDEF => 'Not defined',
|
||||
VAL_UNEXPONEOF => 'Unexpected second object from one-of set',
|
||||
VAL_FORMAT => 'Unknown format',
|
||||
VAL_CONTENT => 'Invalid content',
|
||||
VAL_NOREQA => 'Required attribute missing',
|
||||
VAL_ATTRIB => 'Invalid attribute format',
|
||||
VAL_PREDXML => 'Invalid predicate type',
|
||||
);
|
||||
return PEAR::raiseError(
|
||||
"Validator: {$msg[$errno]} #$errno ($par, gunid={$this->gunid})",
|
||||
$errno
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
} // class Validator
|
||||
|
||||
|
|
@ -1,326 +0,0 @@
|
|||
<?php
|
||||
$audioClipFormat = array(
|
||||
'_root'=>'audioClip',
|
||||
'audioClip'=>array(
|
||||
'childs'=>array(
|
||||
'required'=>array('metadata'),
|
||||
),
|
||||
),
|
||||
'metadata'=>array(
|
||||
'childs'=>array(
|
||||
'required'=>array(
|
||||
'dc:title', 'dcterms:extent'
|
||||
),
|
||||
'optional'=>array(
|
||||
'dc:identifier',
|
||||
'dc:creator', 'dc:source', 'ls:genre',
|
||||
'ls:year', 'dc:type', 'dc:description', 'dc:format',
|
||||
'ls:bpm', 'ls:rating', 'ls:encoded_by', 'ls:track_num',
|
||||
'ls:disc_num', 'ls:disc_num', 'dc:publisher', 'ls:composer',
|
||||
'ls:bitrate', 'ls:channels', 'ls:samplerate', 'ls:encoder',
|
||||
'ls:crc', 'ls:lyrics', 'ls:orchestra', 'ls:conductor',
|
||||
'ls:lyricist', 'ls:originallyricist', 'ls:radiostationname',
|
||||
'ls:audiofileinfourl', 'ls:artisturl', 'ls:audiosourceurl',
|
||||
'ls:radiostationurl', 'ls:buycdurl', 'ls:isrcnumber',
|
||||
'ls:catalognumber', 'ls:originalartist', 'dc:rights',
|
||||
'ls:license', 'dc:title', 'dcterms:temporal',
|
||||
'dcterms:spatial', 'dcterms:entity', 'dc:description',
|
||||
'dc:creator', 'dc:subject', 'dc:type', 'dc:format',
|
||||
'dc:contributor', 'dc:language', 'dc:rights',
|
||||
'dcterms:isPartOf', 'dc:date',
|
||||
'dc:publisher',
|
||||
// extra
|
||||
'dcterms:alternative', 'ls:filename', 'ls:mtime',
|
||||
// added lately by sebastian
|
||||
'ls:mood',
|
||||
),
|
||||
),
|
||||
'namespaces'=>array(
|
||||
'dc'=>"http://purl.org/dc/elements/1.1/",
|
||||
'dcterms'=>"http://purl.org/dc/terms/",
|
||||
'xbmf'=>"http://www.streamonthefly.org/xbmf",
|
||||
'xsi'=>"http://www.w3.org/2001/XMLSchema-instance",
|
||||
'xml'=>"http://www.w3.org/XML/1998/namespace",
|
||||
),
|
||||
),
|
||||
'dc:identifier'=>array(
|
||||
'type'=>'Text',
|
||||
'auto'=>TRUE,
|
||||
),
|
||||
'dc:title'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:alternative'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:extent'=>array(
|
||||
'type'=>'Time',
|
||||
// 'regexp'=>'^\d{2}:\d{2}:\d{2}.\d{6}$',
|
||||
'regexp'=>'^((\d{1,2}:)?\d{1,2}:)?\d{1,20}(.\d{1,6})?$',
|
||||
),
|
||||
'dc:creator'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:source'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:genre'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:year'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
),
|
||||
'dc:type'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:description'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:format'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:bpm'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:rating'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:encoded_by'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:track_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:disc_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:disc_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:publisher'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:composer'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:bitrate'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:channels'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:samplerate'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:encoder'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:crc'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:lyrics'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:orchestra'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:conductor'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:lyricist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:originallyricist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:radiostationname'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:audiofileinfourl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:artisturl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:audiosourceurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:radiostationurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:buycdurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:isrcnumber'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:catalognumber'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:originalartist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:rights'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:license'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:title'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:temporal'=>array(
|
||||
'type'=>'Time/Date',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:spatial'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:entity'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:description'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:creator'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:subject'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:type'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:format'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:contributor'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:language'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:rights'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:isPartOf'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:date'=>array(
|
||||
'type'=>'Date',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:publisher'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
|
||||
'ls:filename'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:mtime'=>array(
|
||||
'type'=>'Int',
|
||||
// 'regexp'=>'^\d{4}(-\d{2}(-\d{2}(T\d{2}:\d{2}(:\d{2}\.\d+)?(Z)|([\+\-]?\d{2}:\d{2}))?)?)?$',
|
||||
),
|
||||
);
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
|
||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
$CC_DBC->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
$gb = new LocStor();
|
||||
$tr = new Transport($gb);
|
||||
|
||||
$r = $tr->cronMain();
|
||||
if (!$r) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
exit(0);
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
|
||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
$CC_DBC->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
$gb = new LocStor();
|
||||
$tr = new Transport($gb);
|
||||
|
||||
$pid = getmypid();
|
||||
list(, $trtok) = $_SERVER['argv'];
|
||||
if (TR_LOG_LEVEL > 1) {
|
||||
$tr->trLog("transportCronJob($pid) start ($trtok)");
|
||||
}
|
||||
|
||||
// 4-pass on job:
|
||||
$cnt = 4;
|
||||
for ($i = 0; $i < $cnt; $i++, sleep(1)) {
|
||||
// run the action:
|
||||
$r = $tr->cronCallMethod($trtok);
|
||||
if (PEAR::isError($r)) {
|
||||
$tr->trLogPear("transportCronJob($pid): ($trtok): ", $r);
|
||||
} else {
|
||||
# $tr->trLog("X transportCronJob: ".var_export($r, TRUE));
|
||||
if ($r !== TRUE) {
|
||||
$tr->trLog("transportCronJob($pid): ($trtok): nonTRUE returned");
|
||||
}
|
||||
}
|
||||
#if(!$r) exit(1);
|
||||
#sleep(2);
|
||||
}
|
||||
|
||||
if (TR_LOG_LEVEL>1) {
|
||||
$tr->trLog("transportCronJob($pid) end ($trtok)");
|
||||
}
|
||||
exit(0);
|
|
@ -1,112 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
||||
|
||||
$playlistFormat = array(
|
||||
'_root'=>'playlist',
|
||||
'playlist'=>array(
|
||||
'childs'=>array(
|
||||
// 'repeatable'=>array('playlistElement'),
|
||||
'optional'=>array('metadata', 'playlistElement'),
|
||||
),
|
||||
'attrs'=>array(
|
||||
'required'=>array('id'),
|
||||
'implied'=>array('title', 'playlength'),
|
||||
),
|
||||
),
|
||||
'playlistElement'=>array(
|
||||
'childs'=>array(
|
||||
'oneof'=>array('audioClip', 'playlist'),
|
||||
'optional'=>array('fadeInfo'),
|
||||
),
|
||||
'attrs'=>array(
|
||||
'required'=>array('id', 'relativeOffset', 'clipStart', 'clipEnd', 'clipLength'),
|
||||
),
|
||||
),
|
||||
'audioClip'=>array(
|
||||
'childs'=>array(
|
||||
'optional'=>array('metadata'),
|
||||
),
|
||||
'attrs'=>array(
|
||||
'implied'=>array('id', 'title', 'playlength', 'uri'),
|
||||
),
|
||||
),
|
||||
'fadeInfo'=>array(
|
||||
'attrs'=>array(
|
||||
'required'=>array('id', 'fadeIn', 'fadeOut'),
|
||||
),
|
||||
),
|
||||
'metadata'=>array(
|
||||
'childs'=>array(
|
||||
'optional'=>array(
|
||||
'dc:title', 'dcterms:extent', 'dc:creator', 'dc:description',
|
||||
'dcterms:alternative', 'ls:filename', 'ls:mtime',
|
||||
),
|
||||
),
|
||||
'namespaces'=>array(
|
||||
'dc'=>"http://purl.org/dc/elements/1.1/",
|
||||
'dcterms'=>"http://purl.org/dc/terms/",
|
||||
'xbmf'=>"http://www.streamonthefly.org/xbmf",
|
||||
'xsi'=>"http://www.w3.org/2001/XMLSchema-instance",
|
||||
'xml'=>"http://www.w3.org/XML/1998/namespace",
|
||||
),
|
||||
),
|
||||
'dc:title'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:alternative'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:extent'=>array(
|
||||
'type'=>'Time',
|
||||
'regexp'=>'^\d{2}:\d{2}:\d{2}.\d{6}$',
|
||||
),
|
||||
'dc:creator'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:description'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'playlength'=>array(
|
||||
'type'=>'Time',
|
||||
'regexp'=>'^((\d{2}:)?\d{2}:)?\d{1,2}(.\d{6})?$',
|
||||
),
|
||||
'id'=>array(
|
||||
'type'=>'Attribute',
|
||||
'regexp'=>'^[0-9a-f]{16}$',
|
||||
),
|
||||
'fadeIn'=>array(
|
||||
'type'=>'Attribute',
|
||||
'regexp'=>'^((\d{2}:)?\d{2}:)?\d{1,2}(.\d{6})?$',
|
||||
),
|
||||
'fadeOut'=>array(
|
||||
'type'=>'Attribute',
|
||||
'regexp'=>'^((\d{2}:)?\d{2}:)?\d{1,2}(.\d{6})?$',
|
||||
),
|
||||
'ls:filename'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:mtime'=>array(
|
||||
'type'=>'Int',
|
||||
// 'regexp'=>'^\d{4}(-\d{2}(-\d{2}(T\d{2}:\d{2}(:\d{2}\.\d+)?(Z)|([\+\-]?\d{2}:\d{2}))?)?)?$',
|
||||
),
|
||||
/*
|
||||
''=>array(
|
||||
'childs'=>array(''),
|
||||
'attrs'=>array('implied'=>array()),
|
||||
),
|
||||
*/
|
||||
);
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
<?php
|
||||
|
||||
$path = dirname(__FILE__).'/../../library/pear';
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
|
||||
|
||||
require_once(dirname(__FILE__).'/../../../library/propel/runtime/lib/Propel.php');
|
||||
// Initialize Propel with the runtime configuration
|
||||
Propel::init(__DIR__."/../../configs/propel-config.php");
|
||||
|
||||
// Add the generated 'classes' directory to the include path
|
||||
set_include_path(dirname(__FILE__)."/../" . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
require_once('DB.php');
|
||||
require_once('PHPUnit.php');
|
||||
|
||||
require_once(dirname(__FILE__).'/../../configs/conf.php');
|
||||
require_once(dirname(__FILE__).'/../GreenBox.php');
|
||||
require_once(dirname(__FILE__).'/../Playlist.php');
|
||||
|
||||
$tz = ini_get('date.timezone') ? ini_get('date.timezone') : 'America/Toronto';
|
||||
date_default_timezone_set($tz);
|
||||
|
||||
//old database connection still needed to get a session instance.
|
||||
$dsn = $CC_CONFIG['dsn'];
|
||||
$CC_DBC = DB::connect($dsn, TRUE);
|
||||
if (PEAR::isError($CC_DBC)) {
|
||||
echo "ERROR: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo()."\n";
|
||||
exit(1);
|
||||
}
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
class PlaylistTests extends PHPUnit_TestCase {
|
||||
|
||||
private $greenbox;
|
||||
private $storedFile;
|
||||
private $storedFile2;
|
||||
|
||||
function __construct($name) {
|
||||
parent::__construct($name);
|
||||
}
|
||||
|
||||
function setup() {
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$this->greenbox = new GreenBox();
|
||||
|
||||
// Add a file
|
||||
$values = array("filepath" => dirname(__FILE__)."/test10001.mp3");
|
||||
$this->storedFile = StoredFile::Insert($values, false);
|
||||
|
||||
// Add a file
|
||||
$values = array("filepath" => dirname(__FILE__)."/test10002.mp3");
|
||||
$this->storedFile2 = StoredFile::Insert($values, false);
|
||||
|
||||
}
|
||||
|
||||
function testGBCreatePlaylist() {
|
||||
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist UnitTest: create ".date("g:i a"));
|
||||
|
||||
if (!is_int($pl_id)) {
|
||||
$this->fail("problems creating playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testGBLock() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist Metadata: lock ".date("g:i a"));
|
||||
|
||||
$sessid = Alib::Login('root', 'q');
|
||||
|
||||
$res = $this->greenbox->lockPlaylistForEdit($pl_id, $sessid);
|
||||
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems locking playlist for editing.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testGBUnLock() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist UnitTest: unlock ".date("g:i a"));
|
||||
|
||||
$sessid = Alib::Login('root', 'q');
|
||||
|
||||
$this->greenbox->lockPlaylistForEdit($pl_id, $sessid);
|
||||
$res = $this->greenbox->releaseLockedPlaylist($pl_id, $sessid);
|
||||
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems unlocking playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testGBSetPLMetaData() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist UnitTest: Set Metadata ".date("g:i a"));
|
||||
|
||||
$res = $this->greenbox->setPLMetadataValue($pl_id, "dc:title", "Playlist Unit Test: Updated Title ".date("g:i a"));
|
||||
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems setting playlist metadata.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testGBGetPLMetaData() {
|
||||
$pl = new Playlist();
|
||||
$name = "Playlist UnitTest: GetMetadata ".date("g:i a");
|
||||
$pl_id = $pl->create($name);
|
||||
|
||||
$res = $this->greenbox->getPLMetadataValue($pl_id, "dc:title");
|
||||
|
||||
if($res !== $name) {
|
||||
$this->fail("problems getting playlist metadata.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testAddAudioClip() {
|
||||
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist Unit Test ". date("g:i a"));
|
||||
$res = $this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile->getId());
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems adding audioclip to playlist.");
|
||||
return;
|
||||
}
|
||||
|
||||
$res = $this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile2->getId());
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems adding audioclip 2 to playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testMoveAudioClip() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist Unit Test: Move ". date("g:i a"));
|
||||
|
||||
$this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile->getId());
|
||||
$this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile2->getId());
|
||||
|
||||
$res = $this->greenbox->moveAudioClipInPlaylist($pl_id, 0, 1);
|
||||
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems moving audioclip in playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testDeleteAudioClip() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist UnitTest: Delete ".date("g:i a"));
|
||||
|
||||
$this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile->getId());
|
||||
$res = $this->greenbox->delAudioClipFromPlaylist($pl_id, 0);
|
||||
|
||||
if($res !== TRUE) {
|
||||
$this->fail("problems deleting audioclip from playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function testFadeInfo() {
|
||||
$pl = new Playlist();
|
||||
$pl_id = $pl->create("Playlist Unit Test: Fade Info " . date("g:i a"));
|
||||
|
||||
$this->greenbox->addAudioClipToPlaylist($pl_id, $this->storedFile2->getId());
|
||||
|
||||
$res = $this->greenbox->changeFadeInfo($pl_id, 0, '00:00:01.14', null);
|
||||
|
||||
if(!is_array($res) && count($res) !== 2) {
|
||||
$this->fail("problems setting fade in playlist.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/php -q
|
||||
<?php
|
||||
header("Content-type: text/plain");
|
||||
echo "TEST\n";
|
||||
|
||||
#$gunid = "5716b53127c3761f92fddde3412c7773";
|
||||
$gunid = $argv[1];
|
||||
echo "GUNID: $gunid\n";
|
||||
|
||||
require_once('../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('../GreenBox.php');
|
||||
|
||||
$rmd = new StoredFile($gunid, '../stor/'.substr($gunid, 0, 3));
|
||||
$r = $rmd->analyzeFile();
|
||||
|
||||
echo "r=$r (".gettype($r).")\n";
|
||||
if (PEAR::isError($r)) {
|
||||
echo "ERR: ".$r->getMessage()."\n".$r->getUserInfo()."\n";
|
||||
}
|
||||
if (is_array($r)) {
|
||||
print_r($r);
|
||||
}
|
||||
echo"\n";
|
|
@ -1,340 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
||||
$webstreamFormat = array(
|
||||
'_root'=>'audioClip',
|
||||
'audioClip'=>array(
|
||||
'childs'=>array(
|
||||
'required'=>array('metadata'),
|
||||
),
|
||||
),
|
||||
'metadata'=>array(
|
||||
'childs'=>array(
|
||||
'required'=>array(
|
||||
'dc:title', 'dcterms:extent', 'ls:url'
|
||||
),
|
||||
'optional'=>array(
|
||||
'dc:identifier',
|
||||
'dc:creator', 'dc:source', 'ls:genre',
|
||||
'ls:year', 'dc:type', 'dc:description', 'dc:format',
|
||||
'ls:bpm', 'ls:rating', 'ls:encoded_by', 'ls:track_num',
|
||||
'ls:disc_num', 'ls:disc_num', 'dc:publisher', 'ls:composer',
|
||||
'ls:bitrate', 'ls:channels', 'ls:samplerate', 'ls:encoder',
|
||||
'ls:crc', 'ls:lyrics', 'ls:orchestra', 'ls:conductor',
|
||||
'ls:lyricist', 'ls:originallyricist', 'ls:radiostationname',
|
||||
'ls:audiofileinfourl', 'ls:artisturl', 'ls:audiosourceurl',
|
||||
'ls:radiostationurl', 'ls:buycdurl', 'ls:isrcnumber',
|
||||
'ls:catalognumber', 'ls:originalartist', 'dc:rights',
|
||||
'ls:license', 'dc:title', 'dcterms:temporal',
|
||||
'dcterms:spatial', 'dcterms:entity', 'dc:description',
|
||||
'dc:creator', 'dc:subject', 'dc:type', 'dc:format',
|
||||
'dc:contributor', 'dc:language', 'dc:rights',
|
||||
'dcterms:isPartOf', 'dc:date',
|
||||
'dc:publisher',
|
||||
// extra
|
||||
'dcterms:alternative', 'ls:filename', 'ls:mtime',
|
||||
// added lately by sebastian
|
||||
'ls:mood',
|
||||
),
|
||||
),
|
||||
'namespaces'=>array(
|
||||
'dc'=>"http://purl.org/dc/elements/1.1/",
|
||||
'dcterms'=>"http://purl.org/dc/terms/",
|
||||
'xbmf'=>"http://www.streamonthefly.org/xbmf",
|
||||
'xsi'=>"http://www.w3.org/2001/XMLSchema-instance",
|
||||
'xml'=>"http://www.w3.org/XML/1998/namespace",
|
||||
),
|
||||
),
|
||||
'ls:url'=>array(
|
||||
'type'=>'URL',
|
||||
),
|
||||
'dc:identifier'=>array(
|
||||
'type'=>'Text',
|
||||
'auto'=>TRUE,
|
||||
),
|
||||
'dc:title'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:alternative'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:extent'=>array(
|
||||
'type'=>'Time',
|
||||
'regexp'=>'^\d{2}:\d{2}:\d{2}.\d{6}$',
|
||||
),
|
||||
'dc:creator'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:source'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:genre'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:year'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
),
|
||||
'dc:type'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:description'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:format'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:bpm'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:rating'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:encoded_by'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:track_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:disc_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:disc_num'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:publisher'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:composer'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:bitrate'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:channels'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:samplerate'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:encoder'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:crc'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:lyrics'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:orchestra'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:conductor'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:lyricist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:originallyricist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:radiostationname'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:audiofileinfourl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:artisturl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:audiosourceurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:radiostationurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:buycdurl'=>array(
|
||||
'type'=>'URL',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:isrcnumber'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:catalognumber'=>array(
|
||||
'type'=>'Number',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:originalartist'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:rights'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:license'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Music',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:title'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:temporal'=>array(
|
||||
'type'=>'Time/Date',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:spatial'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:entity'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:description'=>array(
|
||||
'type'=>'Longtext',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:creator'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:subject'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:type'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:format'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:contributor'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:language'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:rights'=>array(
|
||||
'type'=>'Menu',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dcterms:isPartOf'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:date'=>array(
|
||||
'type'=>'Date',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'dc:publisher'=>array(
|
||||
'type'=>'Text',
|
||||
'area'=>'Talk',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:filename'=>array(
|
||||
'type'=>'Text',
|
||||
'attrs'=>array('implied'=>array('xml:lang')),
|
||||
),
|
||||
'ls:mtime'=>array(
|
||||
'type'=>'Int',
|
||||
// 'regexp'=>'^\d{4}(-\d{2}(-\d{2}(T\d{2}:\d{2}(:\d{2}\.\d+)?(Z)|([\+\-]?\d{2}:\d{2}))?)?)?$',
|
||||
),
|
||||
/*
|
||||
''=>array(
|
||||
'type'=>'',
|
||||
'area'=>'',
|
||||
'attrs'=>array(),
|
||||
),
|
||||
*/
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
header ("location: xrLocStor.php");
|
||||
exit;
|
|
@ -1,99 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Store PUT data as temporary file.
|
||||
*
|
||||
* put.php is remote callable script through HTTP PUT method.
|
||||
* Requires token returned by appropriate storageServer XMLRPC call.
|
||||
* Appropriate closing XMLRPC call should follow.
|
||||
*
|
||||
* This script accepts following HTTP GET parameter:
|
||||
* <ul>
|
||||
* <li>token : string, put token returned by appropriate
|
||||
* XMLRPC call</li>
|
||||
* </ul>
|
||||
*
|
||||
* On success, returns HTTP return code 200.
|
||||
*
|
||||
* On errors, returns HTTP return code >200
|
||||
* The possible error codes are:
|
||||
* <ul>
|
||||
* <li> 400 - Incorrect parameters passed to method</li>
|
||||
* <li> 403 - Access denied</li>
|
||||
* <li> 500 - Application error</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see XR_LocStor
|
||||
* @package Airtime
|
||||
* @subpackage storageServer
|
||||
*/
|
||||
|
||||
define('USE_FLOCK', TRUE);
|
||||
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
|
||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
$gb = new LocStor();
|
||||
|
||||
function http_error($code, $err)
|
||||
{
|
||||
header("HTTP/1.1 $code");
|
||||
header("Content-type: text/plain; charset=UTF-8");
|
||||
echo "$err\r\n";
|
||||
flush();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (preg_match("|^[0-9a-fA-F]{16}$|", $_REQUEST['token'])) {
|
||||
$token = $_REQUEST['token'];
|
||||
} else {
|
||||
http_error(400, "Error on token parameter. ({$_REQUEST['token']})");
|
||||
}
|
||||
|
||||
$tc = BasicStor::bsCheckToken($token, 'put');
|
||||
if (PEAR::isError($tc)) {
|
||||
http_error(500, $ex->getMessage());
|
||||
}
|
||||
if (!$tc) {
|
||||
http_error(403, "put.php: Token not valid ($token).");
|
||||
}
|
||||
|
||||
header("Content-type: text/plain");
|
||||
|
||||
$destfile = $CC_CONFIG['accessDir']."/{$token}";
|
||||
|
||||
/* PUT data comes in on the input stream */
|
||||
$putdata = @fopen("php://input", "r") or
|
||||
http_error(500, "put.php: Can't read input");
|
||||
|
||||
/* Open a file for writing */
|
||||
$fp = @fopen($destfile, "ab") or
|
||||
http_error(500, "put.php: Can't write to destination file (token=$token)");
|
||||
|
||||
if ( USE_FLOCK ) {
|
||||
// lock the file
|
||||
$lockres = flock($fp,LOCK_EX+LOCK_NB);
|
||||
if ($lockres !== TRUE) {
|
||||
http_error(409, "put.php: file locked (token=$token)");
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the data 1 KB at a time and write to the file */
|
||||
while ($data = fread($putdata, 1024)){
|
||||
fwrite($fp, $data);
|
||||
}
|
||||
|
||||
if ( USE_FLOCK ) {
|
||||
// unlock the file
|
||||
flock($fp,LOCK_UN);
|
||||
}
|
||||
|
||||
/* Close the streams */
|
||||
fclose($fp);
|
||||
fclose($putdata);
|
||||
|
||||
header("HTTP/1.1 200");
|
||||
|
|
@ -1,510 +0,0 @@
|
|||
<?php
|
||||
/* ================================================================= includes */
|
||||
include_once(dirname(__FILE__)."/../conf.php");
|
||||
require_once('DB.php');
|
||||
include_once("XML/RPC.php");
|
||||
|
||||
/* ================================================== method definition array */
|
||||
/**
|
||||
* Array with methods description
|
||||
*
|
||||
* Each element has method name as key and contains four subfields:
|
||||
* <ul>
|
||||
* <li>m</li> full method name (include optional prefix)
|
||||
* <li>p</li> array of input parameter names
|
||||
* <li>t</li> array of input parameter types
|
||||
* <li>r</li> array of result element names (not used there at present)
|
||||
* <li>e</li> array of error codes/messages (not used there at present)
|
||||
* </ul>
|
||||
*/
|
||||
$mdefs = array(
|
||||
"listMethods" => array('m'=>"system.listMethods", 'p'=>NULL, 't'=>NULL),
|
||||
"AddAudioClipToPlaylistMethod" => array(
|
||||
'm'=>'addAudioClipToPlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/, 'audioClipId'/*string*/, 'relativeOffset'/*int*/, 'clipStart'/*int*/, 'clipEnd'/*int*/, 'clipLength'/*int*/),
|
||||
't'=>array('string', 'string', 'string', 'int', 'int', 'int', 'int'),
|
||||
'r'=>array('playlistElementId'/*string*/),
|
||||
'e'=>array(
|
||||
'301'=>'invalid argument format',
|
||||
'302'=>'missing playlist ID argument',
|
||||
'303'=>'missing audio clip ID argument',
|
||||
'304'=>'missing relative offset argument',
|
||||
'305'=>'playlist not found',
|
||||
'306'=>'playlist has not been opened for editing',
|
||||
'307'=>'audio clip does not exist',
|
||||
'308'=>'two audio clips at the same relative offset',
|
||||
'320'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"CreatePlaylistMethod" => array(
|
||||
'm'=>'createPlaylist',
|
||||
'p'=>array('sessionId'/*string*/),
|
||||
't'=>array('string'),
|
||||
'r'=>array('playlist'/*string*/),
|
||||
'e'=>array(
|
||||
'201'=>'invalid argument format',
|
||||
'202'=>'could not create playlist',
|
||||
'220'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DeletePlaylistMethod" => array(
|
||||
'm'=>'deletePlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'901'=>'invalid argument format',
|
||||
'902'=>'missing playlist ID argument',
|
||||
'903'=>'playlist not found',
|
||||
'904'=>'playlist is locked',
|
||||
'905'=>'playlist could not be deleted',
|
||||
'920'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DisplayAudioClipMethod" => array(
|
||||
'm'=>'displayAudioClip',
|
||||
'p'=>array('sessionId'/*string*/, 'audioClipId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('audioClip'/*string*/),
|
||||
'e'=>array(
|
||||
'601'=>'invalid argument format',
|
||||
'602'=>'argument is not an audio clip ID',
|
||||
'603'=>'audio clip not found',
|
||||
'620'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DisplayAudioClipsMethod" => array(
|
||||
'm'=>'displayAudioClips',
|
||||
'p'=>array('sessionId'/*string*/),
|
||||
't'=>array('string'),
|
||||
'r'=>array(array('audioClip'/*string*/)),
|
||||
'e'=>array(
|
||||
'1801'=>'invalid argument format',
|
||||
'1802'=>'XML-RPC error',
|
||||
'1820'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DisplayPlaylistMethod" => array(
|
||||
'm'=>'displayPlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('playlist'/*string*/),
|
||||
'e'=>array(
|
||||
'1001'=>'invalid argument format',
|
||||
'1002'=>'argument is not a playlist ID',
|
||||
'1003'=>'playlist not found',
|
||||
'1020'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DisplayPlaylistsMethod" => array(
|
||||
'm'=>'displayPlaylists',
|
||||
'p'=>array('sessionId'/*string*/),
|
||||
't'=>array('string'),
|
||||
'r'=>array(array('playlist'/*string*/)),
|
||||
'e'=>array(
|
||||
'1701'=>'invalid argument format',
|
||||
'1702'=>'XML-RPC error',
|
||||
'1720'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"DisplayScheduleMethod" => array(
|
||||
'm'=>'displaySchedule',
|
||||
'p'=>array('sessionId'/*string*/, 'from'/*datetime*/, 'to'/*datetime*/),
|
||||
't'=>array('string', 'dateTime.iso8601', 'dateTime.iso8601'),
|
||||
'r'=>array(array('id'/*int*/, 'playlistId'/*string*/, 'start'/*datetime*/, 'end'/*datetime*/)),
|
||||
'e'=>array(
|
||||
'1101'=>'invalid argument format',
|
||||
'1102'=>"missing or invalid 'from' argument",
|
||||
'1103'=>"missing or invalid 'to' argument",
|
||||
'1120'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"GeneratePlayReportMethod" => array(
|
||||
'm'=>'generatePlayReport',
|
||||
'p'=>array('sessionId'/*string*/, 'from'/*datetime*/, 'to'/*datetime*/),
|
||||
't'=>array('string', 'dateTime.iso8601', 'dateTime.iso8601'),
|
||||
'r'=>array(array('audioClipId'/*string*/, 'timestamp'/*datetime*/)),
|
||||
'e'=>array(
|
||||
'1501'=>'invalid argument format',
|
||||
'1502'=>"missing or invalid 'from' argument",
|
||||
'1503'=>"missing or invalid 'to' argument",
|
||||
'1520'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"GetSchedulerTimeMethod" => array(
|
||||
'm'=>'getSchedulerTime',
|
||||
'p'=>array(),
|
||||
't'=>array(),
|
||||
'r'=>array('schedulerTime'/*datetime*/),
|
||||
'e'=>array(
|
||||
)
|
||||
),
|
||||
"GetVersionMethod" => array(
|
||||
'm'=>'getVersion',
|
||||
'p'=>array(),
|
||||
't'=>array(),
|
||||
'r'=>array('version'/*string*/),
|
||||
'e'=>array()
|
||||
),
|
||||
"LoginMethod" => array(
|
||||
'm'=>'login',
|
||||
'p'=>array('login'/*string*/, 'password'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('sessionId'/*string*/),
|
||||
'e'=>array(
|
||||
'2001'=>'invalid argument format',
|
||||
'2002'=>'missing login argument',
|
||||
'2003'=>'missing password argument',
|
||||
'2004'=>'the authentication server reported an error',
|
||||
)
|
||||
),
|
||||
"LogoutMethod" => array(
|
||||
'm'=>'logout',
|
||||
'p'=>array('sessionId'/*string*/),
|
||||
't'=>array('string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'2101'=>'invalid argument format',
|
||||
'2120'=>'missing session ID argument',
|
||||
'2104'=>'the authentication server reported an error',
|
||||
)
|
||||
),
|
||||
"OpenPlaylistForEditingMethod" => array(
|
||||
'm'=>'openPlaylistForEditing',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('playlist'/*string*/),
|
||||
'e'=>array(
|
||||
'101'=>'invalid argument format',
|
||||
'102'=>'argument is not a playlist ID',
|
||||
'104'=>'could not open playlist for editing',
|
||||
'120'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"RemoveAudioClipFromPlaylistMethod" => array(
|
||||
'm'=>'removeAudioClipFromPlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/, 'playlistElementId'/*string*/),
|
||||
't'=>array('string', 'string', 'string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'401'=>'invalid argument format',
|
||||
'402'=>'missing playlist ID argument',
|
||||
'403'=>'missing relative offset argument',
|
||||
'404'=>'playlist does not exist',
|
||||
'405'=>'playlist has not been opened for editing',
|
||||
'406'=>'no audio clip at the specified relative offset',
|
||||
'420'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"RemoveFromScheduleMethod" => array(
|
||||
'm'=>'removeFromSchedule',
|
||||
'p'=>array('sessionId'/*string*/, 'scheduleEntryId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'1201'=>'invalid argument format',
|
||||
'1202'=>'missing schedule entry ID argument',
|
||||
'1203'=>'schedule entry not found',
|
||||
'1220'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"RescheduleMethod" => array(
|
||||
'm'=>'reschedule',
|
||||
'p'=>array('sessionId'/*string*/, 'scheduleEntryId'/*string*/, 'playtime'/*datetime*/),
|
||||
't'=>array('string', 'string', 'dateTime.iso8601'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'1301'=>'invalid argument format',
|
||||
'1302'=>'missing schedule entry ID argument',
|
||||
'1303'=>'missing playtime argument',
|
||||
'1304'=>'schedule entry not found',
|
||||
'1305'=>'could not reschedule entry',
|
||||
'1320'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
// "ResetStorageMethod" => array(
|
||||
// 'm'=>'resetStorage',
|
||||
// 'p'=>array(),
|
||||
// 't'=>array(),
|
||||
// 'r'=>array(),
|
||||
// 'e'=>array('3001'=>'storage client reported an error'),
|
||||
// ),
|
||||
"RevertEditedPlaylistMethod" => array(
|
||||
'm'=>'revertEditedPlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'801'=>'invalid argument format',
|
||||
'802'=>'argument is not a playlist ID',
|
||||
'803'=>'playlist not found',
|
||||
'804'=>'could not revert playlist',
|
||||
'820'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"SavePlaylistMethod" => array(
|
||||
'm'=>'savePlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'701'=>'invalid argument format',
|
||||
'702'=>'argument is not a playlist ID',
|
||||
'703'=>'playlist not found',
|
||||
'705'=>'could not save playlist',
|
||||
'720'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"UpdateFadeInFadeOutMethod" => array(
|
||||
'm'=>'updateFadeInFadeOut',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/, 'playlistElementId'/*string*/, 'fadeIn'/*int*/, 'fadeOut'/*int*/),
|
||||
't'=>array('string', 'string', 'string', 'int', 'int'),
|
||||
'r'=>array(),
|
||||
'e'=>array(
|
||||
'1601'=>'invalid argument format',
|
||||
'1602'=>'missing playlist ID argument',
|
||||
'1603'=>'missing playlist element ID argument',
|
||||
'1604'=>'missing fade in argument',
|
||||
'1605'=>'missing fade out argument',
|
||||
'1606'=>'playlist does not exist',
|
||||
'1607'=>'playlist has not been opened for editing',
|
||||
'1608'=>'error executing setFadeInfo() method',
|
||||
'1620'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"UploadPlaylistMethod" => array(
|
||||
'm'=>'uploadPlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/, 'playtime'/*datetime*/),
|
||||
't'=>array('string', 'string', 'dateTime.iso8601'),
|
||||
'r'=>array('scheduleEntryId'/*string*/),
|
||||
'e'=>array(
|
||||
'1401'=>'invalid argument format',
|
||||
'1402'=>'missing playlist ID argument',
|
||||
'1403'=>'missing playtime argument',
|
||||
'1404'=>'playlist not found',
|
||||
'1405'=>'timeframe not available',
|
||||
'1406'=>'could not schedule playlist',
|
||||
'1420'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"ValidatePlaylistMethod" => array(
|
||||
'm'=>'validatePlaylist',
|
||||
'p'=>array('sessionId'/*string*/, 'playlistId'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('valid'/*bool*/),
|
||||
'e'=>array(
|
||||
'501'=>'invalid argument format',
|
||||
'502'=>'missing playlist ID argument',
|
||||
'503'=>'playlist does not exist',
|
||||
'504'=>'playlist has not been opened for editing',
|
||||
'520'=>'missing session ID argument',
|
||||
)
|
||||
),
|
||||
"LoginGB" => array(
|
||||
'm'=>'locstor.login',
|
||||
'p'=>array('login'/*string*/, 'pass'/*string*/),
|
||||
't'=>array('string', 'string'),
|
||||
'r'=>array('sessid'/*string*/),
|
||||
'e'=>array(
|
||||
'2001'=>'invalid argument format',
|
||||
'2002'=>'missing login argument',
|
||||
'2003'=>'missing password argument',
|
||||
'2004'=>'the authentication server reported an error',
|
||||
)
|
||||
),
|
||||
"LogoutGB" => array(
|
||||
'm'=>'locstor.logout',
|
||||
'p'=>array('sessid'/*string*/),
|
||||
't'=>array('string'),
|
||||
'r'=>array('status'/*boolean*/),
|
||||
'e'=>array(
|
||||
'2001'=>'invalid argument format',
|
||||
'2002'=>'missing login argument',
|
||||
'2003'=>'missing password argument',
|
||||
'2004'=>'the authentication server reported an error',
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
/* ======================================================== class definitions */
|
||||
|
||||
class SchedulerPhpClient {
|
||||
/**
|
||||
* Array with methods description
|
||||
* @var array
|
||||
*/
|
||||
private $mdefs = array();
|
||||
|
||||
/**
|
||||
* XMLRPC client object reference
|
||||
*/
|
||||
private $client = NULL;
|
||||
|
||||
/**
|
||||
* Verbosity flag
|
||||
*/
|
||||
private $verbose = FALSE;
|
||||
|
||||
/**
|
||||
* XMLRPC debug flag
|
||||
*/
|
||||
private $debug = 0;
|
||||
|
||||
/**
|
||||
* Constructor - please DON'T CALL IT, use factory method instead
|
||||
*
|
||||
* @param DB $dbc
|
||||
* @param array $mdefs
|
||||
* hash array with methods description
|
||||
* @param array $config
|
||||
* hash array with configuration
|
||||
* @param int $debug
|
||||
* XMLRPC debug flag
|
||||
* @param boolean $verbose
|
||||
* verbosity flag
|
||||
*/
|
||||
public function __construct($mdefs, $debug=0, $verbose=FALSE)
|
||||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
$this->mdefs = $mdefs;
|
||||
$this->debug = $debug;
|
||||
$this->verbose = $verbose;
|
||||
$confPrefix = "scheduler";
|
||||
//$confPrefix = "storage";
|
||||
$serverPath =
|
||||
"http://{$CC_CONFIG["{$confPrefix}UrlHost"]}:{$CC_CONFIG["{$confPrefix}UrlPort"]}".
|
||||
"{$CC_CONFIG["{$confPrefix}UrlPath"]}/{$CC_CONFIG["{$confPrefix}XMLRPC"]}";
|
||||
//$serverPath = "http://localhost:80/campcasterStorageServerCVS/xmlrpc/xrLocStor.php";
|
||||
if ($this->verbose) {
|
||||
echo "serverPath: $serverPath\n";
|
||||
}
|
||||
$url = parse_url($serverPath);
|
||||
$this->client = new XML_RPC_Client($url['path'], $url['host'], $url['port']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Factory, create object instance
|
||||
*
|
||||
* In fact it doesn't create instance of SchedulerPhpClient, but
|
||||
* dynamically extend this class with set of methods based on $mdefs array
|
||||
* (using eval function) and instantiate resulting class
|
||||
* SchedulerPhpClientCore instead.
|
||||
* Each new method in this subclass accepts parameters according to $mdefs
|
||||
* array, call wrapper callMethod(methodname, parameters) and return its
|
||||
* result.
|
||||
*
|
||||
* @param array $mdefs
|
||||
* hash array with methods description
|
||||
* @param int $debug
|
||||
* XMLRPC debug flag
|
||||
* @param boolean $verbose
|
||||
* verbosity flag
|
||||
* @return SchedulerPhpClientCore
|
||||
*/
|
||||
function &factory($mdefs, $debug=0, $verbose=FALSE)
|
||||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
$f = '';
|
||||
foreach ($mdefs as $fn => $farr) {
|
||||
$f .=
|
||||
' function '.$fn.'(){'."\n".
|
||||
' $pars = func_get_args();'."\n".
|
||||
' $r = $this->callMethod("'.$fn.'", $pars);'."\n".
|
||||
' return $r;'."\n".
|
||||
' }'."\n";
|
||||
}
|
||||
$e =
|
||||
"class SchedulerPhpClientCore extends SchedulerPhpClient{\n".
|
||||
"$f\n".
|
||||
"}\n";
|
||||
# echo $e;
|
||||
if (FALSE === eval($e)) {
|
||||
return $CC_DBC->raiseError("Eval failed");
|
||||
}
|
||||
$spc = new SchedulerPhpClientCore($mdefs, $debug, $verbose);
|
||||
return $spc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* XMLRPC methods wrapper
|
||||
* Encode XMLRPC request message, send it, receive and decode response.
|
||||
*
|
||||
* @param string $method
|
||||
* method name
|
||||
* @param array $gettedPars
|
||||
* returned by func_get_args() in called method
|
||||
* @return array
|
||||
* PHP hash with response
|
||||
*/
|
||||
function callMethod($method, $gettedPars)
|
||||
{
|
||||
$parr = array();
|
||||
$XML_RPC_val = new XML_RPC_Value;
|
||||
foreach ($this->mdefs[$method]['p'] as $i => $p) {
|
||||
$parr[$p] = new XML_RPC_Value;
|
||||
$parr[$p]->addScalar($gettedPars[$i], $this->mdefs[$method]['t'][$i]);
|
||||
}
|
||||
$XML_RPC_val->addStruct($parr);
|
||||
$fullmethod = $this->mdefs[$method]['m'];
|
||||
$msg = new XML_RPC_Message($fullmethod, array($XML_RPC_val));
|
||||
if ($this->verbose) {
|
||||
echo "parr:\n";
|
||||
var_dump($parr);
|
||||
echo "message:\n";
|
||||
echo $msg->serialize()."\n";
|
||||
}
|
||||
$this->client->setDebug($this->debug);
|
||||
$res = $this->client->send($msg);
|
||||
if ($res->faultCode() > 0) {
|
||||
return PEAR::raiseError(
|
||||
"SchedulerPhpClient::$method:".$res->faultString()." ".
|
||||
$res->faultCode()."\n", $res->faultCode(),
|
||||
PEAR_ERROR_RETURN
|
||||
);
|
||||
}
|
||||
if ($this->verbose) {
|
||||
echo "result:\n";
|
||||
echo $res->serialize();
|
||||
}
|
||||
$val = $res->value();
|
||||
$resp = XML_RPC_decode($res->value());
|
||||
return $resp;
|
||||
}
|
||||
|
||||
} // class SchedulerPhpClient
|
||||
|
||||
/* ======================================================== class definitions */
|
||||
|
||||
/**
|
||||
* Example of use:
|
||||
*
|
||||
* /
|
||||
|
||||
|
||||
// db object handling:
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
$CC_DBC->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
|
||||
// scheduler client instantiation:
|
||||
$spc = SchedulerPhpClient::factory($mdefs);
|
||||
#$spc = SchedulerPhpClient::factory($mdefs, 0, TRUE);
|
||||
if(PEAR::isError($spc)){ echo $spc->getMessage."\n"; exit; }
|
||||
|
||||
// call of chosen function by name according to key values in $mdefs array:
|
||||
// (for testing on storageServer XMLRPC I've changes confPrefix in
|
||||
// SchedulerPhpClient constructor from 'scheduler' to 'storage' value)
|
||||
#$r = $spc->LoginGB('root', 'q'); var_dump($r);
|
||||
#$r = $spc->LogoutGB(''); var_dump($r);
|
||||
|
||||
#$r = $spc->DisplayScheduleMethod($this->Base->sessid, '2005-01-01 00:00:00.000000', '2005-02-01 00:00:00.000000'); var_dump($r);
|
||||
#$r = $spc->DisplayScheduleMethod('dummySessionId2-1681692777', '2005-01-01 00:00:00.000000', '2005-02-01 00:00:00.000000'); var_dump($r);
|
||||
$r = $spc->DisplayScheduleMethod($this->Base->sessid, '20040101T00:00:00', '20050401T00:00:00'); var_dump($r);
|
||||
#$r = $spc->LoginMethod('root', 'q'); var_dump($r);
|
||||
#$r = $spc->LogoutMethod('dummySessionId3-1714636915'); var_dump($r);
|
||||
#$r = $spc->listMethods(); var_dump($r);
|
||||
#$r = $spc->GetSchedulerTimeMethod(); var_dump($r);
|
||||
================= */
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Returns stored media file identified by global unique ID.
|
||||
*
|
||||
* simpleGet.php is remote callable script through HTTP GET method.
|
||||
* Requires valid session ID with read permission for requested file.
|
||||
*
|
||||
* This script accepts following HTTP GET parameters:
|
||||
* <ul>
|
||||
* <li>sessid : string, session ID</li>
|
||||
* <li>id : string, global unique ID of requested file</li>
|
||||
* </ul>
|
||||
*
|
||||
* On success, returns HTTP return code 200 and requested file.
|
||||
*
|
||||
* On errors, returns HTTP return code >200
|
||||
* The possible error codes are:
|
||||
* <ul>
|
||||
* <li> 400 - Incorrect parameters passed to method</li>
|
||||
* <li> 403 - Access denied</li>
|
||||
* <li> 404 - File not found</li>
|
||||
* <li> 500 - Application error</li>
|
||||
* </ul>
|
||||
*
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
require_once(dirname(__FILE__).'/../MetaData.php');
|
||||
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
$CC_DBC->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
$locStor = new LocStor();
|
||||
|
||||
function http_error($code, $err)
|
||||
{
|
||||
header("HTTP/1.1 $code");
|
||||
header("Content-type: text/plain; charset=UTF-8");
|
||||
echo "$err\r\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function encodes an filename to
|
||||
* be transferred via HTTP header.
|
||||
*
|
||||
* @param string $p_string utf8 filename
|
||||
* @return string HTTP header encoded filename
|
||||
*/
|
||||
function sg_2hexstring($p_string)
|
||||
{
|
||||
for ($x=0; $x < strlen($p_string); $x++) {
|
||||
$return .= '%' . bin2hex($p_string[$x]);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
// parameter checking:
|
||||
if (preg_match("|^[0-9a-fA-F]{32}$|", $_REQUEST['sessid'])) {
|
||||
$sessid = $_REQUEST['sessid'];
|
||||
} else {
|
||||
http_error(400, "Error on sessid parameter. ({$_REQUEST['sessid']})");
|
||||
}
|
||||
if (preg_match("|^[0-9a-fA-F]{16}$|", $_REQUEST['id'])) {
|
||||
$gunid = $_REQUEST['id'];
|
||||
} else {
|
||||
http_error(400, "Error on id parameter. ({$_REQUEST['id']})");
|
||||
}
|
||||
|
||||
// stored file recall:
|
||||
$ac = StoredFile::RecallByGunid($gunid);
|
||||
if (PEAR::isError($ac)) {
|
||||
switch ($ac->getCode()) {
|
||||
case GBERR_DENY:
|
||||
http_error(403, "403 ".$ac->getMessage());
|
||||
case GBERR_FILENEX:
|
||||
case GBERR_FOBJNEX:
|
||||
http_error(404, "404 File not found");
|
||||
default:
|
||||
http_error(500, "500 ".$ac->getMessage());
|
||||
}
|
||||
}
|
||||
$lid = BasicStor::IdFromGunid($gunid);
|
||||
if (PEAR::isError($lid)) {
|
||||
http_error(500, $lid->getMessage());
|
||||
}
|
||||
if (($res = BasicStor::Authorize('read', $lid, $sessid)) !== TRUE) {
|
||||
http_error(403, "403 Access denied");
|
||||
}
|
||||
$ftype = BasicStor::GetObjType($lid);
|
||||
if (PEAR::isError($ftype)) {
|
||||
http_error(500, $ftype->getMessage());
|
||||
}
|
||||
switch ($ftype) {
|
||||
case "audioclip":
|
||||
$realFname = $ac->getRealFileName();
|
||||
$mime = $ac->getMime();
|
||||
$md = new MetaData($ac->getGunId(), null);
|
||||
$fileName = $md->getMetadataValue('dc:title').'.'.$ac->getFileExtension();
|
||||
header("Content-type: $mime");
|
||||
header("Content-length: ".filesize($realFname));
|
||||
header("Content-Disposition: attachment; filename*=".sg_2hexstring($fileName).";");
|
||||
readfile($realFname);
|
||||
break;
|
||||
case "webstream":
|
||||
$url = $locStor->bsGetMetadataValue($lid, 'ls:url');
|
||||
if (empty($url)) {
|
||||
http_error(500, "Unable to get ls:url value");
|
||||
}
|
||||
$txt = "Location: $url";
|
||||
header($txt);
|
||||
// echo "$txt\n";
|
||||
break;
|
||||
case "playlist";
|
||||
// $md = $locStor->bsGetMetadata($ac->getId(), $sessid);
|
||||
$md = $locStor->getAudioClip($sessid, $gunid);
|
||||
// header("Content-type: text/xml");
|
||||
header("Content-type: application/smil");
|
||||
echo $md;
|
||||
break;
|
||||
default:
|
||||
// var_dump($ftype);
|
||||
http_error(500, "500 Unknown ftype ($ftype)");
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/php -q
|
||||
<?
|
||||
$fp = fopen("/dev/stdin", "r");
|
||||
$data = '';
|
||||
while($part = fgets($fp, 1024)) $data .= $part;
|
||||
echo urldecode($data);
|
||||
?>
|
|
@ -1,172 +0,0 @@
|
|||
<?php
|
||||
/* ====================================================== specific PHP config */
|
||||
ini_set("mbstring.internal_encoding", 'UTF-8');
|
||||
ini_set("html_errors", FALSE);
|
||||
ini_set("error_prepend_string", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<methodResponse>
|
||||
<fault>
|
||||
<value>
|
||||
<struct>
|
||||
<member>
|
||||
<name>faultCode</name>
|
||||
<value><int>804</int></value>
|
||||
</member>
|
||||
<member>
|
||||
<name>faultString</name>
|
||||
<value><string>");
|
||||
ini_set("error_append_string", "</string></value>
|
||||
</member>
|
||||
</struct>
|
||||
</value>
|
||||
</fault>
|
||||
</methodResponse>");
|
||||
header("Content-type: text/xml");
|
||||
|
||||
/* ================================================================= includes */
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once("XML/RPC/Server.php");
|
||||
require_once('XR_LocStor.php');
|
||||
|
||||
/* ============================================ setting default error handler */
|
||||
function errHndl($errno, $errmsg, $filename, $linenum, $vars)
|
||||
{
|
||||
switch ($errno) {
|
||||
case E_WARNING:
|
||||
case E_NOTICE:
|
||||
case E_USER_WARNING:
|
||||
case E_USER_NOTICE:
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
$xr = new XML_RPC_Response(0, 805,
|
||||
htmlspecialchars("ERROR:xrLocStor: $errno $errmsg ($filename:$linenum)"));
|
||||
header("Content-type: text/xml");
|
||||
echo $xr->serialize();
|
||||
exit($errno);
|
||||
}
|
||||
}
|
||||
$old_error_handler = set_error_handler("errHndl", E_ALL);
|
||||
|
||||
/* ============================================================= runable code */
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||
if (PEAR::isError($CC_DBC)) {
|
||||
trigger_error("DB::connect: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo(),E_USER_ERROR);
|
||||
}
|
||||
$CC_DBC->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
$locStor = new XR_LocStor();
|
||||
|
||||
$methods = array(
|
||||
'test' => 'Tests toupper and checks sessid, params: '.
|
||||
'teststring, sessid.',
|
||||
'getVersion' => 'Get version of Airtime.',
|
||||
// 'authenticate' => 'Checks authentication.',
|
||||
'login' => 'Login to storage.',
|
||||
'logout' => 'Logout from storage.',
|
||||
'existsAudioClip' => 'Checks if an audio clip with the specified '.
|
||||
'id is stored in local storage.',
|
||||
'storeAudioClipOpen' => 'Open channel to store a new audio clip '.
|
||||
'or replace an existing one.',
|
||||
'storeAudioClipClose' => 'Close channel to store a new audio clip'.
|
||||
' or replace an existing one.',
|
||||
'downloadRawAudioDataOpen'=> 'Create and return downloadable URL'.
|
||||
'for audio file',
|
||||
'downloadRawAudioDataClose'=>'Discard downloadable URL for audio file',
|
||||
'downloadMetadataOpen' => 'Create and return downloadable URL'.
|
||||
'for metadata',
|
||||
'downloadMetadataClose' => 'Discard downloadable URL for metadata',
|
||||
'openPut' => 'openPut',
|
||||
'closePut' => 'closePut',
|
||||
'deleteAudioClip' => 'Delete an existing Audio clip.',
|
||||
'updateAudioClipMetadata' => 'Update the metadata of an Audio clip '.
|
||||
'stored in Local storage.',
|
||||
'searchMetadata' => 'Search through the metadata of stored '.
|
||||
'files, return all matching clip ids.',
|
||||
'browseCategory' =>'Return values of specified metadata category.',
|
||||
'accessRawAudioData' => 'Get access to raw audio data.',
|
||||
'releaseRawAudioData' => 'Release access to raw audio data.',
|
||||
'getAudioClip' => 'Return the contents of an Audio clip.',
|
||||
// 'resetStorage' => 'Reset storageServer for debugging.',
|
||||
'storeWebstream' => 'Store audio stream identified by URL',
|
||||
|
||||
'createPlaylist' => 'Create a new Playlist metafile.',
|
||||
'editPlaylist' => 'Open a Playlist metafile for editing.',
|
||||
'savePlaylist' => 'Save a Playlist metafile.',
|
||||
'revertEditedPlaylist' => 'RollBack playlist changes to the locked state.',
|
||||
'deletePlaylist' => 'Delete a Playlist metafile.',
|
||||
'accessPlaylist' => 'Open readable URL to a Playlist metafile.',
|
||||
'releasePlaylist' => 'Release readable URL from accessPlaylist.',
|
||||
'existsPlaylist' => 'Check whether a Playlist exists.',
|
||||
'playlistIsAvailable' => 'Check whether a Playlist is available '.
|
||||
'for editing.',
|
||||
'exportPlaylistOpen' => 'Create a tarfile with playlist export.',
|
||||
'exportPlaylistClose' => 'Close playlist export.',
|
||||
'importPlaylistOpen' => 'Open writable handle for playlist import.',
|
||||
'importPlaylistClose' => 'Close import-handle and import playlist.',
|
||||
|
||||
'renderPlaylistToFileOpen' => 'Render playlist to ogg file (open handle)',
|
||||
'renderPlaylistToFileCheck' => 'Render playlist to ogg file (check results)',
|
||||
'renderPlaylistToFileClose' => 'Render playlist to ogg file (close handle)',
|
||||
|
||||
'renderPlaylistToStorageOpen' => 'Render playlist to storage media clip (open handle)',
|
||||
'renderPlaylistToStorageCheck' => 'Render playlist to storage media clip (check results)',
|
||||
|
||||
'renderPlaylistToRSSOpen' => 'Render playlist to RSS file (open handle)',
|
||||
'renderPlaylistToRSSCheck' => 'Render playlist to RSS file (check results)',
|
||||
'renderPlaylistToRSSClose' => 'Render playlist to RSS file (close handle)',
|
||||
|
||||
'createBackupOpen' => 'Create backup of storage (open handle)',
|
||||
'createBackupCheck' => 'Create backup of storage (check results)',
|
||||
'createBackupClose' => 'Create backup of storage (close handle)',
|
||||
|
||||
'restoreBackupOpen' => 'Restore a backup file (open handle)',
|
||||
'restoreBackupClosePut' => 'Restore a backup file (close PUT handle)',
|
||||
'restoreBackupCheck' => 'Restore a backup file (check results)',
|
||||
'restoreBackupClose' => 'Restore a backup file (close handle)',
|
||||
|
||||
'loadPref' => 'Load user preference value.',
|
||||
'savePref' => 'Save user preference value.',
|
||||
'delPref' => 'Delete user preference record.',
|
||||
'loadGroupPref' => 'Read group preference record.',
|
||||
'saveGroupPref' => 'Delete user preference record.',
|
||||
|
||||
'getTransportInfo' => 'Common "check" method and info getter for transports',
|
||||
'turnOnOffTransports' => 'Turn transports on/off, optionaly return current state',
|
||||
'doTransportAction' => 'Pause, resume or cancel transport',
|
||||
'uploadFile2Hub' => 'Open async file transfer from local storageServer to network hub',
|
||||
'getHubInitiatedTransfers' => 'Get list of prepared transfers initiated by hub',
|
||||
'startHubInitiatedTransfer' => 'Start of download initiated by hub',
|
||||
'upload2Hub' => 'Start upload of audioclip or playlist from local storageServer to hub',
|
||||
'downloadFromHub' => 'Start download of audioclip or playlist from hub to local storageServer',
|
||||
// 'globalSearch' => 'Start search job on network hub',
|
||||
// 'getSearchResults' => 'Get results from search job on network hub',
|
||||
|
||||
'uploadOpen' => 'Open file-layer upload',
|
||||
'uploadCheck' => 'Check the checksum of uploaded file',
|
||||
'uploadClose' => 'Close file-layer upload',
|
||||
'downloadOpen' => 'Open file-layer download',
|
||||
// 'downloadCheck' => 'Check the checksum of downloaded file',
|
||||
'downloadClose' => 'Close file-layer download',
|
||||
'prepareHubInitiatedTransfer' => 'Prepare hub initiated transfer',
|
||||
'listHubInitiatedTransfers' => 'List hub initiated transfers',
|
||||
'setHubInitiatedTransfer' => 'Set state of hub initiated transfers',
|
||||
'ping' => 'Echo request',
|
||||
);
|
||||
|
||||
$defs = array();
|
||||
foreach ($methods as $method => $description) {
|
||||
$defs["locstor.$method"] = array(
|
||||
"function" => array(&$locStor, "xr_$method"),
|
||||
// NOTE: the way this signature is set up, every function must take at least one parameter!
|
||||
"signature" => array(
|
||||
array($GLOBALS['XML_RPC_Struct'], $GLOBALS['XML_RPC_Struct'])
|
||||
),
|
||||
"docstring" => $description
|
||||
);
|
||||
}
|
||||
|
||||
$s = new XML_RPC_Server($defs);
|
||||
|
||||
|
|
@ -1,367 +0,0 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
include_once("XML/RPC.php");
|
||||
include_once("Console/Getopt.php");
|
||||
|
||||
function printUsage()
|
||||
{
|
||||
echo "Usage:\n";
|
||||
echo " -v Verbose output\n";
|
||||
echo " -s arg Server Path\n";
|
||||
echo " -o arg1:value1,arg2:value2 Function Arguments\n";
|
||||
echo " -h Help\n";
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
$verbose = TRUE;
|
||||
$parsedCommandLine = Console_Getopt::getopt($argv, "vs:o:h");
|
||||
$options = null;
|
||||
$cmdLineOptions = $parsedCommandLine[0];
|
||||
|
||||
if (count($parsedCommandLine[1]) == 0) {
|
||||
printUsage();
|
||||
exit;
|
||||
}
|
||||
|
||||
$method = array_pop($parsedCommandLine[1]);
|
||||
|
||||
foreach ($cmdLineOptions as $tmpValue) {
|
||||
$optionName = $tmpValue[0];
|
||||
$optionValue = $tmpValue[1];
|
||||
switch ($optionName) {
|
||||
case "h":
|
||||
printUsage();
|
||||
exit;
|
||||
case "v":
|
||||
$verbose = TRUE;
|
||||
break;
|
||||
case "s":
|
||||
$serverPath = $optionValue;
|
||||
break;
|
||||
case "o":
|
||||
$optStr = $optionValue;
|
||||
$optArr = split(",", $optStr);
|
||||
foreach ($optArr as $opt) {
|
||||
list($k, $v) = split(':', $opt);
|
||||
$options[$k] = $v;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($serverPath)) {
|
||||
$serverPath =
|
||||
"http://{$CC_CONFIG['storageUrlHost']}:{$CC_CONFIG['storageUrlPort']}".
|
||||
"{$CC_CONFIG['storageUrlPath']}/{$CC_CONFIG['storageXMLRPC']}";
|
||||
}
|
||||
|
||||
$url = parse_url($serverPath);
|
||||
$client = new XML_RPC_Client($url['path'], $url['host']);
|
||||
|
||||
if ($verbose) {
|
||||
$client->debug = 1;
|
||||
echo "ServerPath: $serverPath\n";
|
||||
echo "Host: {$url['host']}, path: {$url['path']}\n";
|
||||
echo "Method: $method\n";
|
||||
echo "Parameters:\n";
|
||||
//var_dump($pars);
|
||||
}
|
||||
|
||||
$infos = array(
|
||||
"listMethods" => array('m'=>"system.listMethods", 'p'=>NULL),
|
||||
"methodHelp" => array('m'=>"system.methodHelp", 'p'=>0),
|
||||
"methodSignature" => array('m'=>"system.methodSignature", 'p'=>0),
|
||||
"test" => array('m'=>"locstor.test", 'p'=>array('sessid', 'teststring')),
|
||||
"ping" => array('m'=>"locstor.ping", 'p'=>array("par")),
|
||||
"getVersion" => array('m'=>"locstor.getVersion", 'p'=>array("str"), 'r'=>'version'),
|
||||
"authenticate" => array('m'=>"locstor.authenticate", 'p'=>array('login', 'pass'), 'r'=>'authenticate'),
|
||||
"login" => array('m'=>"locstor.login", 'p'=>array('login', 'pass'), 'r'=>'sessid'),
|
||||
"logout" => array('m'=>"locstor.logout", 'p'=>array('sessid'), 'r'=>'status'),
|
||||
"storeAudioClipOpen" => array('m'=>"locstor.storeAudioClipOpen",
|
||||
'p'=>array('sessid', 'gunid', 'metadata', 'fname', 'chsum'),
|
||||
'r'=>array('url', 'token')
|
||||
),
|
||||
"storeAudioClipClose" => array('m'=>"locstor.storeAudioClipClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
"accessRawAudioData" => array('m'=>"locstor.accessRawAudioData",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"releaseRawAudioData" => array('m'=>"locstor.releaseRawAudioData",
|
||||
'p'=>array('token'), 'r'=>'status'),
|
||||
"downloadRawAudioDataOpen" =>
|
||||
array('m'=>"locstor.downloadRawAudioDataOpen",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"downloadRawAudioDataClose" =>
|
||||
array('m'=>"locstor.downloadRawAudioDataClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
"downloadMetadataOpen" => array('m'=>"locstor.downloadMetadataOpen",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"downloadMetadataClose" => array('m'=>"locstor.downloadMetadataClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
|
||||
"deleteAudioClip" =>
|
||||
array('m'=>"locstor.deleteAudioClip",
|
||||
'p'=>array('sessid', 'gunid', 'forced'), 'r'=>'status'),
|
||||
"existsAudioClip" => array('m'=>"locstor.existsAudioClip",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'exists'),
|
||||
"getAudioClip" => array('m'=>"locstor.getAudioClip",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'metadata'),
|
||||
"updateAudioClipMetadata" => array('m'=>"locstor.updateAudioClipMetadata",
|
||||
'p'=>array('sessid', 'gunid', 'metadata'), 'r'=>'status'),
|
||||
"searchMetadata" => array('m'=>"locstor.searchMetadata", 'p'=>NULL),
|
||||
"browseCategory" => array('m'=>"locstor.browseCategory", 'p'=>NULL),
|
||||
// "resetStorage" => array('m'=>"locstor.resetStorage",
|
||||
// 'p'=>array()),
|
||||
# 'p'=>array('loadSampleData', 'invalidateSessionIds')),
|
||||
"storeWebstream" => array('m'=>"locstor.storeWebstream",
|
||||
'p'=>array('sessid', 'gunid', 'metadata', 'fname', 'url'),
|
||||
'r'=>array('gunid')
|
||||
),
|
||||
|
||||
"createPlaylist" => array('m'=>"locstor.createPlaylist",
|
||||
'p'=>array('sessid', 'plid', 'fname'), 'r'=>'plid'),
|
||||
"editPlaylist" => array('m'=>"locstor.editPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')),
|
||||
"savePlaylist" => array('m'=>"locstor.savePlaylist",
|
||||
'p'=>array('sessid', 'token', 'newPlaylist'), 'r'=>'plid'),
|
||||
"revertEditedPlaylist" => array('m'=>"locstor.revertEditedPlaylist",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'plid'),
|
||||
"deletePlaylist" => array('m'=>"locstor.deletePlaylist",
|
||||
'p'=>array('sessid', 'plid', 'forced'), 'r'=>'status'),
|
||||
"accessPlaylist" => array('m'=>"locstor.accessPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')),
|
||||
"releasePlaylist" => array('m'=>"locstor.releasePlaylist",
|
||||
'p'=>array('token'), 'r'=>'plid'),
|
||||
"existsPlaylist" => array('m'=>"locstor.existsPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>'exists'),
|
||||
"playlistIsAvailable" => array('m'=>"locstor.playlistIsAvailable",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('available', 'ownerid', 'ownerlogin')),
|
||||
|
||||
"exportPlaylistOpen" => array('m'=>"locstor.exportPlaylistOpen",
|
||||
'p'=>array('sessid', 'plids', 'type', 'standalone'),
|
||||
'r'=>array('url', 'token')),
|
||||
"exportPlaylistClose" => array('m'=>"locstor.exportPlaylistClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"importPlaylistOpen" => array('m'=>"locstor.importPlaylistOpen",
|
||||
'p'=>array('sessid', 'chsum'), 'r'=>array('url', 'token')),
|
||||
"importPlaylistClose" => array('m'=>"locstor.importPlaylistClose",
|
||||
'p'=>array('token'), 'r'=>array('gunid')),
|
||||
|
||||
"renderPlaylistToFileOpen" => array('m'=>"locstor.renderPlaylistToFileOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToFileCheck" => array('m'=>"locstor.renderPlaylistToFileCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'url')),
|
||||
"renderPlaylistToFileClose" => array('m'=>"locstor.renderPlaylistToFileClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"renderPlaylistToStorageOpen" => array('m'=>"locstor.renderPlaylistToStorageOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToStorageCheck" => array('m'=>"locstor.renderPlaylistToStorageCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'gunid')),
|
||||
"renderPlaylistToRSSOpen" => array('m'=>"locstor.renderPlaylistToRSSOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToRSSCheck" => array('m'=>"locstor.renderPlaylistToRSSCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'url')),
|
||||
"renderPlaylistToRSSClose" => array('m'=>"locstor.renderPlaylistToRSSClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
|
||||
"loadPref" => array('m'=>"locstor.loadPref",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
||||
"savePref" => array('m'=>"locstor.savePref",
|
||||
'p'=>array('sessid', 'key', 'value'), 'r'=>'status'),
|
||||
"delPref" => array('m'=>"locstor.delPref",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'status'),
|
||||
"loadGroupPref" => array('m'=>"locstor.loadGroupPref",
|
||||
'p'=>array('sessid', 'group', 'key'), 'r'=>'value'),
|
||||
"saveGroupPref" => array('m'=>"locstor.saveGroupPref",
|
||||
'p'=>array('sessid', 'group', 'key', 'value'), 'r'=>'status'),
|
||||
|
||||
"getTransportInfo" => array('m'=>"locstor.getTransportInfo",
|
||||
'p'=>array('trtok'),
|
||||
'r'=>array('state', 'realsize', 'expectedsize', 'realsum', 'expectedsum')),
|
||||
"turnOnOffTransports" => array('m'=>"locstor.turnOnOffTransports",
|
||||
'p'=>array('sessid', 'onOff'), 'r'=>array('state')),
|
||||
"doTransportAction" => array('m'=>"locstor.doTransportAction",
|
||||
'p'=>array('sessid', 'trtok', 'action'), 'r'=>array('state')),
|
||||
"uploadFile2Hub" => array('m'=>"locstor.uploadFile2Hub",
|
||||
'p'=>array('sessid', 'filePath'), 'r'=>array('trtok')),
|
||||
"getHubInitiatedTransfers" => array('m'=>"locstor.getHubInitiatedTransfers",
|
||||
'p'=>array('sessid'), 'r'=>array()),
|
||||
"startHubInitiatedTransfer" => array('m'=>"locstor.startHubInitiatedTransfer",
|
||||
'p'=>array('trtok'), 'r'=>array()),
|
||||
"upload2Hub" => array('m'=>"locstor.upload2Hub",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('trtok')),
|
||||
"downloadFromHub" => array('m'=>"locstor.downloadFromHub",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('trtok')),
|
||||
// "globalSearch" => array('m'=>"locstor.globalSearch",
|
||||
// 'p'=>array('sessid', 'criteria'), 'r'=>array('trtok')),
|
||||
// "getSearchResults" => array('m'=>"locstor.getSearchResults",
|
||||
// 'p'=>array('trtok')),
|
||||
|
||||
"createBackupOpen" => array('m'=>"locstor.createBackupOpen",
|
||||
'p'=>array('sessid', 'criteria'), 'r'=>array('token')),
|
||||
"createBackupCheck" => array('m'=>"locstor.createBackupCheck",
|
||||
# 'p'=>array('token'), 'r'=>array('status', 'url', 'metafile', 'faultString')),
|
||||
'p'=>array('token'), 'r'=>array('status', 'url', 'tmpfile')),
|
||||
"createBackupClose" => array('m'=>"locstor.createBackupClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"restoreBackupOpen" => array('m'=>"locstor.restoreBackupOpen",
|
||||
'p'=>array('sessid', 'chsum'), 'r'=>array('url', 'token')),
|
||||
"restoreBackupClosePut" => array('m'=>"locstor.restoreBackupClosePut",
|
||||
'p'=>array('sessid', 'token'), 'r'=>array('token')),
|
||||
"restoreBackupCheck" => array('m'=>"locstor.restoreBackupCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'faultString')),
|
||||
"restoreBackupClose" => array('m'=>"locstor.restoreBackupClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
|
||||
/*
|
||||
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
||||
"downloadFromArchive" => array('m'=>"locstor.downloadFromArchive",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
||||
*/
|
||||
|
||||
"openPut" => array('m'=>"locstor.openPut", 'p'=>array()),
|
||||
"closePut" => array('m'=>"locstor.closePut", 'p'=>array()),
|
||||
);
|
||||
|
||||
|
||||
switch ($method) {
|
||||
case "searchMetadata":
|
||||
// case "globalSearch":
|
||||
case "createBackupOpen":
|
||||
$parr = array(
|
||||
'sessid'=>$pars[0],
|
||||
'criteria'=>array(
|
||||
'filetype'=>'audioclip',
|
||||
'operator'=>'and',
|
||||
'limit'=> 0,
|
||||
'offset'=> 0,
|
||||
'conditions'=>array(
|
||||
array('cat'=>$pars[1], 'op'=>'partial', 'val'=>$pars[2])
|
||||
)
|
||||
),
|
||||
);
|
||||
break;
|
||||
case "browseCategory":
|
||||
$parr = array(
|
||||
'sessid'=>$pars[0],
|
||||
'category'=>$pars[1],
|
||||
'criteria'=>array(
|
||||
'filetype'=>'audioclip',
|
||||
'operator'=>'and',
|
||||
'limit'=> 0,
|
||||
'offset'=> 0,
|
||||
'conditions'=>array(
|
||||
array('cat'=>$pars[2], 'op'=>'partial', 'val'=>$pars[3])
|
||||
)
|
||||
),
|
||||
);
|
||||
break;
|
||||
// case "resetStorage":
|
||||
// $parr = array(
|
||||
// 'loadSampleData'=>(boolean)$pars[0],
|
||||
// 'invalidateSessionIds'=>(boolean)$pars[1],
|
||||
// );
|
||||
// break;
|
||||
default:
|
||||
$pinfo = $infos[$method]['p'];
|
||||
if (is_null($pinfo)) {
|
||||
$parr = NULL;
|
||||
} elseif(!is_array($pinfo)) {
|
||||
$parr = $pars[0];
|
||||
#echo "pinfo not null and not array.\n"; exit;
|
||||
} elseif(count($pinfo) == 0) {
|
||||
$parr = (object)array();
|
||||
} else {
|
||||
$parr = array(); $i=0;
|
||||
foreach($pinfo as $it){
|
||||
if(isset($pars[$i])) $parr[$it] = $pars[$i];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
} // switch
|
||||
|
||||
$fullmethod = $infos[$method]['m'];
|
||||
if (is_array($options)) {
|
||||
$msg = new XML_RPC_Message($fullmethod, array(XML_RPC_encode($options)));
|
||||
} else {
|
||||
$msg = new XML_RPC_Message($fullmethod);
|
||||
}
|
||||
//$msg = new XML_RPC_Message($fullmethod, array(XML_RPC_encode($parr)));
|
||||
|
||||
if ($verbose) {
|
||||
echo "parr:\n";
|
||||
var_dump($parr);
|
||||
echo "message:\n";
|
||||
echo $msg->serialize()."\n";
|
||||
}
|
||||
|
||||
#$client->setDebug(1);
|
||||
$res = $client->send($msg);
|
||||
if ($res->faultCode() > 0) {
|
||||
echo "xr_cli_test.php: ".$res->faultString()." ".$res->faultCode()."\n";
|
||||
# echo var_export($res);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo "result:\n";
|
||||
echo $res->serialize();
|
||||
}
|
||||
|
||||
$resp = XML_RPC_decode($res->value());
|
||||
if (isset($infos[$method]['r'])) {
|
||||
$pom = $infos[$method]['r'];
|
||||
if (is_array($pom)) {
|
||||
foreach ($pom as $k => $it) {
|
||||
$pom[$k] = $resp[$it];
|
||||
}
|
||||
echo join(' ', $pom)."\n";
|
||||
} else {
|
||||
switch ($pom) {
|
||||
case "status":
|
||||
case "exists":
|
||||
echo ($resp[$pom]=='1' ? "TRUE" : "FALSE" )."\n";
|
||||
break;
|
||||
default:
|
||||
echo "{$resp[$pom]}\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch ($method) {
|
||||
case "searchMetadata":
|
||||
// case "getSearchResults":
|
||||
$acCnt = 0;
|
||||
$acGunids = array();
|
||||
$plCnt = 0;
|
||||
$plGunids = array();
|
||||
$fld = (isset($options['category']) ? $options['category'] : 'gunid' );
|
||||
foreach ($resp['results'] as $k => $v) {
|
||||
if ($v['type']=='audioclip') {
|
||||
$acCnt++;
|
||||
$acGunids[] = $v[$fld];
|
||||
}
|
||||
if ($v['type']=='playlist') {
|
||||
$plCnt++;
|
||||
$plGunids[] = $v[$fld];
|
||||
}
|
||||
}
|
||||
echo "AC({$acCnt}): ".
|
||||
join(", ", $acGunids).
|
||||
" | PL({$plCnt}): ".
|
||||
join(", ", $plGunids).
|
||||
"\n";
|
||||
break;
|
||||
case "browseCategory":
|
||||
echo "RES({$resp['cnt']}): ".
|
||||
join(", ", $resp['results']).
|
||||
"\n";
|
||||
break;
|
||||
default:
|
||||
print_r($resp);
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
include_once("XML/RPC.php");
|
||||
|
||||
session_start();
|
||||
|
||||
/**
|
||||
* Get a persistant value. If the value is present in the $_REQUEST
|
||||
* array, the session variable will be set to this value and returned.
|
||||
* If the value is not yet set, it will be set to the default value.
|
||||
* In all other cases the value from the session variable is returned.
|
||||
*
|
||||
* @param string $p_name
|
||||
* @param mixed $p_defaultValue
|
||||
* @return mixed
|
||||
*/
|
||||
function camp_session_get($p_name, $p_defaultValue)
|
||||
{
|
||||
// Use the REQUEST variable if it is set.
|
||||
if (isset($_REQUEST[$p_name])) {
|
||||
$_SESSION[$p_name] = $_REQUEST[$p_name];
|
||||
}
|
||||
elseif (!isset($_SESSION[$p_name])) {
|
||||
$_SESSION[$p_name] = $p_defaultValue;
|
||||
}
|
||||
return $_SESSION[$p_name];
|
||||
} // fn camp_session_get
|
||||
|
||||
|
||||
/**
|
||||
* Print out an HTML OPTION element.
|
||||
*
|
||||
* @param string $p_value
|
||||
* @param string $p_selectedValue
|
||||
* @param string $p_printValue
|
||||
* @return boolean
|
||||
* Return TRUE if the option is selected, FALSE if not.
|
||||
*/
|
||||
function camp_html_select_option($p_value, $p_selectedValue, $p_printValue)
|
||||
{
|
||||
$selected = false;
|
||||
$str = '<OPTION VALUE="'.htmlspecialchars($p_value, ENT_QUOTES).'"';
|
||||
if (!strcmp($p_value, $p_selectedValue)) {
|
||||
$str .= ' SELECTED';
|
||||
$selected = true;
|
||||
}
|
||||
$str .= '>'.htmlspecialchars($p_printValue)."</OPTION>\n";
|
||||
echo $str;
|
||||
return $selected;
|
||||
} // fn camp_html_select_option
|
||||
|
||||
|
||||
$serverPath =
|
||||
"http://{$CC_CONFIG['storageUrlHost']}:{$CC_CONFIG['storageUrlPort']}".
|
||||
"{$CC_CONFIG['storageUrlPath']}/{$CC_CONFIG['storageXMLRPC']}";
|
||||
$serverPath = camp_session_get("storageserver_xmlrpc_path", $serverPath);
|
||||
$f_selectedMethod = camp_session_get("f_selectedMethod", "listMethods");
|
||||
$url = parse_url($serverPath);
|
||||
$client = new XML_RPC_Client($url['path'], $url['host']);
|
||||
|
||||
$methodDefs = array(
|
||||
"listMethods" => array('m'=>"system.listMethods", 'p'=>NULL),
|
||||
"methodHelp" => array('m'=>"system.methodHelp", 'p'=>0),
|
||||
"methodSignature" => array('m'=>"system.methodSignature", 'p'=>0),
|
||||
"test" => array('m'=>"locstor.test", 'p'=>array('sessid', 'teststring')),
|
||||
"getVersion" => array('m'=>"locstor.getVersion", 'p'=>array(), 'r'=>'version'),
|
||||
"authenticate" => array('m'=>"locstor.authenticate", 'p'=>array('login', 'pass'), 'r'=>'authenticate'),
|
||||
"login" => array('m'=>"locstor.login", 'p'=>array('login', 'pass'), 'r'=>'sessid'),
|
||||
"logout" => array('m'=>"locstor.logout", 'p'=>array('sessid'), 'r'=>'status'),
|
||||
"storeAudioClipOpen" => array('m'=>"locstor.storeAudioClipOpen",
|
||||
'p'=>array('sessid', 'gunid', 'metadata', 'fname', 'chsum'),
|
||||
'r'=>array('url', 'token')
|
||||
),
|
||||
"storeAudioClipClose" => array('m'=>"locstor.storeAudioClipClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
"accessRawAudioData" => array('m'=>"locstor.accessRawAudioData",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"releaseRawAudioData" => array('m'=>"locstor.releaseRawAudioData",
|
||||
'p'=>array('token'), 'r'=>'status'),
|
||||
"downloadRawAudioDataOpen" =>
|
||||
array('m'=>"locstor.downloadRawAudioDataOpen",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"downloadRawAudioDataClose" =>
|
||||
array('m'=>"locstor.downloadRawAudioDataClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
"downloadMetadataOpen" => array('m'=>"locstor.downloadMetadataOpen",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('url', 'token')),
|
||||
"downloadMetadataClose" => array('m'=>"locstor.downloadMetadataClose",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'gunid'),
|
||||
|
||||
"deleteAudioClip" =>
|
||||
array('m'=>"locstor.deleteAudioClip",
|
||||
'p'=>array('sessid', 'gunid', 'forced'), 'r'=>'status'),
|
||||
"existsAudioClip" => array('m'=>"locstor.existsAudioClip",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'exists'),
|
||||
"getAudioClip" => array('m'=>"locstor.getAudioClip",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'metadata'),
|
||||
"updateAudioClipMetadata" => array('m'=>"locstor.updateAudioClipMetadata",
|
||||
'p'=>array('sessid', 'gunid', 'metadata'), 'r'=>'status'),
|
||||
"searchMetadata" => array('m'=>"locstor.searchMetadata", 'p'=>NULL),
|
||||
"browseCategory" => array('m'=>"locstor.browseCategory", 'p'=>NULL),
|
||||
// "resetStorage" => array('m'=>"locstor.resetStorage",
|
||||
// 'p'=>array()),
|
||||
"storeWebstream" => array('m'=>"locstor.storeWebstream",
|
||||
'p'=>array('sessid', 'gunid', 'metadata', 'fname', 'url'),
|
||||
'r'=>array('gunid')
|
||||
),
|
||||
|
||||
"createPlaylist" => array('m'=>"locstor.createPlaylist",
|
||||
'p'=>array('sessid', 'plid', 'fname'), 'r'=>'plid'),
|
||||
"editPlaylist" => array('m'=>"locstor.editPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')),
|
||||
"savePlaylist" => array('m'=>"locstor.savePlaylist",
|
||||
'p'=>array('sessid', 'token', 'newPlaylist'), 'r'=>'plid'),
|
||||
"revertEditedPlaylist" => array('m'=>"locstor.revertEditedPlaylist",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'plid'),
|
||||
"deletePlaylist" => array('m'=>"locstor.deletePlaylist",
|
||||
'p'=>array('sessid', 'plid', 'forced'), 'r'=>'status'),
|
||||
"accessPlaylist" => array('m'=>"locstor.accessPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')),
|
||||
"releasePlaylist" => array('m'=>"locstor.releasePlaylist",
|
||||
'p'=>array('token'), 'r'=>'plid'),
|
||||
"existsPlaylist" => array('m'=>"locstor.existsPlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>'exists'),
|
||||
"playlistIsAvailable" => array('m'=>"locstor.playlistIsAvailable",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>array('available', 'ownerid', 'ownerlogin')),
|
||||
|
||||
"exportPlaylistOpen" => array('m'=>"locstor.exportPlaylistOpen",
|
||||
'p'=>array('sessid', 'plids', 'type', 'standalone'),
|
||||
'r'=>array('url', 'token')),
|
||||
"exportPlaylistClose" => array('m'=>"locstor.exportPlaylistClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"importPlaylistOpen" => array('m'=>"locstor.importPlaylistOpen",
|
||||
'p'=>array('sessid', 'chsum'), 'r'=>array('url', 'token')),
|
||||
"importPlaylistClose" => array('m'=>"locstor.importPlaylistClose",
|
||||
'p'=>array('token'), 'r'=>array('gunid')),
|
||||
|
||||
"renderPlaylistToFileOpen" => array('m'=>"locstor.renderPlaylistToFileOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToFileCheck" => array('m'=>"locstor.renderPlaylistToFileCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'url')),
|
||||
"renderPlaylistToFileClose" => array('m'=>"locstor.renderPlaylistToFileClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"renderPlaylistToStorageOpen" => array('m'=>"locstor.renderPlaylistToStorageOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToStorageCheck" => array('m'=>"locstor.renderPlaylistToStorageCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'gunid')),
|
||||
"renderPlaylistToRSSOpen" => array('m'=>"locstor.renderPlaylistToRSSOpen",
|
||||
'p'=>array('sessid', 'plid'),
|
||||
'r'=>array('token')),
|
||||
"renderPlaylistToRSSCheck" => array('m'=>"locstor.renderPlaylistToRSSCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'url')),
|
||||
"renderPlaylistToRSSClose" => array('m'=>"locstor.renderPlaylistToRSSClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
|
||||
"loadPref" => array('m'=>"locstor.loadPref",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
||||
"savePref" => array('m'=>"locstor.savePref",
|
||||
'p'=>array('sessid', 'key', 'value'), 'r'=>'status'),
|
||||
"delPref" => array('m'=>"locstor.delPref",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'status'),
|
||||
"loadGroupPref" => array('m'=>"locstor.loadGroupPref",
|
||||
'p'=>array('sessid', 'group', 'key'), 'r'=>'value'),
|
||||
"saveGroupPref" => array('m'=>"locstor.saveGroupPref",
|
||||
'p'=>array('sessid', 'group', 'key', 'value'), 'r'=>'status'),
|
||||
|
||||
"getTransportInfo" => array('m'=>"locstor.getTransportInfo",
|
||||
'p'=>array('trtok'),
|
||||
'r'=>array('state', 'realsize', 'expectedsize', 'realsum', 'expectedsum')),
|
||||
"turnOnOffTransports" => array('m'=>"locstor.turnOnOffTransports",
|
||||
'p'=>array('sessid', 'onOff'), 'r'=>array('state')),
|
||||
"doTransportAction" => array('m'=>"locstor.doTransportAction",
|
||||
'p'=>array('sessid', 'trtok', 'action'), 'r'=>array('state')),
|
||||
"uploadFile2Hub" => array('m'=>"locstor.uploadFile2Hub",
|
||||
'p'=>array('sessid', 'filePath'), 'r'=>array('trtok')),
|
||||
"getHubInitiatedTransfers" => array('m'=>"locstor.getHubInitiatedTransfers",
|
||||
'p'=>array('sessid'), 'r'=>array()),
|
||||
"startHubInitiatedTransfer" => array('m'=>"locstor.startHubInitiatedTransfer",
|
||||
'p'=>array('trtok'), 'r'=>array()),
|
||||
"upload2Hub" => array('m'=>"locstor.upload2Hub",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('trtok')),
|
||||
"downloadFromHub" => array('m'=>"locstor.downloadFromHub",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>array('trtok')),
|
||||
// "globalSearch" => array('m'=>"locstor.globalSearch",
|
||||
// 'p'=>array('sessid', 'criteria'), 'r'=>array('trtok')),
|
||||
// "getSearchResults" => array('m'=>"locstor.getSearchResults",
|
||||
// 'p'=>array('trtok')),
|
||||
|
||||
"createBackupOpen" => array('m'=>"locstor.createBackupOpen",
|
||||
'p'=>array('sessid', 'criteria'), 'r'=>array('token')),
|
||||
"createBackupCheck" => array('m'=>"locstor.createBackupCheck",
|
||||
# 'p'=>array('token'), 'r'=>array('status', 'url', 'metafile', 'faultString')),
|
||||
'p'=>array('token'), 'r'=>array('status', 'url', 'tmpfile')),
|
||||
"createBackupClose" => array('m'=>"locstor.createBackupClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"restoreBackupOpen" => array('m'=>"locstor.restoreBackupOpen",
|
||||
'p'=>array('sessid', 'chsum'), 'r'=>array('url', 'token')),
|
||||
"restoreBackupClosePut" => array('m'=>"locstor.restoreBackupClosePut",
|
||||
'p'=>array('sessid', 'token'), 'r'=>array('token')),
|
||||
"restoreBackupCheck" => array('m'=>"locstor.restoreBackupCheck",
|
||||
'p'=>array('token'), 'r'=>array('status', 'faultString')),
|
||||
"restoreBackupClose" => array('m'=>"locstor.restoreBackupClose",
|
||||
'p'=>array('token'), 'r'=>array('status')),
|
||||
"openPut" => array('m'=>"locstor.openPut", 'p'=>array()),
|
||||
"closePut" => array('m'=>"locstor.closePut", 'p'=>array()),
|
||||
);
|
||||
|
||||
if (isset($_REQUEST['go_button'])) {
|
||||
// Get the parameters
|
||||
$methodParams = $methodDefs[$f_selectedMethod]['p'];
|
||||
foreach ($methodParams as $methodParamName) {
|
||||
$inputParamName = "param_".$methodParamName;
|
||||
$xmlParameters[$methodParamName] = $_REQUEST[$inputParamName];
|
||||
$_SESSION[$inputParamName] = $_REQUEST[$inputParamName];
|
||||
}
|
||||
|
||||
// Create the XML-RPC message
|
||||
$actualMethod = $methodDefs[$f_selectedMethod]['m'];
|
||||
$msg = new XML_RPC_Message($actualMethod, array(XML_RPC_encode($xmlParameters)));
|
||||
$sentMessage = $msg->serialize();
|
||||
|
||||
// Send it
|
||||
$sendResult = $client->send($msg);
|
||||
if ($sendResult->faultCode() > 0) {
|
||||
$errorMsg = "xr_cli_test.php: ".$sendResult->faultString()." ".$sendResult->faultCode()."\n";
|
||||
} else {
|
||||
// If successful
|
||||
$xmlResponse = XML_RPC_decode($sendResult->value());
|
||||
|
||||
// Special case state handling
|
||||
switch ($f_selectedMethod) {
|
||||
case "login":
|
||||
// Remember the login session ID so we can use it to call
|
||||
// other methods.
|
||||
$loggedIn = true;
|
||||
$_SESSION['xmlrpc_session_id'] = $xmlResponse['sessid'];
|
||||
break;
|
||||
case "logout":
|
||||
unset($_SESSION['xmlrpc_session_id']);
|
||||
break;
|
||||
case "storeAudioClipOpen":
|
||||
$_SESSION['xmlrpc_token'] = $xmlResponse['token'];
|
||||
$_SESSION['xmlrpc_put_url'] = $xmlResponse['url'];
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($methodDefs[$method]['r'])) {
|
||||
$expectedResult = $methodDefs[$method]['r'];
|
||||
if (is_array($expectedResult)) {
|
||||
foreach ($expectedResult as $resultName) {
|
||||
$actualResults[$resultName] = $xmlResponse[$resultName];
|
||||
}
|
||||
echo join(' ', $actualResults)."\n";
|
||||
} else {
|
||||
switch ($expectedResult) {
|
||||
case "status":
|
||||
case "exists":
|
||||
echo ($xmlResponse[$expectedResult]=='1' ? "TRUE" : "FALSE" )."\n";
|
||||
break;
|
||||
default:
|
||||
echo "{$xmlResponse[$expectedResult]}\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch ($method) {
|
||||
case "searchMetadata":
|
||||
// case "getSearchResults":
|
||||
$acCnt = 0;
|
||||
$acGunids = array();
|
||||
$plCnt = 0;
|
||||
$plGunids = array();
|
||||
$fld = (isset($options['category']) ? $options['category'] : 'gunid' );
|
||||
foreach ($xmlResponse['results'] as $k => $v) {
|
||||
if ($v['type']=='audioclip') {
|
||||
$acCnt++;
|
||||
$acGunids[] = $v[$fld];
|
||||
}
|
||||
if ($v['type']=='playlist') {
|
||||
$plCnt++;
|
||||
$plGunids[] = $v[$fld];
|
||||
}
|
||||
}
|
||||
echo "AC({$acCnt}): ".
|
||||
join(", ", $acGunids).
|
||||
" | PL({$plCnt}): ".
|
||||
join(", ", $plGunids).
|
||||
"\n";
|
||||
break;
|
||||
case "browseCategory":
|
||||
echo "RES({$xmlResponse['cnt']}): ".
|
||||
join(", ", $xmlResponse['results']).
|
||||
"\n";
|
||||
break;
|
||||
default:
|
||||
//print_r($xmlResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<body bgcolor="#dddddd">
|
||||
<form>
|
||||
StorageServer path : <INPUT type="text" name="f_storageserver_xmlrpc_path" value="<?php echo $serverPath; ?>" size="100"><br>
|
||||
Method:
|
||||
<select name="f_selectedMethod" onchange="this.form.submit();">
|
||||
<?php
|
||||
foreach ($methodDefs as $methodName => $methodDef) {
|
||||
camp_html_select_option($methodName, $f_selectedMethod, $methodName);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br>
|
||||
Parameters:
|
||||
<?PHP
|
||||
$methodParams = $methodDefs[$f_selectedMethod]['p'];
|
||||
if (!is_array($methodParams) || count($methodParams) == 0) {
|
||||
echo "This method requires no parameters.<br>";
|
||||
} else {
|
||||
echo "<table cellpadding=3>";
|
||||
foreach ($methodParams as $methodParamName) {
|
||||
$value = "";
|
||||
if ($methodParamName == "sessid" && isset($_SESSION['xmlrpc_session_id'])) {
|
||||
$value = $_SESSION['xmlrpc_session_id'];
|
||||
} elseif ($methodParamName == "token" && isset($_SESSION['xmlrpc_token'])) {
|
||||
$value = $_SESSION['xmlrpc_token'];
|
||||
} elseif (isset($_SESSION["param_".$methodParamName])) {
|
||||
$value = $_SESSION["param_".$methodParamName];
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td>$methodParamName</td>"; ?> <td><INPUT type="text" name="param_<?php echo $methodParamName; ?>" value="<?php echo $value; ?>"><td></tr>
|
||||
<?php
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<INPUT type="submit" name="go_button" value="Send Message">
|
||||
</form>
|
||||
|
||||
|
||||
<?PHP
|
||||
if ($loggedIn) {
|
||||
echo "You have logged in with session ID: ".$_SESSION['xmlrpc_session_id']."<br><br>";
|
||||
}
|
||||
if (isset($sentMessage)) {
|
||||
?>
|
||||
Sent message:<br>
|
||||
<TEXTAREA cols="60" rows="8">Method name: <?php echo $actualMethod; ?>
|
||||
<?php print_r($xmlParameters);?></TEXTAREA>
|
||||
<br>
|
||||
<?PHP
|
||||
}
|
||||
if (isset($errorMsg)) {
|
||||
?>
|
||||
Error:<br>
|
||||
<TEXTAREA cols="60" rows="8"><?php print_r($errorMsg);?></TEXTAREA>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
|
||||
if (isset($xmlResponse)) {
|
||||
?>
|
||||
Response:<br>
|
||||
<TEXTAREA cols="60" rows="8"><?php print_r($xmlResponse);?></TEXTAREA>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
require_once 'soundcloud-api/Services/Soundcloud.php';
|
||||
|
||||
class Airtime_View_Helper_SoundCloudLink extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function soundCloudLink()
|
||||
{
|
||||
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||
$host = $request->getHttpHost();
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
$redirectUrl = "http://{$host}/{$controller}/{$action}";
|
||||
|
||||
$soundcloud = new Services_Soundcloud('2CLCxcSXYzx7QhhPVHN4A', 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs', $redirectUrl);
|
||||
$authorizeUrl = $soundcloud->getAuthorizeUrl();
|
||||
|
||||
return $authorizeUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<br /><br /><center>View script for controller <b>AirtimeRecorder</b> and script/action name <b>index</b></center>
|
|
@ -0,0 +1 @@
|
|||
<br /><br /><center>View script for controller <b>Recorder</b> and script/action name <b>getShowSchedule</b></center>
|
|
@ -0,0 +1 @@
|
|||
<br /><br /><center>View script for controller <b>Recorder</b> and script/action name <b>index</b></center>
|
|
@ -0,0 +1,114 @@
|
|||
# SoundCloud PHP API Wrapper
|
||||
|
||||
## Introduction
|
||||
|
||||
A wrapper for the SoundCloud API written in PHP with support for authentication using [OAuth 2.0](http://oauth.net/2/).
|
||||
|
||||
The wrapper got a real overhaul with version 2.0. The current version was written with [PEAR](http://pear.php.net/) in mind and can easily by distributed as a PEAR package.
|
||||
|
||||
## Getting started
|
||||
|
||||
Check out the [getting started](https://github.com/mptre/php-soundcloud/wiki/OAuth-2) wiki entry for further reference on how to get started. Also make sure to check out the [demo application](https://github.com/mptre/ci-soundcloud) for some example code.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
The wrapper includes convenient methods used to perform HTTP requests on behalf of the authenticated user. Below you'll find a few quick examples.
|
||||
|
||||
Ofcourse you need to handle the authentication first before being able to request and modify protect resources as demonstrated below. Therefor I refer to the [demo application](https://github.com/mptre/ci-soundcloud) which got some example code on how to handle authentication.
|
||||
|
||||
### GET
|
||||
|
||||
<pre><code>try {
|
||||
$response = json_decode($soundcloud->get('me'), true);
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}</code></pre>
|
||||
|
||||
### POST
|
||||
|
||||
<pre><code>$comment = <<<EOH
|
||||
<comment>
|
||||
<body>Yeah!</body>
|
||||
</comment>
|
||||
EOH;
|
||||
|
||||
try {
|
||||
$response = json_decode(
|
||||
$soundcloud->post(
|
||||
'tracks/1/comments',
|
||||
$comment,
|
||||
array(CURLOPT_HTTPHEADER => array('Content-Type: application/xml'))
|
||||
),
|
||||
true
|
||||
);
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}</code></pre>
|
||||
|
||||
### PUT
|
||||
|
||||
<pre><code>$track = <<<EOH
|
||||
<track>
|
||||
<downloadable>true</downloadable>
|
||||
</track>
|
||||
EOH;
|
||||
|
||||
try {
|
||||
$response = json_decode(
|
||||
$soundcloud->put(
|
||||
'tracks/1',
|
||||
$track,
|
||||
array(CURLOPT_HTTPHEADER => array('Content-Type: application/xml'))
|
||||
),
|
||||
true
|
||||
);
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}</code></pre>
|
||||
|
||||
### DELETE
|
||||
|
||||
<pre><code>try {
|
||||
$response = json_decode($soundcloud->delete('tracks/1'), true);
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}</code></pre>
|
||||
|
||||
### DOWNLOAD TRACK
|
||||
|
||||
<pre><code>try {
|
||||
$track = $soundcloud->download(1337);
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
exit($e->getMessage());
|
||||
}
|
||||
|
||||
// do something clever with $track. Save to file perhaps?</code></pre>
|
||||
|
||||
## Feedback and questions
|
||||
|
||||
Found a bug or missing a feature? Don't hesitate to create a new issue here on GitHub. Or contact me [directly](https://github.com/mptre).
|
||||
|
||||
Also make sure to check out the official [documentation](https://github.com/soundcloud/api/wiki/) and the join [Google Group](https://groups.google.com/group/soundcloudapi?pli=1) in order to stay updated.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2011 Anton Lindqvist
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,713 @@
|
|||
<?php
|
||||
require_once 'Soundcloud/Exception.php';
|
||||
require_once 'Soundcloud/Version.php';
|
||||
|
||||
/**
|
||||
* SoundCloud API wrapper with support for authentication using OAuth 2.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud {
|
||||
|
||||
/**
|
||||
* Custom cURL option.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
const CURLOPT_OAUTH_TOKEN = 173;
|
||||
|
||||
/**
|
||||
* Access token returned by the service provider after a successful authentication.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_accessToken;
|
||||
|
||||
/**
|
||||
* Version of the API to use.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private static $_apiVersion = 1;
|
||||
|
||||
/**
|
||||
* Supported audio MIME types.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $_audioMimeTypes = array(
|
||||
'aac' => 'video/mp4',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'flac' => 'audio/flac',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'ogg' => 'audio/ogg',
|
||||
'wav' => 'audio/x-wav'
|
||||
);
|
||||
|
||||
/**
|
||||
* OAuth client id.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_clientId;
|
||||
|
||||
/**
|
||||
* OAuth client secret.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_clientSecret;
|
||||
|
||||
/**
|
||||
* Development mode.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_development;
|
||||
|
||||
/**
|
||||
* Available API domains.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $_domains = array(
|
||||
'development' => 'sandbox-soundcloud.com',
|
||||
'production' => 'soundcloud.com'
|
||||
);
|
||||
|
||||
/**
|
||||
* HTTP response body from the last request.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_lastHttpResponseBody;
|
||||
|
||||
/**
|
||||
* HTTP response code from the last request.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private $_lastHttpResponseCode;
|
||||
|
||||
/**
|
||||
* HTTP response headers from last request.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_lastHttpResponseHeaders;
|
||||
|
||||
/**
|
||||
* OAuth paths.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $_paths = array(
|
||||
'authorize' => 'connect',
|
||||
'access_token' => 'oauth2/token',
|
||||
);
|
||||
|
||||
/**
|
||||
* OAuth redirect uri.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_redirectUri;
|
||||
|
||||
/**
|
||||
* API response format MIME type.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_requestFormat;
|
||||
|
||||
/**
|
||||
* Available response formats.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $_responseFormats = array(
|
||||
'*' => '*/*',
|
||||
'json' => 'application/json',
|
||||
'xml' => 'application/xml'
|
||||
);
|
||||
|
||||
/**
|
||||
* HTTP user agent.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private static $_userAgent = 'PHP-SoundCloud';
|
||||
|
||||
/**
|
||||
* Class version.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $clientId OAuth client id
|
||||
* @param string $clientSecret OAuth client secret
|
||||
* @param string $redirectUri OAuth redirect uri
|
||||
* @param boolean $development Sandbox mode
|
||||
*
|
||||
* @throws Services_Soundcloud_Missing_Client_Id_Exception when missing client id
|
||||
* @return void
|
||||
*/
|
||||
function __construct($clientId, $clientSecret, $redirectUri = null, $development = false) {
|
||||
if (empty($clientId)) {
|
||||
throw new Services_Soundcloud_Missing_Client_Id_Exception();
|
||||
}
|
||||
|
||||
$this->_clientId = $clientId;
|
||||
$this->_clientSecret = $clientSecret;
|
||||
$this->_redirectUri = $redirectUri;
|
||||
$this->_development = $development;
|
||||
$this->_responseFormat = self::$_responseFormats['json'];
|
||||
$this->version = Services_Soundcloud_Version::get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authorization URL.
|
||||
*
|
||||
* @param array $params Optional query string parameters
|
||||
*
|
||||
* @return string
|
||||
* @see Soundcloud::_buildUrl()
|
||||
*/
|
||||
function getAuthorizeUrl($params = array()) {
|
||||
$defaultParams = array(
|
||||
'client_id' => $this->_clientId,
|
||||
'redirect_uri' => $this->_redirectUri,
|
||||
'response_type' => 'code'
|
||||
);
|
||||
$params = array_merge($defaultParams, $params);
|
||||
|
||||
return $this->_buildUrl(self::$_paths['authorize'], $params, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get access token URL.
|
||||
*
|
||||
* @param array $params Optional query string parameters
|
||||
*
|
||||
* @return string
|
||||
* @see Soundcloud::_buildUrl()
|
||||
*/
|
||||
function getAccessTokenUrl($params = array()) {
|
||||
return $this->_buildUrl(self::$_paths['access_token'], $params, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve access token.
|
||||
*
|
||||
* @param string $code OAuth code returned from the service provider
|
||||
* @param array $postData Optional post data
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_getAccessToken()
|
||||
*/
|
||||
function accessToken($code, $postData = array(), $curlOptions = array()) {
|
||||
$defaultPostData = array(
|
||||
'code' => $code,
|
||||
'client_id' => $this->_clientId,
|
||||
'client_secret' => $this->_clientSecret,
|
||||
'redirect_uri' => $this->_redirectUri,
|
||||
'grant_type' => 'authorization_code'
|
||||
);
|
||||
$postData = array_merge($defaultPostData, $postData);
|
||||
|
||||
return $this->_getAccessToken($postData, $curlOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh access token.
|
||||
*
|
||||
* @param string $refreshToken
|
||||
* @param array $postData Optional post data
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_getAccessToken()
|
||||
*/
|
||||
function accessTokenRefresh($refreshToken, $postData = array(), $curlOptions = array()) {
|
||||
$defaultPostData = array(
|
||||
'refresh_token' => $refreshToken,
|
||||
'client_id' => $this->_clientId,
|
||||
'client_secret' => $this->_clientSecret,
|
||||
'redirect_uri' => $this->_redirectUri,
|
||||
'grant_type' => 'refresh_token'
|
||||
);
|
||||
$postData = array_merge($defaultPostData, $postData);
|
||||
|
||||
return $this->_getAccessToken($postData, $curlOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get access token.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getAccessToken() {
|
||||
return $this->_accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get API version.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function getApiVersion() {
|
||||
return self::$_apiVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the corresponding MIME type for a given file extension.
|
||||
*
|
||||
* @param string $extension
|
||||
*
|
||||
* @return string
|
||||
* @throws Services_Soundcloud_Unsupported_Audio_Format_Exception if the format is unsupported
|
||||
*/
|
||||
function getAudioMimeType($extension) {
|
||||
if (array_key_exists($extension, self::$_audioMimeTypes)) {
|
||||
return self::$_audioMimeTypes[$extension];
|
||||
} else {
|
||||
throw new Services_Soundcloud_Unsupported_Audio_Format_Exception();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get development mode.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function getDevelopment() {
|
||||
return $this->_development;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTTP response header.
|
||||
*
|
||||
* @param string $header Name of the header
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getHttpHeader($header) {
|
||||
if (is_array($this->_lastHttpResponseHeaders)
|
||||
&& array_key_exists($header, $this->_lastHttpResponseHeaders)
|
||||
) {
|
||||
return $this->_lastHttpResponseHeaders[$header];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get redirect uri.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getRedirectUri() {
|
||||
return $this->_redirectUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get response format.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getResponseFormat() {
|
||||
return $this->_responseFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set access token.
|
||||
*
|
||||
* @param string $accessToken
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
function setAccessToken($accessToken) {
|
||||
$this->_accessToken = $accessToken;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set redirect uri.
|
||||
*
|
||||
* @param string $redirectUri
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
function setRedirectUri($redirectUri) {
|
||||
$this->_redirectUri = $redirectUri;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set response format.
|
||||
*
|
||||
* @param string $format Could either be xml or json
|
||||
*
|
||||
* @throws Services_Soundcloud_Unsupported_Response_Format_Exception if the given response format isn't supported
|
||||
* @return object
|
||||
*/
|
||||
function setResponseFormat($format) {
|
||||
if (array_key_exists($format, self::$_responseFormats)) {
|
||||
$this->_responseFormat = self::$_responseFormats[$format];
|
||||
} else {
|
||||
throw new Services_Soundcloud_Unsupported_Response_Format_Exception();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set development mode.
|
||||
*
|
||||
* @param boolean $development
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
function setDevelopment($development) {
|
||||
$this->_development = $development;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a GET HTTP request.
|
||||
*
|
||||
* @param string $path URI to request
|
||||
* @param array $params Optional query string parameters
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_request()
|
||||
*/
|
||||
function get($path, $params = array(), $curlOptions = array()) {
|
||||
$url = $this->_buildUrl($path, $params);
|
||||
|
||||
return $this->_request($url, $curlOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a POST HTTP request.
|
||||
*
|
||||
* @param string $path URI to request
|
||||
* @param array $postData Optional post data
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_request()
|
||||
*/
|
||||
function post($path, $postData = array(), $curlOptions = array()) {
|
||||
$url = $this->_buildUrl($path);
|
||||
$options = array(CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData);
|
||||
$options += $curlOptions;
|
||||
|
||||
return $this->_request($url, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a PUT HTTP request.
|
||||
*
|
||||
* @param string $path URI to request
|
||||
* @param array $postData Optional post data
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_request()
|
||||
*/
|
||||
function put($path, $postData, $curlOptions = array()) {
|
||||
$url = $this->_buildUrl($path);
|
||||
$options = array(
|
||||
CURLOPT_CUSTOMREQUEST => 'PUT',
|
||||
CURLOPT_POSTFIELDS => $postData
|
||||
);
|
||||
$options += $curlOptions;
|
||||
|
||||
return $this->_request($url, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a DELETE HTTP request.
|
||||
*
|
||||
* @param string $path URI to request
|
||||
* @param array $params Optional query string parameters
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_request()
|
||||
*/
|
||||
function delete($path, $params = array(), $curlOptions = array()) {
|
||||
$url = $this->_buildUrl($path, $params);
|
||||
$options = array(CURLOPT_CUSTOMREQUEST => 'DELETE');
|
||||
$options += $curlOptions;
|
||||
|
||||
return $this->_request($url, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download track.
|
||||
*
|
||||
* @param integer $trackId
|
||||
* @param array Optional query string parameters
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
* @see Soundcloud::_request()
|
||||
*/
|
||||
function download($trackId, $params = array(), $curlOptions = array()) {
|
||||
$lastResponseFormat = array_pop(
|
||||
preg_split('/\//', $this->getResponseFormat())
|
||||
);
|
||||
$defaultParams = array('oauth_token' => $this->getAccessToken());
|
||||
$defaultCurlOptions = array(
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
self::CURLOPT_OAUTH_TOKEN => false
|
||||
);
|
||||
$url = $this->_buildUrl(
|
||||
'tracks/' . $trackId . '/download',
|
||||
array_merge($defaultParams, $params)
|
||||
);
|
||||
$options = $defaultCurlOptions + $curlOptions;
|
||||
|
||||
$this->setResponseFormat('*');
|
||||
|
||||
$response = $this->_request($url, $options);
|
||||
|
||||
// rollback to the previously defined response format.
|
||||
$this->setResponseFormat($lastResponseFormat);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct default HTTP headers including response format and authorization.
|
||||
*
|
||||
* @param boolean Include access token or not
|
||||
*
|
||||
* @return array $headers
|
||||
*/
|
||||
protected function _buildDefaultHeaders($includeAccessToken = true) {
|
||||
$headers = array();
|
||||
|
||||
if ($this->_responseFormat) {
|
||||
array_push($headers, 'Accept: ' . $this->_responseFormat);
|
||||
}
|
||||
|
||||
if ($includeAccessToken && $this->_accessToken) {
|
||||
array_push($headers, 'Authorization: OAuth ' . $this->_accessToken);
|
||||
}
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a URL.
|
||||
*
|
||||
* @param string $path Relative or absolute URI
|
||||
* @param array $params Optional query string parameters
|
||||
* @param boolean $includeVersion Include API version
|
||||
*
|
||||
* @return string $url
|
||||
*/
|
||||
protected function _buildUrl($path, $params = null, $includeVersion = true) {
|
||||
if (preg_match('/^https?\:\/\//', $path)) {
|
||||
$url = $path;
|
||||
} else {
|
||||
$url = 'https://';
|
||||
$url .= (!preg_match('/connect/', $path)) ? 'api.' : '';
|
||||
$url .= ($this->_development)
|
||||
? self::$_domains['development']
|
||||
: self::$_domains['production'];
|
||||
$url .= '/';
|
||||
$url .= ($includeVersion) ? 'v' . self::$_apiVersion . '/' : '';
|
||||
$url .= $path;
|
||||
}
|
||||
|
||||
$url .= (count($params)) ? '?' . http_build_query($params) : '';
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve access token.
|
||||
*
|
||||
* @param array $postData Post data
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function _getAccessToken($postData, $curlOptions = array()) {
|
||||
$options = array(CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData);
|
||||
$options += $curlOptions;
|
||||
$response = json_decode(
|
||||
$this->_request($this->getAccessTokenUrl(), $options),
|
||||
true
|
||||
);
|
||||
|
||||
if (array_key_exists('access_token', $response)) {
|
||||
$this->_accessToken = $response['access_token'];
|
||||
|
||||
return $response;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTTP user agent.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function _getUserAgent() {
|
||||
return self::$_userAgent . '/' . $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse HTTP response headers.
|
||||
*
|
||||
* @param string $headers
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _parseHttpHeaders($headers) {
|
||||
$headers = preg_split('/\n/', trim($headers));
|
||||
$parsedHeaders = array();
|
||||
|
||||
foreach ($headers as $header) {
|
||||
if (!preg_match('/\:\s/', $header)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
list($key, $val) = preg_split('/\:\s/', $header, 2);
|
||||
$key = str_replace('-', '_', strtolower($key));
|
||||
$val = trim($val);
|
||||
|
||||
$parsedHeaders[$key] = $val;
|
||||
}
|
||||
|
||||
return $parsedHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates HTTP response code.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function _validResponseCode($code) {
|
||||
return (bool)preg_match('/^20[0-9]{1}$/', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the actual HTTP request using curl. Can be overwritten by extending classes.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param string $url
|
||||
* @param array $curlOptions Optional cURL options
|
||||
*
|
||||
* @throws Services_Soundcloud_Invalid_Http_Response_Code_Exception if the response code isn't valid
|
||||
* @return mixed
|
||||
*/
|
||||
protected function _request($url, $curlOptions = array()) {
|
||||
$ch = curl_init();
|
||||
$options = array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_HEADER => true,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_USERAGENT => $this->_getUserAgent()
|
||||
);
|
||||
$options += $curlOptions;
|
||||
|
||||
if (array_key_exists(self::CURLOPT_OAUTH_TOKEN, $options)) {
|
||||
$includeAccessToken = $options[self::CURLOPT_OAUTH_TOKEN];
|
||||
unset($options[self::CURLOPT_OAUTH_TOKEN]);
|
||||
} else {
|
||||
$includeAccessToken = true;
|
||||
}
|
||||
|
||||
if (array_key_exists(CURLOPT_HTTPHEADER, $options)) {
|
||||
$options[CURLOPT_HTTPHEADER] = array_merge(
|
||||
$this->_buildDefaultHeaders(),
|
||||
$curlOptions[CURLOPT_HTTPHEADER]
|
||||
);
|
||||
} else {
|
||||
$options[CURLOPT_HTTPHEADER] = $this->_buildDefaultHeaders($includeAccessToken);
|
||||
}
|
||||
|
||||
curl_setopt_array($ch, $options);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
$info = curl_getinfo($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
$this->_lastHttpResponseHeaders = $this->_parseHttpHeaders(
|
||||
substr($data, 0, $info['header_size'])
|
||||
);
|
||||
$this->_lastHttpResponseBody = substr($data, $info['header_size']);
|
||||
$this->_lastHttpResponseCode = $info['http_code'];
|
||||
|
||||
if ($this->_validResponseCode($this->_lastHttpResponseCode)) {
|
||||
return $this->_lastHttpResponseBody;
|
||||
} else {
|
||||
throw new Services_Soundcloud_Invalid_Http_Response_Code_Exception(
|
||||
null,
|
||||
0,
|
||||
$this->_lastHttpResponseBody,
|
||||
$this->_lastHttpResponseCode
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
/**
|
||||
* Soundcloud missing client id exception.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Missing_Client_Id_Exception extends Exception {
|
||||
|
||||
/**
|
||||
* Default message.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $message = 'All requests must include a consumer key. Referred to as client_id in OAuth2.';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Soundcloud invalid HTTP response code exception.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Invalid_Http_Response_Code_Exception extends Exception {
|
||||
|
||||
/**
|
||||
* HTTP response body.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $httpBody;
|
||||
|
||||
/**
|
||||
* HTTP response code.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $httpCode;
|
||||
|
||||
/**
|
||||
* Default message.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $message = 'The requested URL responded with HTTP code %d.';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $code
|
||||
* @param string $httpBody
|
||||
* @param integer $httpCode
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function __construct($message = null, $code = 0, $httpBody = null, $httpCode = 0) {
|
||||
$this->httpBody = $httpBody;
|
||||
$this->httpCode = $httpCode;
|
||||
$message = sprintf($this->message, $httpCode);
|
||||
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTTP response body.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getHttpBody() {
|
||||
return $this->httpBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HTTP response code.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getHttpCode() {
|
||||
return $this->httpCode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Soundcloud unsupported response format exception.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Unsupported_Response_Format_Exception extends Exception {
|
||||
|
||||
/**
|
||||
* Default message.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $message = 'The given response format is unsupported.';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Soundcloud unsupported audio format exception.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Unsupported_Audio_Format_Exception extends Exception {
|
||||
|
||||
/**
|
||||
* Default message.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $message = 'The given audio format is unsupported.';
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Soundcloud package version.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Version {
|
||||
|
||||
const MAJOR = 2;
|
||||
const MINOR = 1;
|
||||
const PATCH = 1;
|
||||
|
||||
public static function get() {
|
||||
return implode('.', array(self::MAJOR, self::MINOR, self::PATCH));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,310 @@
|
|||
<?php
|
||||
require_once 'Soundcloud_Test_Helper.php';
|
||||
|
||||
class Soundcloud_Test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
protected $soundcloud;
|
||||
|
||||
function setUp() {
|
||||
$this->soundcloud = new Services_Soundcloud_Expose(
|
||||
'1337',
|
||||
'1337',
|
||||
'http://soundcloud.local/callback'
|
||||
);
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
$this->soundcloud = null;
|
||||
}
|
||||
|
||||
function testVersionFormat() {
|
||||
$this->assertRegExp(
|
||||
'/^[0-9]+\.[0-9]+\.[0-9]+$/',
|
||||
Services_Soundcloud_Version::get()
|
||||
);
|
||||
}
|
||||
|
||||
function testGetUserAgent() {
|
||||
$this->assertRegExp(
|
||||
'/^PHP\-SoundCloud\/[0-9]+\.[0-9]+\.[0-9]+$/',
|
||||
$this->soundcloud->getUserAgent()
|
||||
);
|
||||
}
|
||||
|
||||
function testApiVersion() {
|
||||
$this->assertEquals(1, $this->soundcloud->getApiVersion());
|
||||
}
|
||||
|
||||
function testGetAudioMimeTypes() {
|
||||
$supportedExtensions = array(
|
||||
'aac' => 'video/mp4',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'flac' => 'audio/flac',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'ogg' => 'audio/ogg',
|
||||
'wav' => 'audio/x-wav'
|
||||
);
|
||||
$unsupportedExtensions = array('gif', 'html', 'jpg', 'mp4', 'xml', 'xspf');
|
||||
|
||||
foreach ($supportedExtensions as $extension => $mimeType) {
|
||||
$this->assertEquals(
|
||||
$mimeType,
|
||||
$this->soundcloud->getAudioMimeType($extension)
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($unsupportedExtensions as $extension => $mimeType) {
|
||||
$this->setExpectedException('Services_Soundcloud_Unsupported_Audio_Format_Exception');
|
||||
|
||||
$this->soundcloud->getAudioMimeType($extension);
|
||||
}
|
||||
}
|
||||
|
||||
function testGetAuthorizeUrl() {
|
||||
$this->assertEquals(
|
||||
'https://soundcloud.com/connect?client_id=1337&redirect_uri=http%3A%2F%2Fsoundcloud.local%2Fcallback&response_type=code',
|
||||
$this->soundcloud->getAuthorizeUrl()
|
||||
);
|
||||
}
|
||||
|
||||
function testGetAuthorizeUrlWithCustomQueryParameters() {
|
||||
$this->assertEquals(
|
||||
'https://soundcloud.com/connect?client_id=1337&redirect_uri=http%3A%2F%2Fsoundcloud.local%2Fcallback&response_type=code&foo=bar',
|
||||
$this->soundcloud->getAuthorizeUrl(array('foo' => 'bar'))
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'https://soundcloud.com/connect?client_id=1337&redirect_uri=http%3A%2F%2Fsoundcloud.local%2Fcallback&response_type=code&foo=bar&bar=foo',
|
||||
$this->soundcloud->getAuthorizeUrl(array('foo' => 'bar', 'bar' => 'foo'))
|
||||
);
|
||||
}
|
||||
|
||||
function testGetAccessTokenUrl() {
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/oauth2/token',
|
||||
$this->soundcloud->getAccessTokenUrl()
|
||||
);
|
||||
}
|
||||
|
||||
function testSetAccessToken() {
|
||||
$this->soundcloud->setAccessToken('1337');
|
||||
|
||||
$this->assertEquals('1337', $this->soundcloud->getAccessToken());
|
||||
}
|
||||
|
||||
function testSetDevelopment() {
|
||||
$this->soundcloud->setDevelopment(true);
|
||||
|
||||
$this->assertTrue($this->soundcloud->getDevelopment());
|
||||
}
|
||||
|
||||
function testSetRedirectUri() {
|
||||
$this->soundcloud->setRedirectUri('http://soundcloud.local/callback');
|
||||
|
||||
$this->assertEquals(
|
||||
'http://soundcloud.local/callback',
|
||||
$this->soundcloud->getRedirectUri()
|
||||
);
|
||||
}
|
||||
|
||||
function testDefaultResponseFormat() {
|
||||
$this->assertEquals(
|
||||
'application/json',
|
||||
$this->soundcloud->getResponseFormat()
|
||||
);
|
||||
}
|
||||
|
||||
function testSetResponseFormatHtml() {
|
||||
$this->setExpectedException('Services_Soundcloud_Unsupported_Response_Format_Exception');
|
||||
|
||||
$this->soundcloud->setResponseFormat('html');
|
||||
}
|
||||
|
||||
function testSetResponseFormatAll() {
|
||||
$this->soundcloud->setResponseFormat('*');
|
||||
|
||||
$this->assertEquals(
|
||||
'*/*',
|
||||
$this->soundcloud->getResponseFormat()
|
||||
);
|
||||
}
|
||||
|
||||
function testSetResponseFormatJson() {
|
||||
$this->soundcloud->setResponseFormat('json');
|
||||
|
||||
$this->assertEquals(
|
||||
'application/json',
|
||||
$this->soundcloud->getResponseFormat()
|
||||
);
|
||||
}
|
||||
|
||||
function testSetResponseFormatXml() {
|
||||
$this->soundcloud->setResponseFormat('xml');
|
||||
|
||||
$this->assertEquals(
|
||||
'application/xml',
|
||||
$this->soundcloud->getResponseFormat()
|
||||
);
|
||||
}
|
||||
|
||||
function testResponseCodeSuccess() {
|
||||
$this->assertTrue($this->soundcloud->validResponseCode(200));
|
||||
}
|
||||
|
||||
function testResponseCodeRedirect() {
|
||||
$this->assertFalse($this->soundcloud->validResponseCode(301));
|
||||
}
|
||||
|
||||
function testResponseCodeClientError() {
|
||||
$this->assertFalse($this->soundcloud->validResponseCode(400));
|
||||
}
|
||||
|
||||
function testResponseCodeServerError() {
|
||||
$this->assertFalse($this->soundcloud->validResponseCode(500));
|
||||
}
|
||||
|
||||
function testBuildDefaultHeaders() {
|
||||
$this->assertEquals(
|
||||
array('Accept: application/json'),
|
||||
$this->soundcloud->buildDefaultHeaders()
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildDefaultHeadersWithAccessToken() {
|
||||
$this->soundcloud->setAccessToken('1337');
|
||||
|
||||
$this->assertEquals(
|
||||
array('Accept: application/json', 'Authorization: OAuth 1337'),
|
||||
$this->soundcloud->buildDefaultHeaders()
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildUrl() {
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/v1/me',
|
||||
$this->soundcloud->buildUrl('me')
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildUrlWithQueryParameters() {
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/v1/tracks?q=rofl+dubstep',
|
||||
$this->soundcloud->buildUrl(
|
||||
'tracks',
|
||||
array('q' => 'rofl dubstep')
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/v1/tracks?q=rofl+dubstep&filter=public',
|
||||
$this->soundcloud->buildUrl(
|
||||
'tracks',
|
||||
array('q' => 'rofl dubstep', 'filter' => 'public')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildUrlWithDevelopmentDomain() {
|
||||
$this->soundcloud->setDevelopment(true);
|
||||
|
||||
$this->assertEquals(
|
||||
'https://api.sandbox-soundcloud.com/v1/me',
|
||||
$this->soundcloud->buildUrl('me')
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildUrlWithoutApiVersion() {
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/me',
|
||||
$this->soundcloud->buildUrl('me', null, false)
|
||||
);
|
||||
}
|
||||
|
||||
function testBuildUrlWithAbsoluteUrl() {
|
||||
$this->assertEquals(
|
||||
'https://api.soundcloud.com/me',
|
||||
$this->soundcloud->buildUrl('https://api.soundcloud.com/me')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProviderHttpHeaders
|
||||
*/
|
||||
function testParseHttpHeaders($rawHeaders, $expectedHeaders) {
|
||||
$parsedHeaders = $this->soundcloud->parseHttpHeaders($rawHeaders);
|
||||
|
||||
foreach ($parsedHeaders as $key => $val) {
|
||||
$this->assertEquals($val, $expectedHeaders[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
function testSoundcloudMissingConsumerKeyException() {
|
||||
$this->setExpectedException('Services_Soundcloud_Missing_Client_Id_Exception');
|
||||
|
||||
$soundcloud = new Services_Soundcloud('', '');
|
||||
}
|
||||
|
||||
function testSoundcloudInvalidHttpResponseCodeException() {
|
||||
$this->setExpectedException('Services_Soundcloud_Invalid_Http_Response_Code_Exception');
|
||||
|
||||
$this->soundcloud->get('me');
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataProviderSoundcloudInvalidHttpResponseCode
|
||||
*/
|
||||
function testSoundcloudInvalidHttpResponseCode($expectedHeaders) {
|
||||
try {
|
||||
$this->soundcloud->get('me');
|
||||
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
$this->assertEquals(
|
||||
'{"error":"401 - Unauthorized"}',
|
||||
$e->getHttpBody()
|
||||
);
|
||||
|
||||
$this->assertEquals(401, $e->getHttpCode());
|
||||
|
||||
foreach ($expectedHeaders as $key => $val) {
|
||||
$this->assertEquals(
|
||||
$val,
|
||||
$this->soundcloud->getHttpHeader($key)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function dataProviderHttpHeaders() {
|
||||
$rawHeaders = <<<HEADERS
|
||||
HTTP/1.1 200 OK
|
||||
Date: Wed, 17 Nov 2010 15:39:52 GMT
|
||||
Cache-Control: public
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Encoding: gzip
|
||||
Server: foobar
|
||||
Content-Length: 1337
|
||||
HEADERS;
|
||||
$expectedHeaders = array(
|
||||
'date' => 'Wed, 17 Nov 2010 15:39:52 GMT',
|
||||
'cache_control' => 'public',
|
||||
'content_type' => 'text/html; charset=utf-8',
|
||||
'content_encoding' => 'gzip',
|
||||
'server' => 'foobar',
|
||||
'content_length' => '1337'
|
||||
);
|
||||
|
||||
return array(array($rawHeaders, $expectedHeaders));
|
||||
}
|
||||
|
||||
static function dataProviderSoundcloudInvalidHttpResponseCode() {
|
||||
$expectedHeaders = array(
|
||||
'server' => 'nginx',
|
||||
'content_type' => 'application/json; charset=utf-8',
|
||||
'connection' => 'keep-alive',
|
||||
'cache_control' => 'no-cache',
|
||||
'content_length' => '30'
|
||||
);
|
||||
|
||||
return array(array($expectedHeaders));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
set_include_path(
|
||||
get_include_path()
|
||||
. PATH_SEPARATOR
|
||||
. realpath(dirname(__FILE__) . '/../')
|
||||
);
|
||||
|
||||
require_once 'Services/Soundcloud.php';
|
||||
|
||||
/**
|
||||
* Extended class of the Soundcloud class in order to expose protected methods
|
||||
* for testing.
|
||||
*
|
||||
* @category Services
|
||||
* @package Services_Soundcloud
|
||||
* @author Anton Lindqvist <anton@qvister.se>
|
||||
* @copyright 2010 Anton Lindqvist <anton@qvister.se>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://github.com/mptre/php-soundcloud
|
||||
*/
|
||||
class Services_Soundcloud_Expose extends Services_Soundcloud {
|
||||
|
||||
/**
|
||||
* Class constructor. See parent constructor for further reference.
|
||||
*
|
||||
* @param string $clientId Application client id
|
||||
* @param string $clientSecret Application client secret
|
||||
* @param string $redirectUri Application redirect uri
|
||||
* @param boolean $development Sandbox mode
|
||||
*
|
||||
* @return void
|
||||
* @see Soundcloud
|
||||
*/
|
||||
function __construct($clientId, $clientSecret, $redirectUri = null, $development = false) {
|
||||
parent::__construct($clientId, $clientSecret, $redirectUri, $development);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct default http headers including response format and authorization.
|
||||
*
|
||||
* @return array
|
||||
* @see Soundcloud::_buildDefaultHeaders()
|
||||
*/
|
||||
function buildDefaultHeaders() {
|
||||
return $this->_buildDefaultHeaders();
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a url.
|
||||
*
|
||||
* @param string $path Relative or absolute uri
|
||||
* @param array $params Optional query string parameters
|
||||
* @param boolean $includeVersion Include the api version
|
||||
*
|
||||
* @return string
|
||||
* @see Soundcloud::_buildUrl()
|
||||
*/
|
||||
function buildUrl($path, $params = null, $includeVersion = true) {
|
||||
return $this->_buildUrl($path, $params, $includeVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get http user agent.
|
||||
*
|
||||
* @return string
|
||||
* @see Soundcloud::_getUserAgent()
|
||||
*/
|
||||
function getUserAgent() {
|
||||
return $this->_getUserAgent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse HTTP response headers.
|
||||
*
|
||||
* @param string $headers
|
||||
*
|
||||
* @return array
|
||||
* @see Soundcloud::_parseHttpHeaders()
|
||||
*/
|
||||
function parseHttpHeaders($headers) {
|
||||
return $this->_parseHttpHeaders($headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates http response code.
|
||||
*
|
||||
* @return boolean
|
||||
* @see Soundcloud::_validResponseCode()
|
||||
*/
|
||||
function validResponseCode($code) {
|
||||
return $this->_validResponseCode($code);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
# Hostname
|
||||
base_url = 'http://campcaster.dev/'
|
||||
|
||||
# URL to get the version number of the server API
|
||||
show_schedule_url = 'Recorder/get-show-schedule/format/json'
|
||||
|
||||
# base path to store recordered shows at
|
||||
base_recorded_files = '/home/naomi/Music/'
|
|
@ -0,0 +1,118 @@
|
|||
#!/usr/local/bin/python
|
||||
import urllib
|
||||
import logging
|
||||
import json
|
||||
import time
|
||||
import datetime
|
||||
|
||||
from eci import *
|
||||
from configobj import ConfigObj
|
||||
import subprocess
|
||||
|
||||
# loading config file
|
||||
try:
|
||||
config = ConfigObj('config.cfg')
|
||||
except Exception, e:
|
||||
print 'Error loading config file: ', e
|
||||
sys.exit()
|
||||
|
||||
shows_to_record = {}
|
||||
|
||||
|
||||
def record_show(filelength, filename, filetype="mp3"):
|
||||
|
||||
length = str(filelength)+".0"
|
||||
filename = filename.replace(" ", "-")
|
||||
filepath = "%s%s.%s" % (config["base_recorded_files"], filename, filetype)
|
||||
|
||||
e = ECI()
|
||||
|
||||
e("cs-add play_chainsetup")
|
||||
e("c-add 1st_chain")
|
||||
e("ai-add alsa")
|
||||
e("ao-add "+filepath)
|
||||
e("cs-set-length "+length)
|
||||
e("cop-select 1")
|
||||
e("cs-connect")
|
||||
e("start")
|
||||
|
||||
while 1:
|
||||
time.sleep(1)
|
||||
|
||||
if e("engine-status") != "running":
|
||||
break
|
||||
|
||||
e("stop")
|
||||
e("cs-disconnect")
|
||||
|
||||
return filepath
|
||||
|
||||
|
||||
def getDateTimeObj(time):
|
||||
|
||||
timeinfo = time.split(" ")
|
||||
date = timeinfo[0].split("-")
|
||||
time = timeinfo[1].split(":")
|
||||
|
||||
return datetime.datetime(int(date[0]), int(date[1]), int(date[2]), int(time[0]), int(time[1]), int(time[2]))
|
||||
|
||||
def process_shows(shows):
|
||||
|
||||
for show in shows:
|
||||
show_starts = getDateTimeObj(show[u'starts'])
|
||||
show_end = getDateTimeObj(show[u'ends'])
|
||||
time_delta = show_end - show_starts
|
||||
|
||||
shows_to_record[show[u'starts']] = time_delta
|
||||
|
||||
|
||||
def check_record():
|
||||
|
||||
tnow = datetime.datetime.now()
|
||||
sorted_show_keys = sorted(shows_to_record.keys())
|
||||
start_time = sorted_show_keys[0]
|
||||
next_show = getDateTimeObj(start_time)
|
||||
|
||||
#print tnow, next_show
|
||||
|
||||
#tnow = getDateTimeObj("2011-03-04 16:00:00")
|
||||
#next_show = getDateTimeObj("2011-03-04 16:00:01")
|
||||
|
||||
delta = next_show - tnow
|
||||
|
||||
if delta <= datetime.timedelta(seconds=60):
|
||||
time.sleep(delta.seconds)
|
||||
|
||||
show_length = shows_to_record[start_time]
|
||||
filepath = record_show(show_length.seconds, start_time)
|
||||
#filepath = record_show(10, "2011-03-04 16:00:00")
|
||||
|
||||
command = "%s -c %s" %("../../utils/airtime-import", filepath)
|
||||
subprocess.call([command],shell=True)
|
||||
|
||||
|
||||
def get_shows():
|
||||
|
||||
url = config["base_url"] + config["show_schedule_url"]
|
||||
#url = url.replace("%%from%%", "2011-03-13 20:00:00")
|
||||
#url = url.replace("%%to%%", "2011-04-17 21:00:00")
|
||||
|
||||
response = urllib.urlopen(url)
|
||||
data = response.read()
|
||||
response_json = json.loads(data)
|
||||
shows = response_json[u'shows']
|
||||
print shows
|
||||
|
||||
if len(shows):
|
||||
process_shows(shows)
|
||||
check_record()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
while True:
|
||||
get_shows()
|
||||
time.sleep(30)
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
import webbrowser
|
||||
import scapi
|
||||
|
||||
# the host to connect to. Normally, this
|
||||
# would be api.soundcloud.com
|
||||
API_HOST = "api.soundcloud.com"
|
||||
|
||||
# This needs to be the consumer ID you got from
|
||||
# http://soundcloud.com/settings/applications/new
|
||||
CONSUMER = "2CLCxcSXYzx7QhhPVHN4A"
|
||||
# This needs to be the consumer secret password you got from
|
||||
# http://soundcloud.com/settings/applications/new
|
||||
CONSUMER_SECRET = "pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs"
|
||||
|
||||
# first, we create an OAuthAuthenticator that only knows about consumer
|
||||
# credentials. This is done so that we can get an request-token as
|
||||
# first step.
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
None,
|
||||
None)
|
||||
|
||||
# The connector works with the authenticator to create and sign the requests. It
|
||||
# has some helper-methods that allow us to do the OAuth-dance.
|
||||
connector = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator)
|
||||
|
||||
# First step is to get a request-token, and to let the user authorize that
|
||||
# via the browser.
|
||||
token, secret = connector.fetch_request_token()
|
||||
authorization_url = connector.get_request_token_authorization_url(token)
|
||||
webbrowser.open(authorization_url)
|
||||
oauth_verifier = raw_input("please enter verifier code as seen in the browser:")
|
||||
|
||||
# Now we create a new authenticator with the temporary token & secret we got from
|
||||
# the request-token. This will give us the access-token
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
token,
|
||||
secret)
|
||||
|
||||
# we need a new connector with the new authenticator!
|
||||
connector = scapi.ApiConnector(API_HOST, authenticator=oauth_authenticator)
|
||||
token, secret = connector.fetch_access_token(oauth_verifier)
|
||||
|
||||
|
||||
# now we are finally ready to go - with all four parameters OAuth requires,
|
||||
# we can setup an authenticator that allows for actual API-calls.
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
token,
|
||||
secret)
|
||||
|
||||
# we pass the connector to a Scope - a Scope is essentially a path in the REST-url-space.
|
||||
# Without any path-component, it's the root from which we can then query into the
|
||||
# resources.
|
||||
root = scapi.Scope(scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator))
|
||||
|
||||
# Hey, nice meeting you! Connected to SoundCloud using OAuth will allow you to access protected resources, like the current user's name.
|
||||
print "Hello, %s" % root.me().username
|
|
@ -0,0 +1,5 @@
|
|||
Authors
|
||||
-------
|
||||
|
||||
Diez B. Roggisch, deets@web.de
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
2009-09-10 Diez Roggisch <deets@web.de>
|
||||
|
||||
* OAuth 1.0a working
|
||||
* Query-Parameters for GET-requests to allow e.g. filtering
|
||||
* Setting file-objects as attributes working.
|
||||
* share to emails working.
|
||||
* groups
|
||||
* downloading/streaming private tracks
|
||||
|
|
@ -0,0 +1,458 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
|
@ -0,0 +1,45 @@
|
|||
Running tests
|
||||
=============
|
||||
|
||||
The **SCAPI** comes with a small testsuite. It can be run automatically through either setuptools_
|
||||
or nose_.
|
||||
|
||||
Configuring tests
|
||||
-----------------
|
||||
|
||||
Before you can run the tests, you need to configure them. You do this using the `test.ini` file in the
|
||||
root of python **SCAPI** workingcopy.
|
||||
|
||||
Running tests through setuptools
|
||||
--------------------------------
|
||||
|
||||
You can run the whole testsuite through setuptools_ by doing ::
|
||||
|
||||
host:~/SoundCloudAPI deets$ python setup.py test
|
||||
|
||||
Running tests through nose
|
||||
--------------------------
|
||||
|
||||
If you want a more fine-grained control over which tests to run, you can use the `nosetests`-commandline tool.
|
||||
|
||||
Then to run individual tests, you can e.g. do::
|
||||
|
||||
host:~/SoundCloudAPI deets$ nosetests -s scapi.tests.scapi_tests:SCAPITests.test_setting_permissions
|
||||
|
||||
|
||||
See the nose_-website for more options.
|
||||
|
||||
|
||||
|
||||
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
|
||||
.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
|
||||
.. _ConfigObj: http://www.voidspace.org.uk/python/configobj.html
|
||||
|
||||
|
||||
Creating the API-docs
|
||||
=====================
|
||||
|
||||
Do::
|
||||
epydoc -v --name="SoundCloud API" --html -o docs/api scapi --exclude="os|mimetypes|urllib2|exceptions|mimetools"
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import webbrowser
|
||||
import scapi
|
||||
|
||||
# the host to connect to. Normally, this
|
||||
# would be api.soundcloud.com
|
||||
API_HOST = "api.sandbox-soundcloud.com"
|
||||
|
||||
# This needs to be the consumer ID you got from
|
||||
# http://soundcloud.com/settings/applications/new
|
||||
CONSUMER = "gLnhFeUBnBCZF8a6Ngqq7w"
|
||||
# This needs to be the consumer secret password you got from
|
||||
# http://soundcloud.com/settings/applications/new
|
||||
CONSUMER_SECRET = "nbWRdG5X9xUb63l4nIeFYm3nmeVJ2v4s1ROpvRSBvU8"
|
||||
|
||||
# first, we create an OAuthAuthenticator that only knows about consumer
|
||||
# credentials. This is done so that we can get an request-token as
|
||||
# first step.
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
None,
|
||||
None)
|
||||
|
||||
# The connector works with the authenticator to create and sign the requests. It
|
||||
# has some helper-methods that allow us to do the OAuth-dance.
|
||||
connector = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator)
|
||||
|
||||
# First step is to get a request-token, and to let the user authorize that
|
||||
# via the browser.
|
||||
token, secret = connector.fetch_request_token()
|
||||
authorization_url = connector.get_request_token_authorization_url(token)
|
||||
webbrowser.open(authorization_url)
|
||||
oauth_verifier = raw_input("please enter verifier code as seen in the browser:")
|
||||
|
||||
# Now we create a new authenticator with the temporary token & secret we got from
|
||||
# the request-token. This will give us the access-token
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
token,
|
||||
secret)
|
||||
|
||||
# we need a new connector with the new authenticator!
|
||||
connector = scapi.ApiConnector(API_HOST, authenticator=oauth_authenticator)
|
||||
token, secret = connector.fetch_access_token(oauth_verifier)
|
||||
|
||||
# now we are finally ready to go - with all four parameters OAuth requires,
|
||||
# we can setup an authenticator that allows for actual API-calls.
|
||||
oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
CONSUMER_SECRET,
|
||||
token,
|
||||
secret)
|
||||
|
||||
# we pass the connector to a Scope - a Scope is essentiall a path in the REST-url-space.
|
||||
# Without any path-component, it's the root from which we can then query into the
|
||||
# resources.
|
||||
root = scapi.Scope(scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator))
|
||||
|
||||
# Hey, nice meeting you!
|
||||
print "Hello, %s" % root.me().username
|
|
@ -0,0 +1,333 @@
|
|||
scapi scapi-module.html
|
||||
scapi.escape scapi.util-module.html#escape
|
||||
scapi.USE_PROXY scapi-module.html#USE_PROXY
|
||||
scapi.REQUEST_TOKEN_URL scapi-module.html#REQUEST_TOKEN_URL
|
||||
scapi.PROXY scapi-module.html#PROXY
|
||||
scapi.ACCESS_TOKEN_URL scapi-module.html#ACCESS_TOKEN_URL
|
||||
scapi.register_classes scapi-module.html#register_classes
|
||||
scapi.logger scapi-module.html#logger
|
||||
scapi.AUTHORIZATION_URL scapi-module.html#AUTHORIZATION_URL
|
||||
scapi.authentication scapi.authentication-module.html
|
||||
scapi.authentication.USE_DOUBLE_ESCAPE_HACK scapi.authentication-module.html#USE_DOUBLE_ESCAPE_HACK
|
||||
scapi.authentication.escape scapi.util-module.html#escape
|
||||
scapi.authentication.logger scapi.authentication-module.html#logger
|
||||
scapi.config scapi.config-module.html
|
||||
scapi.json scapi.json-module.html
|
||||
scapi.json.read scapi.json-module.html#read
|
||||
scapi.json.write scapi.json-module.html#write
|
||||
scapi.multidict scapi.multidict-module.html
|
||||
scapi.tests scapi.tests-module.html
|
||||
scapi.tests.scapi_tests scapi.tests.scapi_tests-module.html
|
||||
scapi.tests.scapi_tests.api_logger scapi.tests.scapi_tests-module.html#api_logger
|
||||
scapi.tests.scapi_tests.logger scapi.tests.scapi_tests-module.html#logger
|
||||
scapi.tests.test_connect scapi.tests.test_connect-module.html
|
||||
scapi.tests.test_connect.test_me_having_stress scapi.tests.test_connect-module.html#test_me_having_stress
|
||||
scapi.tests.test_connect.test_scoped_track_creation scapi.tests.test_connect-module.html#test_scoped_track_creation
|
||||
scapi.tests.test_connect.test_permissions scapi.tests.test_connect-module.html#test_permissions
|
||||
scapi.tests.test_connect.CONSUMER_SECRET scapi.tests.test_connect-module.html#CONSUMER_SECRET
|
||||
scapi.tests.test_connect.CONSUMER scapi.tests.test_connect-module.html#CONSUMER
|
||||
scapi.tests.test_connect.load_config scapi.tests.test_connect-module.html#load_config
|
||||
scapi.tests.test_connect.test_upload scapi.tests.test_connect-module.html#test_upload
|
||||
scapi.tests.test_connect.USER scapi.tests.test_connect-module.html#USER
|
||||
scapi.tests.test_connect.test_load_config scapi.tests.test_connect-module.html#test_load_config
|
||||
scapi.tests.test_connect.test_access_token_acquisition scapi.tests.test_connect-module.html#test_access_token_acquisition
|
||||
scapi.tests.test_connect.test_track_creation scapi.tests.test_connect-module.html#test_track_creation
|
||||
scapi.tests.test_connect.test_setting_comments scapi.tests.test_connect-module.html#test_setting_comments
|
||||
scapi.tests.test_connect.test_track_update scapi.tests.test_connect-module.html#test_track_update
|
||||
scapi.tests.test_connect.SECRET scapi.tests.test_connect-module.html#SECRET
|
||||
scapi.tests.test_connect.test_contact_add_and_removal scapi.tests.test_connect-module.html#test_contact_add_and_removal
|
||||
scapi.tests.test_connect.logger scapi.tests.test_connect-module.html#logger
|
||||
scapi.tests.test_connect.test_connect scapi.tests.test_connect-module.html#test_connect
|
||||
scapi.tests.test_connect.ROOT scapi.tests.test_connect-module.html#ROOT
|
||||
scapi.tests.test_connect.test_contact_list scapi.tests.test_connect-module.html#test_contact_list
|
||||
scapi.tests.test_connect.test_playlists scapi.tests.test_connect-module.html#test_playlists
|
||||
scapi.tests.test_connect.API_HOST scapi.tests.test_connect-module.html#API_HOST
|
||||
scapi.tests.test_connect._logger scapi.tests.test_connect-module.html#_logger
|
||||
scapi.tests.test_connect.TOKEN scapi.tests.test_connect-module.html#TOKEN
|
||||
scapi.tests.test_connect.test_events scapi.tests.test_connect-module.html#test_events
|
||||
scapi.tests.test_connect.test_non_global_api scapi.tests.test_connect-module.html#test_non_global_api
|
||||
scapi.tests.test_connect.test_setting_permissions scapi.tests.test_connect-module.html#test_setting_permissions
|
||||
scapi.tests.test_connect.PASSWORD scapi.tests.test_connect-module.html#PASSWORD
|
||||
scapi.tests.test_connect.test_setting_comments_the_way_shawn_says_its_correct scapi.tests.test_connect-module.html#test_setting_comments_the_way_shawn_says_its_correct
|
||||
scapi.tests.test_connect.test_large_list scapi.tests.test_connect-module.html#test_large_list
|
||||
scapi.tests.test_connect.CONNECTOR scapi.tests.test_connect-module.html#CONNECTOR
|
||||
scapi.tests.test_connect.CONFIG_NAME scapi.tests.test_connect-module.html#CONFIG_NAME
|
||||
scapi.tests.test_connect.RUN_INTERACTIVE_TESTS scapi.tests.test_connect-module.html#RUN_INTERACTIVE_TESTS
|
||||
scapi.tests.test_connect.setup scapi.tests.test_connect-module.html#setup
|
||||
scapi.tests.test_connect.test_favorites scapi.tests.test_connect-module.html#test_favorites
|
||||
scapi.tests.test_connect.USE_OAUTH scapi.tests.test_connect-module.html#USE_OAUTH
|
||||
scapi.tests.test_oauth scapi.tests.test_oauth-module.html
|
||||
scapi.tests.test_oauth._logger scapi.tests.test_oauth-module.html#_logger
|
||||
scapi.tests.test_oauth.test_oauth_connect scapi.tests.test_oauth-module.html#test_oauth_connect
|
||||
scapi.tests.test_oauth.TOKEN scapi.tests.test_oauth-module.html#TOKEN
|
||||
scapi.tests.test_oauth.test_base64_connect scapi.tests.test_oauth-module.html#test_base64_connect
|
||||
scapi.tests.test_oauth.CONSUMER_SECRET scapi.tests.test_oauth-module.html#CONSUMER_SECRET
|
||||
scapi.tests.test_oauth.SECRET scapi.tests.test_oauth-module.html#SECRET
|
||||
scapi.tests.test_oauth.logger scapi.tests.test_oauth-module.html#logger
|
||||
scapi.tests.test_oauth.CONSUMER scapi.tests.test_oauth-module.html#CONSUMER
|
||||
scapi.util scapi.util-module.html
|
||||
scapi.util.escape scapi.util-module.html#escape
|
||||
exceptions.AssertionError exceptions.AssertionError-class.html
|
||||
exceptions.AssertionError.__init__ exceptions.AssertionError-class.html#__init__
|
||||
exceptions.AssertionError.__new__ exceptions.AssertionError-class.html#__new__
|
||||
scapi.ApiConnector scapi.ApiConnector-class.html
|
||||
scapi.ApiConnector.fetch_access_token scapi.ApiConnector-class.html#fetch_access_token
|
||||
scapi.ApiConnector.LIST_LIMIT scapi.ApiConnector-class.html#LIST_LIMIT
|
||||
scapi.ApiConnector.LIST_LIMIT_PARAMETER scapi.ApiConnector-class.html#LIST_LIMIT_PARAMETER
|
||||
scapi.ApiConnector.fetch_request_token scapi.ApiConnector-class.html#fetch_request_token
|
||||
scapi.ApiConnector.get_request_token_authorization_url scapi.ApiConnector-class.html#get_request_token_authorization_url
|
||||
scapi.ApiConnector.normalize_method scapi.ApiConnector-class.html#normalize_method
|
||||
scapi.ApiConnector.__init__ scapi.ApiConnector-class.html#__init__
|
||||
scapi.ApiConnector.LIST_OFFSET_PARAMETER scapi.ApiConnector-class.html#LIST_OFFSET_PARAMETER
|
||||
scapi.Comment scapi.Comment-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.Comment.KIND scapi.Comment-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.RESTBase.ALIASES scapi.RESTBase-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.Event scapi.Event-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.Event.KIND scapi.Event-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.RESTBase.ALIASES scapi.RESTBase-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.Group scapi.Group-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.Group.KIND scapi.Group-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.RESTBase.ALIASES scapi.RESTBase-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.InvalidMethodException scapi.InvalidMethodException-class.html
|
||||
scapi.InvalidMethodException.__repr__ scapi.InvalidMethodException-class.html#__repr__
|
||||
scapi.InvalidMethodException.__init__ scapi.InvalidMethodException-class.html#__init__
|
||||
scapi.NoResultFromRequest scapi.NoResultFromRequest-class.html
|
||||
scapi.Playlist scapi.Playlist-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.Playlist.KIND scapi.Playlist-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.RESTBase.ALIASES scapi.RESTBase-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.RESTBase scapi.RESTBase-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.RESTBase.ALIASES scapi.RESTBase-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.KIND scapi.RESTBase-class.html#KIND
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.SCRedirectHandler scapi.SCRedirectHandler-class.html
|
||||
scapi.SCRedirectHandler.alternate_method scapi.SCRedirectHandler-class.html#alternate_method
|
||||
scapi.SCRedirectHandler.http_error_303 scapi.SCRedirectHandler-class.html#http_error_303
|
||||
scapi.SCRedirectHandler.http_error_201 scapi.SCRedirectHandler-class.html#http_error_201
|
||||
scapi.Scope scapi.Scope-class.html
|
||||
scapi.Scope.oauth_sign_get_request scapi.Scope-class.html#oauth_sign_get_request
|
||||
scapi.Scope._map scapi.Scope-class.html#_map
|
||||
scapi.Scope.__str__ scapi.Scope-class.html#__str__
|
||||
scapi.Scope.__getattr__ scapi.Scope-class.html#__getattr__
|
||||
scapi.Scope._call scapi.Scope-class.html#_call
|
||||
scapi.Scope._create_query_string scapi.Scope-class.html#_create_query_string
|
||||
scapi.Scope._create_request scapi.Scope-class.html#_create_request
|
||||
scapi.Scope._get_connector scapi.Scope-class.html#_get_connector
|
||||
scapi.Scope.__init__ scapi.Scope-class.html#__init__
|
||||
scapi.Scope.__repr__ scapi.Scope-class.html#__repr__
|
||||
scapi.Track scapi.Track-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.Track.KIND scapi.Track-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.Track.ALIASES scapi.Track-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.UnknownContentType scapi.UnknownContentType-class.html
|
||||
scapi.UnknownContentType.__str__ scapi.UnknownContentType-class.html#__str__
|
||||
scapi.UnknownContentType.__repr__ scapi.UnknownContentType-class.html#__repr__
|
||||
scapi.UnknownContentType.__init__ scapi.UnknownContentType-class.html#__init__
|
||||
scapi.User scapi.User-class.html
|
||||
scapi.RESTBase._scope scapi.RESTBase-class.html#_scope
|
||||
scapi.RESTBase.__init__ scapi.RESTBase-class.html#__init__
|
||||
scapi.User.KIND scapi.User-class.html#KIND
|
||||
scapi.RESTBase.create scapi.RESTBase-class.html#create
|
||||
scapi.RESTBase._as_arguments scapi.RESTBase-class.html#_as_arguments
|
||||
scapi.RESTBase.__getattr__ scapi.RESTBase-class.html#__getattr__
|
||||
scapi.RESTBase.ALL_DOMAIN_CLASSES scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES
|
||||
scapi.RESTBase.new scapi.RESTBase-class.html#new
|
||||
scapi.User.ALIASES scapi.User-class.html#ALIASES
|
||||
scapi.RESTBase.__ne__ scapi.RESTBase-class.html#__ne__
|
||||
scapi.RESTBase.get scapi.RESTBase-class.html#get
|
||||
scapi.RESTBase._convert_value scapi.RESTBase-class.html#_convert_value
|
||||
scapi.RESTBase.__setattr__ scapi.RESTBase-class.html#__setattr__
|
||||
scapi.RESTBase._singleton scapi.RESTBase-class.html#_singleton
|
||||
scapi.RESTBase.REGISTRY scapi.RESTBase-class.html#REGISTRY
|
||||
scapi.RESTBase.__eq__ scapi.RESTBase-class.html#__eq__
|
||||
scapi.RESTBase.__repr__ scapi.RESTBase-class.html#__repr__
|
||||
scapi.RESTBase.__hash__ scapi.RESTBase-class.html#__hash__
|
||||
scapi.authentication.BasicAuthenticator scapi.authentication.BasicAuthenticator-class.html
|
||||
scapi.authentication.BasicAuthenticator.augment_request scapi.authentication.BasicAuthenticator-class.html#augment_request
|
||||
scapi.authentication.BasicAuthenticator.__init__ scapi.authentication.BasicAuthenticator-class.html#__init__
|
||||
scapi.authentication.OAuthAuthenticator scapi.authentication.OAuthAuthenticator-class.html
|
||||
scapi.authentication.OAuthAuthenticator.augment_request scapi.authentication.OAuthAuthenticator-class.html#augment_request
|
||||
scapi.authentication.OAuthAuthenticator.generate_nonce scapi.authentication.OAuthAuthenticator-class.html#generate_nonce
|
||||
scapi.authentication.OAuthAuthenticator.OAUTH_API_VERSION scapi.authentication.OAuthAuthenticator-class.html#OAUTH_API_VERSION
|
||||
scapi.authentication.OAuthAuthenticator.generate_timestamp scapi.authentication.OAuthAuthenticator-class.html#generate_timestamp
|
||||
scapi.authentication.OAuthAuthenticator.AUTHORIZATION_HEADER scapi.authentication.OAuthAuthenticator-class.html#AUTHORIZATION_HEADER
|
||||
scapi.authentication.OAuthAuthenticator.__init__ scapi.authentication.OAuthAuthenticator-class.html#__init__
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1 scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.FORBIDDEN scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#FORBIDDEN
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_name scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_name
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_method
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_url
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_parameters
|
||||
scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.build_signature scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#build_signature
|
||||
scapi.json.JsonReader scapi.json.JsonReader-class.html
|
||||
scapi.json.JsonReader.escapes scapi.json.JsonReader-class.html#escapes
|
||||
scapi.json.JsonReader._readObject scapi.json.JsonReader-class.html#_readObject
|
||||
scapi.json.JsonReader._assertNext scapi.json.JsonReader-class.html#_assertNext
|
||||
scapi.json.JsonReader._readNumber scapi.json.JsonReader-class.html#_readNumber
|
||||
scapi.json.JsonReader._peek scapi.json.JsonReader-class.html#_peek
|
||||
scapi.json.JsonReader._readNull scapi.json.JsonReader-class.html#_readNull
|
||||
scapi.json.JsonReader._hexDigitToInt scapi.json.JsonReader-class.html#_hexDigitToInt
|
||||
scapi.json.JsonReader._readTrue scapi.json.JsonReader-class.html#_readTrue
|
||||
scapi.json.JsonReader._readDoubleSolidusComment scapi.json.JsonReader-class.html#_readDoubleSolidusComment
|
||||
scapi.json.JsonReader.read scapi.json.JsonReader-class.html#read
|
||||
scapi.json.JsonReader._readFalse scapi.json.JsonReader-class.html#_readFalse
|
||||
scapi.json.JsonReader.hex_digits scapi.json.JsonReader-class.html#hex_digits
|
||||
scapi.json.JsonReader._readComment scapi.json.JsonReader-class.html#_readComment
|
||||
scapi.json.JsonReader._readArray scapi.json.JsonReader-class.html#_readArray
|
||||
scapi.json.JsonReader._eatWhitespace scapi.json.JsonReader-class.html#_eatWhitespace
|
||||
scapi.json.JsonReader._read scapi.json.JsonReader-class.html#_read
|
||||
scapi.json.JsonReader._readString scapi.json.JsonReader-class.html#_readString
|
||||
scapi.json.JsonReader._readCStyleComment scapi.json.JsonReader-class.html#_readCStyleComment
|
||||
scapi.json.JsonReader._next scapi.json.JsonReader-class.html#_next
|
||||
scapi.json.JsonWriter scapi.json.JsonWriter-class.html
|
||||
scapi.json.JsonWriter.write scapi.json.JsonWriter-class.html#write
|
||||
scapi.json.JsonWriter._append scapi.json.JsonWriter-class.html#_append
|
||||
scapi.json.JsonWriter._write scapi.json.JsonWriter-class.html#_write
|
||||
scapi.json.ReadException scapi.json.ReadException-class.html
|
||||
scapi.json.WriteException scapi.json.WriteException-class.html
|
||||
scapi.json._StringGenerator scapi.json._StringGenerator-class.html
|
||||
scapi.json._StringGenerator.peek scapi.json._StringGenerator-class.html#peek
|
||||
scapi.json._StringGenerator.all scapi.json._StringGenerator-class.html#all
|
||||
scapi.json._StringGenerator.next scapi.json._StringGenerator-class.html#next
|
||||
scapi.json._StringGenerator.__init__ scapi.json._StringGenerator-class.html#__init__
|
||||
scapi.tests.scapi_tests.SCAPITests scapi.tests.scapi_tests.SCAPITests-class.html
|
||||
scapi.tests.scapi_tests.SCAPITests._load_config scapi.tests.scapi_tests.SCAPITests-class.html#_load_config
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_creation_with_artwork scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_artwork
|
||||
scapi.tests.scapi_tests.SCAPITests.test_upload scapi.tests.scapi_tests.SCAPITests-class.html#test_upload
|
||||
scapi.tests.scapi_tests.SCAPITests.test_scoped_track_creation scapi.tests.scapi_tests.SCAPITests-class.html#test_scoped_track_creation
|
||||
scapi.tests.scapi_tests.SCAPITests.test_permissions scapi.tests.scapi_tests.SCAPITests-class.html#test_permissions
|
||||
scapi.tests.scapi_tests.SCAPITests.CONSUMER_SECRET scapi.tests.scapi_tests.SCAPITests-class.html#CONSUMER_SECRET
|
||||
scapi.tests.scapi_tests.SCAPITests.CONSUMER scapi.tests.scapi_tests.SCAPITests-class.html#CONSUMER
|
||||
scapi.tests.scapi_tests.SCAPITests.test_me_having_stress scapi.tests.scapi_tests.SCAPITests-class.html#test_me_having_stress
|
||||
scapi.tests.scapi_tests.SCAPITests.USER scapi.tests.scapi_tests.SCAPITests-class.html#USER
|
||||
scapi.tests.scapi_tests.SCAPITests.CONFIGSPEC scapi.tests.scapi_tests.SCAPITests-class.html#CONFIGSPEC
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_creation_with_email_sharers scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_email_sharers
|
||||
scapi.tests.scapi_tests.SCAPITests.test_setting_comments scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_comments
|
||||
scapi.tests.scapi_tests.SCAPITests.test_access_token_acquisition scapi.tests.scapi_tests.SCAPITests-class.html#test_access_token_acquisition
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_creation scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation
|
||||
scapi.tests.scapi_tests.SCAPITests.test_groups scapi.tests.scapi_tests.SCAPITests-class.html#test_groups
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_update scapi.tests.scapi_tests.SCAPITests-class.html#test_track_update
|
||||
scapi.tests.scapi_tests.SCAPITests.test_modifying_playlists scapi.tests.scapi_tests.SCAPITests-class.html#test_modifying_playlists
|
||||
scapi.tests.scapi_tests.SCAPITests.SECRET scapi.tests.scapi_tests.SCAPITests-class.html#SECRET
|
||||
scapi.tests.scapi_tests.SCAPITests.test_oauth_get_signing scapi.tests.scapi_tests.SCAPITests-class.html#test_oauth_get_signing
|
||||
scapi.tests.scapi_tests.SCAPITests.test_contact_add_and_removal scapi.tests.scapi_tests.SCAPITests-class.html#test_contact_add_and_removal
|
||||
scapi.tests.scapi_tests.SCAPITests.test_connect scapi.tests.scapi_tests.SCAPITests-class.html#test_connect
|
||||
scapi.tests.scapi_tests.SCAPITests.test_large_list scapi.tests.scapi_tests.SCAPITests-class.html#test_large_list
|
||||
unittest.TestCase.failureException exceptions.AssertionError-class.html
|
||||
scapi.tests.scapi_tests.SCAPITests.test_contact_list scapi.tests.scapi_tests.SCAPITests-class.html#test_contact_list
|
||||
scapi.tests.scapi_tests.SCAPITests.test_playlists scapi.tests.scapi_tests.SCAPITests-class.html#test_playlists
|
||||
scapi.tests.scapi_tests.SCAPITests.API_HOST scapi.tests.scapi_tests.SCAPITests-class.html#API_HOST
|
||||
scapi.tests.scapi_tests.SCAPITests.setUp scapi.tests.scapi_tests.SCAPITests-class.html#setUp
|
||||
scapi.tests.scapi_tests.SCAPITests.test_downloadable scapi.tests.scapi_tests.SCAPITests-class.html#test_downloadable
|
||||
scapi.tests.scapi_tests.SCAPITests.TOKEN scapi.tests.scapi_tests.SCAPITests-class.html#TOKEN
|
||||
scapi.tests.scapi_tests.SCAPITests.test_events scapi.tests.scapi_tests.SCAPITests-class.html#test_events
|
||||
scapi.tests.scapi_tests.SCAPITests.test_non_global_api scapi.tests.scapi_tests.SCAPITests-class.html#test_non_global_api
|
||||
scapi.tests.scapi_tests.SCAPITests.PASSWORD scapi.tests.scapi_tests.SCAPITests-class.html#PASSWORD
|
||||
scapi.tests.scapi_tests.SCAPITests.test_setting_comments_the_way_shawn_says_its_correct scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_comments_the_way_shawn_says_its_correct
|
||||
scapi.tests.scapi_tests.SCAPITests.CONFIG_NAME scapi.tests.scapi_tests.SCAPITests-class.html#CONFIG_NAME
|
||||
scapi.tests.scapi_tests.SCAPITests.test_setting_permissions scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_permissions
|
||||
scapi.tests.scapi_tests.SCAPITests.RUN_INTERACTIVE_TESTS scapi.tests.scapi_tests.SCAPITests-class.html#RUN_INTERACTIVE_TESTS
|
||||
scapi.tests.scapi_tests.SCAPITests.test_favorites scapi.tests.scapi_tests.SCAPITests-class.html#test_favorites
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_creation_with_updated_artwork scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_updated_artwork
|
||||
scapi.tests.scapi_tests.SCAPITests.AUTHENTICATOR scapi.tests.scapi_tests.SCAPITests-class.html#AUTHENTICATOR
|
||||
scapi.tests.scapi_tests.SCAPITests.test_streaming scapi.tests.scapi_tests.SCAPITests-class.html#test_streaming
|
||||
scapi.tests.scapi_tests.SCAPITests.test_playlist_creation scapi.tests.scapi_tests.SCAPITests-class.html#test_playlist_creation
|
||||
scapi.tests.scapi_tests.SCAPITests.test_track_deletion scapi.tests.scapi_tests.SCAPITests-class.html#test_track_deletion
|
||||
scapi.tests.scapi_tests.SCAPITests.test_filtered_list scapi.tests.scapi_tests.SCAPITests-class.html#test_filtered_list
|
||||
scapi.tests.scapi_tests.SCAPITests.root scapi.tests.scapi_tests.SCAPITests-class.html#root
|
||||
scapi.util.MultiDict scapi.util.MultiDict-class.html
|
||||
scapi.util.MultiDict.add scapi.util.MultiDict-class.html#add
|
||||
scapi.util.MultiDict.iteritemslist scapi.util.MultiDict-class.html#iteritemslist
|
|
@ -0,0 +1,216 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="class-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Class Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink">urllib2.BaseHandler</strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink">urllib2.HTTPRedirectHandler</strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.SCRedirectHandler-class.html" onclick="show_private();">scapi.SCRedirectHandler</a></strong>:
|
||||
<em class="summary">A urllib2-Handler to deal with the redirects the RESTful API of SC
|
||||
uses.</em>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink">object</strong>:
|
||||
<em class="summary">The most base type</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.ApiConnector-class.html" onclick="show_private();">scapi.ApiConnector</a></strong>:
|
||||
<em class="summary">The ApiConnector holds all the data necessary to authenticate
|
||||
against the soundcloud-api.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink">exceptions.BaseException</strong>:
|
||||
<em class="summary">Common base class for all exceptions</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink">exceptions.Exception</strong>:
|
||||
<em class="summary">Common base class for all non-exit exceptions.</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.InvalidMethodException-class.html" onclick="show_private();">scapi.InvalidMethodException</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.NoResultFromRequest-class.html" onclick="show_private();">scapi.NoResultFromRequest</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json.ReadException-class.html">scapi.json.ReadException</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink">exceptions.StandardError</strong>:
|
||||
<em class="summary">Base class for all standard Python exceptions that do not represent
|
||||
interpreter exiting.</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="exceptions.AssertionError-class.html">exceptions.AssertionError</a></strong>:
|
||||
<em class="summary">Assertion failed.</em>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.UnknownContentType-class.html" onclick="show_private();">scapi.UnknownContentType</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json.WriteException-class.html">scapi.json.WriteException</a></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.authentication.BasicAuthenticator-class.html">scapi.authentication.BasicAuthenticator</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json.JsonReader-class.html">scapi.json.JsonReader</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json.JsonWriter-class.html">scapi.json.JsonWriter</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.authentication.OAuthAuthenticator-class.html">scapi.authentication.OAuthAuthenticator</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">scapi.authentication.OAuthSignatureMethod_HMAC_SHA1</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.RESTBase-class.html" onclick="show_private();">scapi.RESTBase</a></strong>:
|
||||
<em class="summary">The baseclass for all our domain-objects/resources.</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.Comment-class.html">scapi.Comment</a></strong>:
|
||||
<em class="summary">A comment domain object/resource.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.Event-class.html">scapi.Event</a></strong>:
|
||||
<em class="summary">A event domain object/resource.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.Group-class.html">scapi.Group</a></strong>:
|
||||
<em class="summary">A group domain object/resource</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.Playlist-class.html">scapi.Playlist</a></strong>:
|
||||
<em class="summary">A playlist/set domain object/resource</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.Track-class.html">scapi.Track</a></strong>:
|
||||
<em class="summary">A track domain object/resource.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.User-class.html">scapi.User</a></strong>:
|
||||
<em class="summary">A user domain object/resource.</em>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.Scope-class.html" onclick="show_private();">scapi.Scope</a></strong>:
|
||||
<em class="summary">The basic means to query and create resources.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink">unittest.TestCase</strong>:
|
||||
<em class="summary">A class whose instances are single test cases.</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.scapi_tests.SCAPITests-class.html">scapi.tests.scapi_tests.SCAPITests</a></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json._StringGenerator-class.html" onclick="show_private();">scapi.json._StringGenerator</a></strong>
|
||||
</li>
|
||||
<li> <strong class="uidlink">dict</strong>:
|
||||
<em class="summary">dict() -> new empty dictionary.</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.util.MultiDict-class.html">scapi.util.MultiDict</a></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 340 B |
|
@ -0,0 +1,322 @@
|
|||
|
||||
|
||||
/* Epydoc CSS Stylesheet
|
||||
*
|
||||
* This stylesheet can be used to customize the appearance of epydoc's
|
||||
* HTML output.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default Colors & Styles
|
||||
* - Set the default foreground & background color with 'body'; and
|
||||
* link colors with 'a:link' and 'a:visited'.
|
||||
* - Use bold for decision list terms.
|
||||
* - The heading styles defined here are used for headings *within*
|
||||
* docstring descriptions. All headings used by epydoc itself use
|
||||
* either class='epydoc' or class='toc' (CSS styles for both
|
||||
* defined below).
|
||||
*/
|
||||
body { background: #ffffff; color: #000000; }
|
||||
p { margin-top: 0.5em; margin-bottom: 0.5em; }
|
||||
a:link { color: #0000ff; }
|
||||
a:visited { color: #204080; }
|
||||
dt { font-weight: bold; }
|
||||
h1 { font-size: +140%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h2 { font-size: +125%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h3 { font-size: +110%; font-style: italic;
|
||||
font-weight: normal; }
|
||||
code { font-size: 100%; }
|
||||
/* N.B.: class, not pseudoclass */
|
||||
a.link { font-family: monospace; }
|
||||
|
||||
/* Page Header & Footer
|
||||
* - The standard page header consists of a navigation bar (with
|
||||
* pointers to standard pages such as 'home' and 'trees'); a
|
||||
* breadcrumbs list, which can be used to navigate to containing
|
||||
* classes or modules; options links, to show/hide private
|
||||
* variables and to show/hide frames; and a page title (using
|
||||
* <h1>). The page title may be followed by a link to the
|
||||
* corresponding source code (using 'span.codelink').
|
||||
* - The footer consists of a navigation bar, a timestamp, and a
|
||||
* pointer to epydoc's homepage.
|
||||
*/
|
||||
h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
|
||||
h2.epydoc { font-size: +130%; font-weight: bold; }
|
||||
h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-top: 0.2em; }
|
||||
td h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-bottom: 0; }
|
||||
table.navbar { background: #a0c0ff; color: #000000;
|
||||
border: 2px groove #c0d0d0; }
|
||||
table.navbar table { color: #000000; }
|
||||
th.navbar-select { background: #70b0ff;
|
||||
color: #000000; }
|
||||
table.navbar a { text-decoration: none; }
|
||||
table.navbar a:link { color: #0000ff; }
|
||||
table.navbar a:visited { color: #204080; }
|
||||
span.breadcrumbs { font-size: 85%; font-weight: bold; }
|
||||
span.options { font-size: 70%; }
|
||||
span.codelink { font-size: 85%; }
|
||||
td.footer { font-size: 85%; }
|
||||
|
||||
/* Table Headers
|
||||
* - Each summary table and details section begins with a 'header'
|
||||
* row. This row contains a section title (marked by
|
||||
* 'span.table-header') as well as a show/hide private link
|
||||
* (marked by 'span.options', defined above).
|
||||
* - Summary tables that contain user-defined groups mark those
|
||||
* groups using 'group header' rows.
|
||||
*/
|
||||
td.table-header { background: #70b0ff; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.table-header table { color: #000000; }
|
||||
td.table-header table a:link { color: #0000ff; }
|
||||
td.table-header table a:visited { color: #204080; }
|
||||
span.table-header { font-size: 120%; font-weight: bold; }
|
||||
th.group-header { background: #c0e0f8; color: #000000;
|
||||
text-align: left; font-style: italic;
|
||||
font-size: 115%;
|
||||
border: 1px solid #608090; }
|
||||
|
||||
/* Summary Tables (functions, variables, etc)
|
||||
* - Each object is described by a single row of the table with
|
||||
* two cells. The left cell gives the object's type, and is
|
||||
* marked with 'code.summary-type'. The right cell gives the
|
||||
* object's name and a summary description.
|
||||
* - CSS styles for the table's header and group headers are
|
||||
* defined above, under 'Table Headers'
|
||||
*/
|
||||
table.summary { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin-bottom: 0.5em; }
|
||||
td.summary { border: 1px solid #608090; }
|
||||
code.summary-type { font-size: 85%; }
|
||||
table.summary a:link { color: #0000ff; }
|
||||
table.summary a:visited { color: #204080; }
|
||||
|
||||
|
||||
/* Details Tables (functions, variables, etc)
|
||||
* - Each object is described in its own div.
|
||||
* - A single-row summary table w/ table-header is used as
|
||||
* a header for each details section (CSS style for table-header
|
||||
* is defined above, under 'Table Headers').
|
||||
*/
|
||||
table.details { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
table.details table { color: #000000; }
|
||||
table.details a:link { color: #0000ff; }
|
||||
table.details a:visited { color: #204080; }
|
||||
|
||||
/* Fields */
|
||||
dl.fields { margin-left: 2em; margin-top: 1em;
|
||||
margin-bottom: 1em; }
|
||||
dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
|
||||
dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
|
||||
div.fields { margin-left: 2em; }
|
||||
div.fields p { margin-bottom: 0.5em; }
|
||||
|
||||
/* Index tables (identifier index, term index, etc)
|
||||
* - link-index is used for indices containing lists of links
|
||||
* (namely, the identifier index & term index).
|
||||
* - index-where is used in link indices for the text indicating
|
||||
* the container/source for each link.
|
||||
* - metadata-index is used for indices containing metadata
|
||||
* extracted from fields (namely, the bug index & todo index).
|
||||
*/
|
||||
table.link-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.link-index { border-width: 0px; }
|
||||
table.link-index a:link { color: #0000ff; }
|
||||
table.link-index a:visited { color: #204080; }
|
||||
span.index-where { font-size: 70%; }
|
||||
table.metadata-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
td.metadata-index { border-width: 1px; border-style: solid; }
|
||||
table.metadata-index a:link { color: #0000ff; }
|
||||
table.metadata-index a:visited { color: #204080; }
|
||||
|
||||
/* Function signatures
|
||||
* - sig* is used for the signature in the details section.
|
||||
* - .summary-sig* is used for the signature in the summary
|
||||
* table, and when listing property accessor functions.
|
||||
* */
|
||||
.sig-name { color: #006080; }
|
||||
.sig-arg { color: #008060; }
|
||||
.sig-default { color: #602000; }
|
||||
.summary-sig { font-family: monospace; }
|
||||
.summary-sig-name { color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:link
|
||||
{ color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:visited
|
||||
{ color: #006080; font-weight: bold; }
|
||||
.summary-sig-arg { color: #006040; }
|
||||
.summary-sig-default { color: #501800; }
|
||||
|
||||
/* Subclass list
|
||||
*/
|
||||
ul.subclass-list { display: inline; }
|
||||
ul.subclass-list li { display: inline; }
|
||||
|
||||
/* To render variables, classes etc. like functions */
|
||||
table.summary .summary-name { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:link { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:visited { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
|
||||
/* Variable values
|
||||
* - In the 'variable details' sections, each varaible's value is
|
||||
* listed in a 'pre.variable' box. The width of this box is
|
||||
* restricted to 80 chars; if the value's repr is longer than
|
||||
* this it will be wrapped, using a backslash marked with
|
||||
* class 'variable-linewrap'. If the value's repr is longer
|
||||
* than 3 lines, the rest will be ellided; and an ellipsis
|
||||
* marker ('...' marked with 'variable-ellipsis') will be used.
|
||||
* - If the value is a string, its quote marks will be marked
|
||||
* with 'variable-quote'.
|
||||
* - If the variable is a regexp, it is syntax-highlighted using
|
||||
* the re* CSS classes.
|
||||
*/
|
||||
pre.variable { padding: .5em; margin: 0;
|
||||
background: #dce4ec; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
.variable-linewrap { color: #604000; font-weight: bold; }
|
||||
.variable-ellipsis { color: #604000; font-weight: bold; }
|
||||
.variable-quote { color: #604000; font-weight: bold; }
|
||||
.variable-group { color: #008000; font-weight: bold; }
|
||||
.variable-op { color: #604000; font-weight: bold; }
|
||||
.variable-string { color: #006030; }
|
||||
.variable-unknown { color: #a00000; font-weight: bold; }
|
||||
.re { color: #000000; }
|
||||
.re-char { color: #006030; }
|
||||
.re-op { color: #600000; }
|
||||
.re-group { color: #003060; }
|
||||
.re-ref { color: #404040; }
|
||||
|
||||
/* Base tree
|
||||
* - Used by class pages to display the base class hierarchy.
|
||||
*/
|
||||
pre.base-tree { font-size: 80%; margin: 0; }
|
||||
|
||||
/* Frames-based table of contents headers
|
||||
* - Consists of two frames: one for selecting modules; and
|
||||
* the other listing the contents of the selected module.
|
||||
* - h1.toc is used for each frame's heading
|
||||
* - h2.toc is used for subheadings within each frame.
|
||||
*/
|
||||
h1.toc { text-align: center; font-size: 105%;
|
||||
margin: 0; font-weight: bold;
|
||||
padding: 0; }
|
||||
h2.toc { font-size: 100%; font-weight: bold;
|
||||
margin: 0.5em 0 0 -0.3em; }
|
||||
|
||||
/* Syntax Highlighting for Source Code
|
||||
* - doctest examples are displayed in a 'pre.py-doctest' block.
|
||||
* If the example is in a details table entry, then it will use
|
||||
* the colors specified by the 'table pre.py-doctest' line.
|
||||
* - Source code listings are displayed in a 'pre.py-src' block.
|
||||
* Each line is marked with 'span.py-line' (used to draw a line
|
||||
* down the left margin, separating the code from the line
|
||||
* numbers). Line numbers are displayed with 'span.py-lineno'.
|
||||
* The expand/collapse block toggle button is displayed with
|
||||
* 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
|
||||
* modify the font size of the text.)
|
||||
* - If a source code page is opened with an anchor, then the
|
||||
* corresponding code block will be highlighted. The code
|
||||
* block's header is highlighted with 'py-highlight-hdr'; and
|
||||
* the code block's body is highlighted with 'py-highlight'.
|
||||
* - The remaining py-* classes are used to perform syntax
|
||||
* highlighting (py-string for string literals, py-name for names,
|
||||
* etc.)
|
||||
*/
|
||||
pre.py-doctest { padding: .5em; margin: 1em;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
table pre.py-doctest { background: #dce4ec;
|
||||
color: #000000; }
|
||||
pre.py-src { border: 2px solid #000000;
|
||||
background: #f0f0f0; color: #000000; }
|
||||
.py-line { border-left: 2px solid #000000;
|
||||
margin-left: .2em; padding-left: .4em; }
|
||||
.py-lineno { font-style: italic; font-size: 90%;
|
||||
padding-left: .5em; }
|
||||
a.py-toggle { text-decoration: none; }
|
||||
div.py-highlight-hdr { border-top: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
background: #d8e8e8; }
|
||||
div.py-highlight { border-bottom: 2px solid #000000;
|
||||
background: #d0e0e0; }
|
||||
.py-prompt { color: #005050; font-weight: bold;}
|
||||
.py-more { color: #005050; font-weight: bold;}
|
||||
.py-string { color: #006030; }
|
||||
.py-comment { color: #003060; }
|
||||
.py-keyword { color: #600000; }
|
||||
.py-output { color: #404040; }
|
||||
.py-name { color: #000050; }
|
||||
.py-name:link { color: #000050 !important; }
|
||||
.py-name:visited { color: #000050 !important; }
|
||||
.py-number { color: #005000; }
|
||||
.py-defname { color: #000060; font-weight: bold; }
|
||||
.py-def-name { color: #000060; font-weight: bold; }
|
||||
.py-base-class { color: #000060; }
|
||||
.py-param { color: #000060; }
|
||||
.py-docstring { color: #006030; }
|
||||
.py-decorator { color: #804020; }
|
||||
/* Use this if you don't want links to names underlined: */
|
||||
/*a.py-name { text-decoration: none; }*/
|
||||
|
||||
/* Graphs & Diagrams
|
||||
* - These CSS styles are used for graphs & diagrams generated using
|
||||
* Graphviz dot. 'img.graph-without-title' is used for bare
|
||||
* diagrams (to remove the border created by making the image
|
||||
* clickable).
|
||||
*/
|
||||
img.graph-without-title { border: none; }
|
||||
img.graph-with-title { border: 1px solid #000000; }
|
||||
span.graph-title { font-weight: bold; }
|
||||
span.graph-caption { }
|
||||
|
||||
/* General-purpose classes
|
||||
* - 'p.indent-wrapped-lines' defines a paragraph whose first line
|
||||
* is not indented, but whose subsequent lines are.
|
||||
* - The 'nomargin-top' class is used to remove the top margin (e.g.
|
||||
* from lists). The 'nomargin' class is used to remove both the
|
||||
* top and bottom margin (but not the left or right margin --
|
||||
* for lists, that would cause the bullets to disappear.)
|
||||
*/
|
||||
p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
|
||||
margin: 0; }
|
||||
.nomargin-top { margin-top: 0; }
|
||||
.nomargin { margin-top: 0; margin-bottom: 0; }
|
||||
|
||||
/* HTML Log */
|
||||
div.log-block { padding: 0; margin: .5em 0 .5em 0;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffb0b0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #b0ffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
h2.log-hdr { background: #70b0ff; color: #000000;
|
||||
margin: 0; padding: 0em 0.5em 0em 0.5em;
|
||||
border-bottom: 1px solid #000000; font-size: 110%; }
|
||||
p.log { font-weight: bold; margin: .5em 0 .5em 0; }
|
||||
tr.opt-changed { color: #000000; font-weight: bold; }
|
||||
tr.opt-default { color: #606060; }
|
||||
pre.log { margin: 0; padding: 0; padding-left: 1em; }
|
|
@ -0,0 +1,293 @@
|
|||
function toggle_private() {
|
||||
// Search for any private/public links on this page. Store
|
||||
// their old text in "cmd," so we will know what action to
|
||||
// take; and change their text to the opposite action.
|
||||
var cmd = "?";
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
|
||||
"hide private":"show private");
|
||||
}
|
||||
}
|
||||
// Update all DIVs containing private objects.
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
else if (elts[i].className == "public") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
|
||||
}
|
||||
}
|
||||
// Update all table rows containing private objects. Note, we
|
||||
// use "" instead of "block" becaue IE & firefox disagree on what
|
||||
// this should be (block vs table-row), and "" just gives the
|
||||
// default for both browsers.
|
||||
var elts = document.getElementsByTagName("tr");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("li");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
|
||||
"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("ul");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
}
|
||||
// Set a cookie to remember the current option.
|
||||
document.cookie = "EpydocPrivate="+cmd;
|
||||
}
|
||||
function show_private() {
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
if (cmd && cmd.substr(0,4)=="show")
|
||||
toggle_private();
|
||||
}
|
||||
}
|
||||
}
|
||||
function getCookie(name) {
|
||||
var dc = document.cookie;
|
||||
var prefix = name + "=";
|
||||
var begin = dc.indexOf("; " + prefix);
|
||||
if (begin == -1) {
|
||||
begin = dc.indexOf(prefix);
|
||||
if (begin != 0) return null;
|
||||
} else
|
||||
{ begin += 2; }
|
||||
var end = document.cookie.indexOf(";", begin);
|
||||
if (end == -1)
|
||||
{ end = dc.length; }
|
||||
return unescape(dc.substring(begin + prefix.length, end));
|
||||
}
|
||||
function setFrame(url1, url2) {
|
||||
parent.frames[1].location.href = url1;
|
||||
parent.frames[2].location.href = url2;
|
||||
}
|
||||
function checkCookie() {
|
||||
var cmd=getCookie("EpydocPrivate");
|
||||
if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
|
||||
toggle_private();
|
||||
}
|
||||
function toggleCallGraph(id) {
|
||||
var elt = document.getElementById(id);
|
||||
if (elt.style.display == "none")
|
||||
elt.style.display = "block";
|
||||
else
|
||||
elt.style.display = "none";
|
||||
}
|
||||
function expand(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "-"; }
|
||||
}
|
||||
|
||||
function collapse(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "+"; }
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) {
|
||||
elt.style.display = "block";
|
||||
|
||||
var indent = elt.getAttribute("indent");
|
||||
var pad = elt.getAttribute("pad");
|
||||
var s = "<tt class='py-lineno'>";
|
||||
for (var i=0; i<pad.length; i++) { s += " " }
|
||||
s += "</tt>";
|
||||
s += " <tt class='py-line'>";
|
||||
for (var i=0; i<indent.length; i++) { s += " " }
|
||||
s += "<a href='#' onclick='expand(\"" + id;
|
||||
s += "\");return false'>...</a></tt><br />";
|
||||
elt.innerHTML = s;
|
||||
}
|
||||
}
|
||||
|
||||
function toggle(id) {
|
||||
elt = document.getElementById(id+"-toggle");
|
||||
if (elt.innerHTML == "-")
|
||||
collapse(id);
|
||||
else
|
||||
expand(id);
|
||||
return false;
|
||||
}
|
||||
|
||||
function highlight(id) {
|
||||
var elt = document.getElementById(id+"-def");
|
||||
if (elt) elt.className = "py-highlight-hdr";
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
}
|
||||
|
||||
function num_lines(s) {
|
||||
var n = 1;
|
||||
var pos = s.indexOf("\n");
|
||||
while ( pos > 0) {
|
||||
n += 1;
|
||||
pos = s.indexOf("\n", pos+1);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
// Collapse all blocks that mave more than `min_lines` lines.
|
||||
function collapse_all(min_lines) {
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for (var i=0; i<elts.length; i++) {
|
||||
var elt = elts[i];
|
||||
var split = elt.id.indexOf("-");
|
||||
if (split > 0)
|
||||
if (elt.id.substring(split, elt.id.length) == "-expanded")
|
||||
if (num_lines(elt.innerHTML) > min_lines)
|
||||
collapse(elt.id.substring(0, split));
|
||||
}
|
||||
}
|
||||
|
||||
function expandto(href) {
|
||||
var start = href.indexOf("#")+1;
|
||||
if (start != 0 && start != href.length) {
|
||||
if (href.substring(start, href.length) != "-") {
|
||||
collapse_all(4);
|
||||
pos = href.indexOf(".", start);
|
||||
while (pos != -1) {
|
||||
var id = href.substring(start, pos);
|
||||
expand(id);
|
||||
pos = href.indexOf(".", pos+1);
|
||||
}
|
||||
var id = href.substring(start, href.length);
|
||||
expand(id);
|
||||
highlight(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function kill_doclink(id) {
|
||||
var parent = document.getElementById(id);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
function auto_kill_doclink(ev) {
|
||||
if (!ev) var ev = window.event;
|
||||
if (!this.contains(ev.toElement)) {
|
||||
var parent = document.getElementById(this.parentID);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
}
|
||||
|
||||
function doclink(id, name, targets_id) {
|
||||
var elt = document.getElementById(id);
|
||||
|
||||
// If we already opened the box, then destroy it.
|
||||
// (This case should never occur, but leave it in just in case.)
|
||||
if (elt.childNodes.length > 1) {
|
||||
elt.removeChild(elt.childNodes.item(0));
|
||||
}
|
||||
else {
|
||||
// The outer box: relative + inline positioning.
|
||||
var box1 = document.createElement("div");
|
||||
box1.style.position = "relative";
|
||||
box1.style.display = "inline";
|
||||
box1.style.top = 0;
|
||||
box1.style.left = 0;
|
||||
|
||||
// A shadow for fun
|
||||
var shadow = document.createElement("div");
|
||||
shadow.style.position = "absolute";
|
||||
shadow.style.left = "-1.3em";
|
||||
shadow.style.top = "-1.3em";
|
||||
shadow.style.background = "#404040";
|
||||
|
||||
// The inner box: absolute positioning.
|
||||
var box2 = document.createElement("div");
|
||||
box2.style.position = "relative";
|
||||
box2.style.border = "1px solid #a0a0a0";
|
||||
box2.style.left = "-.2em";
|
||||
box2.style.top = "-.2em";
|
||||
box2.style.background = "white";
|
||||
box2.style.padding = ".3em .4em .3em .4em";
|
||||
box2.style.fontStyle = "normal";
|
||||
box2.onmouseout=auto_kill_doclink;
|
||||
box2.parentID = id;
|
||||
|
||||
// Get the targets
|
||||
var targets_elt = document.getElementById(targets_id);
|
||||
var targets = targets_elt.getAttribute("targets");
|
||||
var links = "";
|
||||
target_list = targets.split(",");
|
||||
for (var i=0; i<target_list.length; i++) {
|
||||
var target = target_list[i].split("=");
|
||||
links += "<li><a href='" + target[1] +
|
||||
"' style='text-decoration:none'>" +
|
||||
target[0] + "</a></li>";
|
||||
}
|
||||
|
||||
// Put it all together.
|
||||
elt.insertBefore(box1, elt.childNodes.item(0));
|
||||
//box1.appendChild(box2);
|
||||
box1.appendChild(shadow);
|
||||
shadow.appendChild(box2);
|
||||
box2.innerHTML =
|
||||
"Which <b>"+name+"</b> do you want to see documentation for?" +
|
||||
"<ul style='margin-bottom: 0;'>" +
|
||||
links +
|
||||
"<li><a href='#' style='text-decoration:none' " +
|
||||
"onclick='kill_doclink(\""+id+"\");return false;'>"+
|
||||
"<i>None of the above</i></a></li></ul>";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_anchor() {
|
||||
var href = location.href;
|
||||
var start = href.indexOf("#")+1;
|
||||
if ((start != 0) && (start != href.length))
|
||||
return href.substring(start, href.length);
|
||||
}
|
||||
function redirect_url(dottedName) {
|
||||
// Scan through each element of the "pages" list, and check
|
||||
// if "name" matches with any of them.
|
||||
for (var i=0; i<pages.length; i++) {
|
||||
|
||||
// Each page has the form "<pagename>-m" or "<pagename>-c";
|
||||
// extract the <pagename> portion & compare it to dottedName.
|
||||
var pagename = pages[i].substring(0, pages[i].length-2);
|
||||
if (pagename == dottedName.substring(0,pagename.length)) {
|
||||
|
||||
// We've found a page that matches `dottedName`;
|
||||
// construct its URL, using leftover `dottedName`
|
||||
// content to form an anchor.
|
||||
var pagetype = pages[i].charAt(pages[i].length-1);
|
||||
var url = pagename + ((pagetype=="m")?"-module.html":
|
||||
"-class.html");
|
||||
if (dottedName.length > pagename.length)
|
||||
url += "#" + dottedName.substring(pagename.length+1,
|
||||
dottedName.length);
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,299 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>exceptions.AssertionError</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
exceptions ::
|
||||
AssertionError ::
|
||||
Class AssertionError
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="exceptions.AssertionError-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class AssertionError</h1><p class="nomargin-top"></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
BaseException --+
|
||||
|
|
||||
Exception --+
|
||||
|
|
||||
StandardError --+
|
||||
|
|
||||
<strong class="uidshort">AssertionError</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>Assertion failed.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="exceptions.AssertionError-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">a new object with type S, a subtype of T</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="exceptions.AssertionError-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
|
||||
<span class="summary-sig-arg">S</span>,
|
||||
<span class="summary-sig-arg">...</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__new__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
|
||||
<span class="sig-arg">S</span>,
|
||||
<span class="sig-arg">...</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
|
||||
<dl class="fields">
|
||||
<dt>Returns: a new object with type S, a subtype of T</dt>
|
||||
<dt>Overrides:
|
||||
object.__new__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> SoundCloud API </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="scapi-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
|
@ -0,0 +1,278 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Help</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="help.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="epydoc"> API Documentation </h1>
|
||||
|
||||
<p> This document contains the API (Application Programming Interface)
|
||||
documentation for SoundCloud API. Documentation for the Python
|
||||
objects defined by the project is divided into separate pages for each
|
||||
package, module, and class. The API documentation also includes two
|
||||
pages containing information about the project as a whole: a trees
|
||||
page, and an index page. </p>
|
||||
|
||||
<h2> Object Documentation </h2>
|
||||
|
||||
<p>Each <strong>Package Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A description of the package. </li>
|
||||
<li> A list of the modules and sub-packages contained by the
|
||||
package. </li>
|
||||
<li> A summary of the classes defined by the package. </li>
|
||||
<li> A summary of the functions defined by the package. </li>
|
||||
<li> A summary of the variables defined by the package. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
package. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
package. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Module Documentation</strong> page contains:</p>
|
||||
<ul>
|
||||
<li> A description of the module. </li>
|
||||
<li> A summary of the classes defined by the module. </li>
|
||||
<li> A summary of the functions defined by the module. </li>
|
||||
<li> A summary of the variables defined by the module. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
module. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
module. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Class Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A class inheritance diagram. </li>
|
||||
<li> A list of known subclasses. </li>
|
||||
<li> A description of the class. </li>
|
||||
<li> A summary of the methods defined by the class. </li>
|
||||
<li> A summary of the instance variables defined by the class. </li>
|
||||
<li> A summary of the class (static) variables defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each method defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each instance variable defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each class (static) variable defined
|
||||
by the class. </li>
|
||||
</ul>
|
||||
|
||||
<h2> Project Documentation </h2>
|
||||
|
||||
<p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
|
||||
<ul>
|
||||
<li> The <em>module hierarchy</em> lists every package and module, with
|
||||
modules grouped into packages. At the top level, and within each
|
||||
package, modules and sub-packages are listed alphabetically. </li>
|
||||
<li> The <em>class hierarchy</em> lists every class, grouped by base
|
||||
class. If a class has more than one base class, then it will be
|
||||
listed under each base class. At the top level, and under each base
|
||||
class, classes are listed alphabetically. </li>
|
||||
</ul>
|
||||
|
||||
<p> The <strong>Index</strong> page contains indices of terms and
|
||||
identifiers: </p>
|
||||
<ul>
|
||||
<li> The <em>term index</em> lists every term indexed by any object's
|
||||
documentation. For each term, the index provides links to each
|
||||
place where the term is indexed. </li>
|
||||
<li> The <em>identifier index</em> lists the (short) name of every package,
|
||||
module, class, method, function, variable, and parameter. For each
|
||||
identifier, the index provides a short description, and a link to
|
||||
its documentation. </li>
|
||||
</ul>
|
||||
|
||||
<h2> The Table of Contents </h2>
|
||||
|
||||
<p> The table of contents occupies the two frames on the left side of
|
||||
the window. The upper-left frame displays the <em>project
|
||||
contents</em>, and the lower-left frame displays the <em>module
|
||||
contents</em>: </p>
|
||||
|
||||
<table class="help summary" border="1" cellspacing="0" cellpadding="3">
|
||||
<tr style="height: 30%">
|
||||
<td align="center" style="font-size: small">
|
||||
Project<br />Contents<hr />...</td>
|
||||
<td align="center" style="font-size: small" rowspan="2" width="70%">
|
||||
API<br />Documentation<br />Frame<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: small">
|
||||
Module<br />Contents<hr /> <br />...<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table><br />
|
||||
|
||||
<p> The <strong>project contents frame</strong> contains a list of all packages
|
||||
and modules that are defined by the project. Clicking on an entry
|
||||
will display its contents in the module contents frame. Clicking on a
|
||||
special entry, labeled "Everything," will display the contents of
|
||||
the entire project. </p>
|
||||
|
||||
<p> The <strong>module contents frame</strong> contains a list of every
|
||||
submodule, class, type, exception, function, and variable defined by a
|
||||
module or package. Clicking on an entry will display its
|
||||
documentation in the API documentation frame. Clicking on the name of
|
||||
the module, at the top of the frame, will display the documentation
|
||||
for the module itself. </p>
|
||||
|
||||
<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
|
||||
navigation bar can be used to control whether the table of contents is
|
||||
displayed or not. </p>
|
||||
|
||||
<h2> The Navigation Bar </h2>
|
||||
|
||||
<p> A navigation bar is located at the top and bottom of every page.
|
||||
It indicates what type of page you are currently viewing, and allows
|
||||
you to go to related pages. The following table describes the labels
|
||||
on the navigation bar. Note that not some labels (such as
|
||||
[Parent]) are not displayed on all pages. </p>
|
||||
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
|
||||
<tr class="summary">
|
||||
<th>Label</th>
|
||||
<th>Highlighted when...</th>
|
||||
<th>Links to...</th>
|
||||
</tr>
|
||||
<tr><td valign="top"><strong>[Parent]</strong></td>
|
||||
<td valign="top"><em>(never highlighted)</em></td>
|
||||
<td valign="top"> the parent of the current package </td></tr>
|
||||
<tr><td valign="top"><strong>[Package]</strong></td>
|
||||
<td valign="top">viewing a package</td>
|
||||
<td valign="top">the package containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Module]</strong></td>
|
||||
<td valign="top">viewing a module</td>
|
||||
<td valign="top">the module containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Class]</strong></td>
|
||||
<td valign="top">viewing a class </td>
|
||||
<td valign="top">the class containing the current object</td></tr>
|
||||
<tr><td valign="top"><strong>[Trees]</strong></td>
|
||||
<td valign="top">viewing the trees page</td>
|
||||
<td valign="top"> the trees page </td></tr>
|
||||
<tr><td valign="top"><strong>[Index]</strong></td>
|
||||
<td valign="top">viewing the index page</td>
|
||||
<td valign="top"> the index page </td></tr>
|
||||
<tr><td valign="top"><strong>[Help]</strong></td>
|
||||
<td valign="top">viewing the help page</td>
|
||||
<td valign="top"> the help page </td></tr>
|
||||
</table>
|
||||
|
||||
<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
|
||||
the top navigation bar can be used to control whether documentation
|
||||
for private objects is displayed. Private objects are usually defined
|
||||
as objects whose (short) names begin with a single underscore, but do
|
||||
not end with an underscore. For example, "<code>_x</code>",
|
||||
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
|
||||
are private objects; but "<code>re.sub</code>",
|
||||
"<code>__init__</code>", and "<code>type_</code>" are not. However,
|
||||
if a module defines the "<code>__all__</code>" variable, then its
|
||||
contents are used to decide which objects are private. </p>
|
||||
|
||||
<p> A timestamp below the bottom navigation bar indicates when each
|
||||
page was last updated. </p>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,892 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Identifier Index</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="identifier-index.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="bottom"><td>
|
||||
<h1 class="epydoc">Identifier Index</h1>
|
||||
</td><td>
|
||||
[
|
||||
<a href="#A">A</a>
|
||||
<a href="#B">B</a>
|
||||
<a href="#C">C</a>
|
||||
D
|
||||
<a href="#E">E</a>
|
||||
<a href="#F">F</a>
|
||||
<a href="#G">G</a>
|
||||
<a href="#H">H</a>
|
||||
<a href="#I">I</a>
|
||||
<a href="#J">J</a>
|
||||
<a href="#K">K</a>
|
||||
<a href="#L">L</a>
|
||||
<a href="#M">M</a>
|
||||
<a href="#N">N</a>
|
||||
<a href="#O">O</a>
|
||||
<a href="#P">P</a>
|
||||
Q
|
||||
<a href="#R">R</a>
|
||||
<a href="#S">S</a>
|
||||
<a href="#T">T</a>
|
||||
<a href="#U">U</a>
|
||||
V
|
||||
<a href="#W">W</a>
|
||||
X
|
||||
Y
|
||||
Z
|
||||
<a href="#_">_</a>
|
||||
]
|
||||
</td></table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#ACCESS_TOKEN_URL">ACCESS_TOKEN_URL</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.SCRedirectHandler-class.html#alternate_method">alternate_method</a><br />
|
||||
<span class="index-where">(in <a href="scapi.SCRedirectHandler-class.html" onclick="show_private();">SCRedirectHandler</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#augment_request">augment_request()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.util.MultiDict-class.html#add">add()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.util.MultiDict-class.html">MultiDict</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#API_HOST">API_HOST</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication-module.html">authentication</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#API_HOST">API_HOST</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#AUTHENTICATOR">AUTHENTICATOR</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Track-class.html#ALIASES">ALIASES</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Track-class.html">Track</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests-module.html#api_logger">api_logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#AUTHORIZATION_HEADER">AUTHORIZATION_HEADER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.User-class.html#ALIASES">ALIASES</a><br />
|
||||
<span class="index-where">(in <a href="scapi.User-class.html">User</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html">ApiConnector</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#AUTHORIZATION_URL">AUTHORIZATION_URL</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json._StringGenerator-class.html#all">all()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json._StringGenerator-class.html" onclick="show_private();">_StringGenerator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="exceptions.AssertionError-class.html">AssertionError</a></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.BasicAuthenticator-class.html#augment_request">augment_request()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.BasicAuthenticator-class.html">BasicAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="B">B</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.BasicAuthenticator-class.html">BasicAuthenticator</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#build_signature">build_signature()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Comment-class.html">Comment</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#CONNECTOR">CONNECTOR</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#CONSUMER_SECRET">CONSUMER_SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.config-module.html">config</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#CONSUMER">CONSUMER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#CONSUMER_SECRET">CONSUMER_SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#CONFIG_NAME">CONFIG_NAME</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#CONSUMER">CONSUMER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#create">create()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#CONFIG_NAME">CONFIG_NAME</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#CONSUMER">CONSUMER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#CONFIGSPEC">CONFIGSPEC</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#CONSUMER_SECRET">CONSUMER_SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.util-module.html#escape">escape()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.util-module.html" onclick="show_private();">scapi.util</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#escapes">escapes</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Event-class.html">Event</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#fetch_access_token">fetch_access_token()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#fetch_request_token">fetch_request_token()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#FORBIDDEN">FORBIDDEN</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#generate_nonce">generate_nonce()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_name">get_name()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_parameters">get_normalized_parameters()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#generate_timestamp">generate_timestamp()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_method">get_normalized_http_method()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#get_request_token_authorization_url">get_request_token_authorization_url()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#get">get()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_url">get_normalized_http_url()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Group-class.html">Group</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="H">H</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#hex_digits">hex_digits</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.SCRedirectHandler-class.html#http_error_201">http_error_201()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.SCRedirectHandler-class.html" onclick="show_private();">SCRedirectHandler</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.SCRedirectHandler-class.html#http_error_303">http_error_303()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.SCRedirectHandler-class.html" onclick="show_private();">SCRedirectHandler</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.InvalidMethodException-class.html">InvalidMethodException</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.util.MultiDict-class.html#iteritemslist">iteritemslist()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.util.MultiDict-class.html">MultiDict</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="J">J</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json-module.html">json</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html">JsonReader</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonWriter-class.html">JsonWriter</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="K">K</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Comment-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Comment-class.html">Comment</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Playlist-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Playlist-class.html">Playlist</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.User-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.User-class.html">User</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Event-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Event-class.html">Event</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Group-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Group-class.html">Group</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Track-class.html#KIND">KIND</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Track-class.html">Track</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="L">L</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#LIST_LIMIT">LIST_LIMIT</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#load_config">load_config()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests-module.html#logger">logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#LIST_LIMIT_PARAMETER">LIST_LIMIT_PARAMETER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication-module.html#logger">logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#logger">logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#LIST_OFFSET_PARAMETER">LIST_OFFSET_PARAMETER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#logger">logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#logger">logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="M">M</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.multidict-module.html">multidict</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.util.MultiDict-class.html">MultiDict</a><br />
|
||||
<span class="index-where">(in <a href="scapi.util-module.html" onclick="show_private();">scapi.util</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="N">N</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#new">new()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.NoResultFromRequest-class.html">NoResultFromRequest</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json._StringGenerator-class.html#next">next()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json._StringGenerator-class.html" onclick="show_private();">_StringGenerator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#normalize_method">normalize_method()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#OAUTH_API_VERSION">OAUTH_API_VERSION</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#oauth_sign_get_request">oauth_sign_get_request()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#PASSWORD">PASSWORD</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json._StringGenerator-class.html#peek">peek()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json._StringGenerator-class.html" onclick="show_private();">_StringGenerator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#PROXY">PROXY</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#PASSWORD">PASSWORD</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Playlist-class.html">Playlist</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#read">read()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#ROOT">ROOT</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json-module.html#read">read()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#REQUEST_TOKEN_URL">REQUEST_TOKEN_URL</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#RUN_INTERACTIVE_TESTS">RUN_INTERACTIVE_TESTS</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.ReadException-class.html">ReadException</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html">RESTBase</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#RUN_INTERACTIVE_TESTS">RUN_INTERACTIVE_TESTS</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#register_classes">register_classes()</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#root">root</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html">scapi</a></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.SCRedirectHandler-class.html">SCRedirectHandler</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#setUp">setUp()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests-module.html">scapi_tests</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests-module.html">scapi.tests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#SECRET">SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#setup">setup()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#SECRET">SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html">Scope</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#SECRET">SECRET</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_access_token_acquisition">test_access_token_acquisition()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_load_config">test_load_config()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_setting_comments_the_way_shawn_says_its_correct">test_setting_comments_the_way_shawn_says_its_correct()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_access_token_acquisition">test_access_token_acquisition()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_me_having_stress">test_me_having_stress()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_permissions">test_setting_permissions()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#test_base64_connect">test_base64_connect()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_me_having_stress">test_me_having_stress()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_setting_permissions">test_setting_permissions()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html">test_connect</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests-module.html">scapi.tests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_modifying_playlists">test_modifying_playlists()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_streaming">test_streaming()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_connect">test_connect()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_non_global_api">test_non_global_api()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation">test_track_creation()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_connect">test_connect()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_non_global_api">test_non_global_api()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_track_creation">test_track_creation()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_contact_add_and_removal">test_contact_add_and_removal()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html">test_oauth</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests-module.html">scapi.tests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_artwork">test_track_creation_with_artwork()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_contact_add_and_removal">test_contact_add_and_removal()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#test_oauth_connect">test_oauth_connect()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_email_sharers">test_track_creation_with_email_sharers()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_contact_list">test_contact_list()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_oauth_get_signing">test_oauth_get_signing()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_creation_with_updated_artwork">test_track_creation_with_updated_artwork()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_contact_list">test_contact_list()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_permissions">test_permissions()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_deletion">test_track_deletion()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_downloadable">test_downloadable()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_permissions">test_permissions()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_track_update">test_track_update()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_events">test_events()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_playlist_creation">test_playlist_creation()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_track_update">test_track_update()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_events">test_events()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_playlists">test_playlists()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_upload">test_upload()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_favorites">test_favorites()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_playlists">test_playlists()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_upload">test_upload()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_favorites">test_favorites()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_scoped_track_creation">test_scoped_track_creation()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests-module.html">tests</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_filtered_list">test_filtered_list()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_scoped_track_creation">test_scoped_track_creation()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#TOKEN">TOKEN</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_groups">test_groups()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_comments">test_setting_comments()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#TOKEN">TOKEN</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_large_list">test_large_list()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_setting_comments">test_setting_comments()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#TOKEN">TOKEN</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#test_large_list">test_large_list()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#test_setting_comments_the_way_shawn_says_its_correct">test_setting_comments_the_way_shawn_says_its_correct()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Track-class.html">Track</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.UnknownContentType-class.html">UnknownContentType</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi-module.html#USE_PROXY">USE_PROXY</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#USER">USER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication-module.html#USE_DOUBLE_ESCAPE_HACK">USE_DOUBLE_ESCAPE_HACK</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.User-class.html">User</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.util-module.html">util</a><br />
|
||||
<span class="index-where">(in <a href="scapi-module.html">scapi</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#USE_OAUTH">USE_OAUTH</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#USER">USER</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="W">W</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonWriter-class.html#write">write()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonWriter-class.html">JsonWriter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json-module.html#write">write()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.WriteException-class.html">WriteException</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__eq__">__eq__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__setattr__">__setattr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_next">_next()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#__str__">__str__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_peek">_peek()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.UnknownContentType-class.html#__str__">__str__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.UnknownContentType-class.html" onclick="show_private();">UnknownContentType</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_read">_read()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__hash__">__hash__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonWriter-class.html#_append">_append()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonWriter-class.html">JsonWriter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readArray">_readArray()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.ApiConnector-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.ApiConnector-class.html" onclick="show_private();">ApiConnector</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#_as_arguments">_as_arguments()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readComment">_readComment()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.InvalidMethodException-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.InvalidMethodException-class.html" onclick="show_private();">InvalidMethodException</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_assertNext">_assertNext()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readCStyleComment">_readCStyleComment()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#_call">_call()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readDoubleSolidusComment">_readDoubleSolidusComment()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#_convert_value">_convert_value()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readFalse">_readFalse()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.UnknownContentType-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.UnknownContentType-class.html" onclick="show_private();">UnknownContentType</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#_create_query_string">_create_query_string()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readNull">_readNull()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.BasicAuthenticator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.BasicAuthenticator-class.html">BasicAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#_create_request">_create_request()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readNumber">_readNumber()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.authentication.OAuthAuthenticator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_eatWhitespace">_eatWhitespace()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readObject">_readObject()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.json._StringGenerator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json._StringGenerator-class.html" onclick="show_private();">_StringGenerator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#_get_connector">_get_connector()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readString">_readString()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__ne__">__ne__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_hexDigitToInt">_hexDigitToInt()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonReader-class.html#_readTrue">_readTrue()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonReader-class.html">JsonReader</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.InvalidMethodException-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.InvalidMethodException-class.html" onclick="show_private();">InvalidMethodException</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.scapi_tests.SCAPITests-class.html#_load_config">_load_config()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.scapi_tests.SCAPITests-class.html">SCAPITests</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#_scope">_scope()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_connect-module.html#_logger">_logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.RESTBase-class.html#_singleton">_singleton()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.tests.test_oauth-module.html#_logger">_logger</a><br />
|
||||
<span class="index-where">(in <a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json._StringGenerator-class.html">_StringGenerator</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json-module.html">scapi.json</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="scapi.UnknownContentType-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.UnknownContentType-class.html" onclick="show_private();">UnknownContentType</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.Scope-class.html#_map">_map()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.Scope-class.html" onclick="show_private();">Scope</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="scapi.json.JsonWriter-class.html#_write">_write()</a><br />
|
||||
<span class="index-where">(in <a href="scapi.json.JsonWriter-class.html">JsonWriter</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> SoundCloud API </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="scapi-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="module-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Module Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink"><a href="scapi-module.html">scapi</a></strong>
|
||||
<ul>
|
||||
<li class="private"> <strong class="uidlink"><a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.config-module.html">scapi.config</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json-module.html">scapi.json</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.multidict-module.html">scapi.multidict</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests-module.html">scapi.tests</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="private"> <strong class="uidlink"><a href="scapi.util-module.html" onclick="show_private();">scapi.util</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<html><head><title>Epydoc Redirect Page</title>
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var pages = ["scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-c", "scapi.authentication.BasicAuthenticator-c", "scapi.authentication.OAuthAuthenticator-c", "scapi.tests.scapi_tests.SCAPITests-c", "scapi.InvalidMethodException-c", "scapi.json._StringGenerator-c", "exceptions.AssertionError-c", "scapi.NoResultFromRequest-c", "scapi.json.WriteException-c", "scapi.tests.test_connect-m", "scapi.UnknownContentType-c", "scapi.json.ReadException-c", "scapi.tests.scapi_tests-m", "scapi.SCRedirectHandler-c", "scapi.tests.test_oauth-m", "scapi.json.JsonReader-c", "scapi.json.JsonWriter-c", "scapi.authentication-m", "scapi.util.MultiDict-c", "scapi.ApiConnector-c", "scapi.multidict-m", "scapi.Playlist-c", "scapi.RESTBase-c", "scapi.Comment-c", "scapi.config-m", "scapi.tests-m", "scapi.Event-c", "scapi.Group-c", "scapi.Scope-c", "scapi.Track-c", "scapi.json-m", "scapi.util-m", "scapi.User-c", "scapi-m"];
|
||||
var dottedName = get_anchor();
|
||||
if (dottedName) {
|
||||
var target = redirect_url(dottedName);
|
||||
if (target) window.location.replace(target);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<h3>Epydoc Auto-redirect page</h3>
|
||||
|
||||
<p>When javascript is enabled, this page will redirect URLs of
|
||||
the form <tt>redirect.html#<i>dotted.name</i></tt> to the
|
||||
documentation for the object with the given fully-qualified
|
||||
dotted name.</p>
|
||||
<p><a id="message"> </a></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if (dottedName) {
|
||||
var msg = document.getElementById("message");
|
||||
msg.innerHTML = "No documentation found for <tt>"+
|
||||
dottedName+"</tt>";
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,444 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
Package scapi
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package scapi</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li class="private"> <strong class="uidlink"><a href="scapi.authentication-module.html" onclick="show_private();">scapi.authentication</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.config-module.html">scapi.config</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.json-module.html">scapi.json</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.multidict-module.html">scapi.multidict</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests-module.html">scapi.tests</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="private"> <strong class="uidlink"><a href="scapi.util-module.html" onclick="show_private();">scapi.util</a></strong> </li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.ApiConnector-class.html" class="summary-name" onclick="show_private();">ApiConnector</a><br />
|
||||
The ApiConnector holds all the data necessary to authenticate
|
||||
against the soundcloud-api.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Comment-class.html" class="summary-name">Comment</a><br />
|
||||
A comment domain object/resource.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Event-class.html" class="summary-name">Event</a><br />
|
||||
A event domain object/resource.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Group-class.html" class="summary-name">Group</a><br />
|
||||
A group domain object/resource
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.InvalidMethodException-class.html" class="summary-name" onclick="show_private();">InvalidMethodException</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.NoResultFromRequest-class.html" class="summary-name" onclick="show_private();">NoResultFromRequest</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Playlist-class.html" class="summary-name">Playlist</a><br />
|
||||
A playlist/set domain object/resource
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.RESTBase-class.html" class="summary-name" onclick="show_private();">RESTBase</a><br />
|
||||
The baseclass for all our domain-objects/resources.
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.SCRedirectHandler-class.html" class="summary-name" onclick="show_private();">SCRedirectHandler</a><br />
|
||||
A urllib2-Handler to deal with the redirects the RESTful API of SC
|
||||
uses.
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Scope-class.html" class="summary-name" onclick="show_private();">Scope</a><br />
|
||||
The basic means to query and create resources.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.Track-class.html" class="summary-name">Track</a><br />
|
||||
A track domain object/resource.
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.UnknownContentType-class.html" class="summary-name" onclick="show_private();">UnknownContentType</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.User-class.html" class="summary-name">User</a><br />
|
||||
A user domain object/resource.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== FUNCTIONS ==================== -->
|
||||
<a name="section-Functions"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Functions</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Functions"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="register_classes"></a><span class="summary-sig-name">register_classes</span>()</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#register_classes">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi-module.html#ACCESS_TOKEN_URL" class="summary-name">ACCESS_TOKEN_URL</a> = <code title="'http://api.soundcloud.com/oauth/access_token'"><code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/ac</code><code class="variable-ellipsis">...</code></code><br />
|
||||
The url Soundcould offers to make users authorize a concrete request
|
||||
token.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi-module.html#AUTHORIZATION_URL" class="summary-name">AUTHORIZATION_URL</a> = <code title="'http://api.soundcloud.com/oauth/authorize'"><code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/a</code><code class="variable-ellipsis">...</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="PROXY"></a><span class="summary-name">PROXY</span> = <code title="''"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></code><br />
|
||||
The url Soundcould offers to obtain request-tokens
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi-module.html#REQUEST_TOKEN_URL" class="summary-name">REQUEST_TOKEN_URL</a> = <code title="'http://api.soundcloud.com/oauth/request_token'"><code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/r</code><code class="variable-ellipsis">...</code></code><br />
|
||||
The url Soundcould offers to exchange access-tokens for
|
||||
request-tokens.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="USE_PROXY"></a><span class="summary-name">USE_PROXY</span> = <code title="False">False</code><br />
|
||||
Something like http://127.0.0.1:10000/
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger("scapi")">logging.getLogger("scapi")</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES DETAILS ==================== -->
|
||||
<a name="section-VariablesDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-VariablesDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="ACCESS_TOKEN_URL"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">ACCESS_TOKEN_URL</h3>
|
||||
<p>The url Soundcould offers to make users authorize a concrete request
|
||||
token.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/access_token</code><code class="variable-quote">'</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="AUTHORIZATION_URL"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">AUTHORIZATION_URL</h3>
|
||||
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/authorize</code><code class="variable-quote">'</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="REQUEST_TOKEN_URL"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">REQUEST_TOKEN_URL</h3>
|
||||
<p>The url Soundcould offers to exchange access-tokens for
|
||||
request-tokens.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-quote">'</code><code class="variable-string">http://api.soundcloud.com/oauth/request_token</code><code class="variable-quote">'</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,544 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.ApiConnector</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class ApiConnector
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.ApiConnector-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class ApiConnector</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#ApiConnector">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">ApiConnector</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>The ApiConnector holds all the data necessary to authenticate against
|
||||
the soundcloud-api. You can instantiate several connectors if you like,
|
||||
but usually one should be sufficient.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.ApiConnector-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">host</span>,
|
||||
<span class="summary-sig-arg">user</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">password</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">authenticator</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">base</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
|
||||
<span class="summary-sig-arg">collapse_scope</span>=<span class="summary-sig-default">True</span>)</span><br />
|
||||
Constructor for the API-Singleton.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#ApiConnector.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.ApiConnector-class.html#normalize_method" class="summary-sig-name">normalize_method</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">method</span>)</span><br />
|
||||
This method will take a method that has been part of a redirect of
|
||||
some sort and see if it's valid, which means that it's located
|
||||
beneath our base.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#ApiConnector.normalize_method">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.ApiConnector-class.html#fetch_request_token" class="summary-sig-name">fetch_request_token</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">url</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">oauth_callback</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">oob</code><code class="variable-quote">'</code></span>,
|
||||
<span class="summary-sig-arg">oauth_verifier</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
Helper-function for a registered consumer to obtain a request token,
|
||||
as used by oauth.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#ApiConnector.fetch_request_token">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.ApiConnector-class.html#fetch_access_token" class="summary-sig-name">fetch_access_token</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">oauth_verifier</span>)</span><br />
|
||||
Helper-function for a registered consumer to exchange an access token
|
||||
for a request token.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#ApiConnector.fetch_access_token">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.ApiConnector-class.html#get_request_token_authorization_url" class="summary-sig-name">get_request_token_authorization_url</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">token</span>)</span><br />
|
||||
Simple helper function to generate the url needed to ask a user for
|
||||
request token authorization.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#ApiConnector.get_request_token_authorization_url">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="LIST_LIMIT"></a><span class="summary-name">LIST_LIMIT</span> = <code title="50">50</code><br />
|
||||
The query-parameter that is used to request results beginning from a
|
||||
certain offset.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.ApiConnector-class.html#LIST_OFFSET_PARAMETER" class="summary-name">LIST_OFFSET_PARAMETER</a> = <code title="'offset'"><code class="variable-quote">'</code><code class="variable-string">offset</code><code class="variable-quote">'</code></code><br />
|
||||
The query-parameter that is used to request results being limited to
|
||||
a certain amount.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="LIST_LIMIT_PARAMETER"></a><span class="summary-name">LIST_LIMIT_PARAMETER</span> = <code title="'limit'"><code class="variable-quote">'</code><code class="variable-string">limit</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">host</span>,
|
||||
<span class="sig-arg">user</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">password</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">authenticator</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">base</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
|
||||
<span class="sig-arg">collapse_scope</span>=<span class="sig-default">True</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#ApiConnector.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Constructor for the API-Singleton. Use it once with parameters, and
|
||||
then the subsequent calls internal to the API will work.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>host</code></strong> (str) - the host to connect to, e.g. "api.soundcloud.com". If a
|
||||
port is needed, use "api.soundcloud.com:1234"</li>
|
||||
<li><strong class="pname"><code>user</code></strong> (str) - if given, the username for basic HTTP authentication</li>
|
||||
<li><strong class="pname"><code>password</code></strong> (str) - if the user is given, you have to give a password as well</li>
|
||||
<li><strong class="pname"><code>authenticator</code></strong> (OAuthAuthenticator | BasicAuthenticator) - the authenticator to use, see <a
|
||||
href="scapi.authentication-module.html" class="link"
|
||||
onclick="show_private();">scapi.authentication</a></li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="normalize_method"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">normalize_method</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">method</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#ApiConnector.normalize_method">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method will take a method that has been part of a redirect of
|
||||
some sort and see if it's valid, which means that it's located beneath
|
||||
our base. If yes, we return it normalized without that very base.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="fetch_request_token"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">fetch_request_token</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">url</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">oauth_callback</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">oob</code><code class="variable-quote">'</code></span>,
|
||||
<span class="sig-arg">oauth_verifier</span>=<span class="sig-default">None</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#ApiConnector.fetch_request_token">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Helper-function for a registered consumer to obtain a request token,
|
||||
as used by oauth.</p>
|
||||
<p>Use it like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
<span class="py-output"> CONSUMER_SECRET,</span>
|
||||
<span class="py-output"> None, </span>
|
||||
<span class="py-output"> None)</span></pre>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator)
|
||||
<span class="py-prompt">>>> </span>token, secret = sca.fetch_request_token()
|
||||
<span class="py-prompt">>>> </span>authorization_url = sca.get_request_token_authorization_url(token)</pre>
|
||||
<p>Please note the None passed as token & secret to the
|
||||
authenticator.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="fetch_access_token"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">fetch_access_token</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">oauth_verifier</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#ApiConnector.fetch_access_token">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Helper-function for a registered consumer to exchange an access token
|
||||
for a request token.</p>
|
||||
<p>Use it like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER,
|
||||
<span class="py-output"> CONSUMER_SECRET,</span>
|
||||
<span class="py-output"> request_token, </span>
|
||||
<span class="py-output"> request_token_secret)</span></pre>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator)
|
||||
<span class="py-prompt">>>> </span>token, secret = sca.fetch_access_token()</pre>
|
||||
<p>Please note the values passed as token & secret to the
|
||||
authenticator.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_request_token_authorization_url"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_request_token_authorization_url</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">token</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#ApiConnector.get_request_token_authorization_url">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Simple helper function to generate the url needed to ask a user for
|
||||
request token authorization.</p>
|
||||
<p>See also <a href="scapi.ApiConnector-class.html#fetch_request_token"
|
||||
class="link">fetch_request_token</a>.</p>
|
||||
<p>Possible usage:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span><span class="py-keyword">import</span> webbrowser
|
||||
<span class="py-prompt">>>> </span>sca = scapi.ApiConnector()
|
||||
<span class="py-prompt">>>> </span>authorization_url = sca.get_request_token_authorization_url(token)
|
||||
<span class="py-prompt">>>> </span>webbrowser.open(authorization_url)</pre>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
|
||||
<a name="section-ClassVariableDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variable Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariableDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="LIST_OFFSET_PARAMETER"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">LIST_OFFSET_PARAMETER</h3>
|
||||
<p>The query-parameter that is used to request results being limited to a
|
||||
certain amount.</p>
|
||||
<p>Currently this is of no use and just for completeness sake.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-quote">'</code><code class="variable-string">offset</code><code class="variable-quote">'</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,258 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Asset</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Asset
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Asset-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Asset</h1><span class="codelink"><a href="scapi-pysrc.html#Asset">source code</a></span><br /><br />
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Asset</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
An asset domain object/resource.<br /><br />
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'assets'"><code class="variable-quote">'</code><code class="variable-string">assets</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0beta1 on Fri Apr 18 16:28:18 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie()
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,258 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Comment</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Comment
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Comment-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Comment</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Comment">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Comment</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A comment domain object/resource.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'comments'"><code class="variable-quote">'</code><code class="variable-string">comments</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,258 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Event</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Event
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Event-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Event</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Event">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Event</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A event domain object/resource.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'events'"><code class="variable-quote">'</code><code class="variable-string">events</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,258 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Group</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Group
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Group-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Group</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Group">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Group</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A group domain object/resource</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'groups'"><code class="variable-quote">'</code><code class="variable-string">groups</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,297 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.InvalidMethodException</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class InvalidMethodException
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.InvalidMethodException-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class InvalidMethodException</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#InvalidMethodException">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
exceptions.BaseException --+
|
||||
|
|
||||
exceptions.Exception --+
|
||||
|
|
||||
<strong class="uidshort">InvalidMethodException</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.InvalidMethodException-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">message</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#InvalidMethodException.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.InvalidMethodException-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
repr(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#InvalidMethodException.__repr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
|
||||
<code>__new__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">message</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#InvalidMethodException.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__repr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#InvalidMethodException.__repr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>repr(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__repr__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,195 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.NoResultFromRequest</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class NoResultFromRequest
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.NoResultFromRequest-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class NoResultFromRequest</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#NoResultFromRequest">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
exceptions.BaseException --+
|
||||
|
|
||||
exceptions.Exception --+
|
||||
|
|
||||
<strong class="uidshort">NoResultFromRequest</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,258 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Playlist</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Playlist
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Playlist-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Playlist</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Playlist">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Playlist</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A playlist/set domain object/resource</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'playlists'"><code class="variable-quote">'</code><code class="variable-string">playlists</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALIASES">ALIASES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,895 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.RESTBase</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class RESTBase
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.RESTBase-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class RESTBase</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#RESTBase">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">RESTBase</strong>
|
||||
</pre>
|
||||
|
||||
<dl><dt>Known Subclasses:</dt>
|
||||
<dd>
|
||||
<ul class="subclass-list">
|
||||
<li><a href="scapi.Comment-class.html">Comment</a></li><li>, <a href="scapi.Event-class.html">Event</a></li><li>, <a href="scapi.Group-class.html">Group</a></li><li>, <a href="scapi.Playlist-class.html">Playlist</a></li><li>, <a href="scapi.Track-class.html">Track</a></li><li>, <a href="scapi.User-class.html">User</a></li> </ul>
|
||||
</dd></dl>
|
||||
|
||||
<hr />
|
||||
<p>The baseclass for all our domain-objects/resources.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">data</span>,
|
||||
<span class="summary-sig-arg">scope</span>,
|
||||
<span class="summary-sig-arg">path_stack</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__getattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>,
|
||||
<span class="summary-sig-arg">value</span>)</span><br />
|
||||
This method is used to set a property, a resource or a list of
|
||||
resources as property of the resource the method is invoked on.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__setattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_as_arguments"></a><span class="summary-sig-name">_as_arguments</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Converts a resource to a argument-string the way Rails expects it.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase._as_arguments">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_convert_value"></a><span class="summary-sig-name">_convert_value</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">value</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase._convert_value">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#_scope" class="summary-sig-name" onclick="show_private();">_scope</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the scope this resource lives in, which is the KIND and id</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase._scope">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
repr(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__repr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
hash(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__hash__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">other</span>)</span><br />
|
||||
Test for equality.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__eq__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">other</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.__ne__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#create" class="summary-sig-name">create</a>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">scope</span>,
|
||||
<span class="summary-sig-arg">**data</span>)</span><br />
|
||||
This is a convenience-method for creating an object that will be
|
||||
passed as parameter - e.g.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.create">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#new" class="summary-sig-name">new</a>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">scope</span>,
|
||||
<span class="summary-sig-arg">**data</span>)</span><br />
|
||||
Create a new resource inside a given Scope.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.new">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#get" class="summary-sig-name">get</a>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">scope</span>,
|
||||
<span class="summary-sig-arg">id</span>)</span><br />
|
||||
Fetch a resource by id.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase.get">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.RESTBase-class.html#_singleton" class="summary-sig-name" onclick="show_private();">_singleton</a>(<span class="summary-sig-arg">cls</span>)</span><br />
|
||||
This method will take a resource name like "users" and
|
||||
return the single-case, in the example "user".</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#RESTBase._singleton">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.RESTBase-class.html#REGISTRY" class="summary-name">REGISTRY</a> = <code title="{'comments': <class 'scapi.Comment'>,
|
||||
'contacts': <class 'scapi.User'>,
|
||||
'events': <class 'scapi.Event'>,
|
||||
'favorites': <class 'scapi.Track'>,
|
||||
'groups': <class 'scapi.Group'>,
|
||||
'me': <class 'scapi.User'>,
|
||||
'permissions': <class 'scapi.User'>,
|
||||
'playlists': <class 'scapi.Playlist'>,
|
||||
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">comments</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Comment'><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">contacts</code><code class="variable-quote">'</code><code class="variable-op">: </code><<code class="variable-ellipsis">...</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES" class="summary-name">ALL_DOMAIN_CLASSES</a> = <code title="{'Comment': <class 'scapi.Comment'>,
|
||||
'Event': <class 'scapi.Event'>,
|
||||
'Group': <class 'scapi.Group'>,
|
||||
'Playlist': <class 'scapi.Playlist'>,
|
||||
'Track': <class 'scapi.Track'>,
|
||||
'User': <class 'scapi.User'>}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">Comment</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Comment'><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">Eve</code><code class="variable-ellipsis">...</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="ALIASES"></a><span class="summary-name">ALIASES</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">data</span>,
|
||||
<span class="sig-arg">scope</span>,
|
||||
<span class="sig-arg">path_stack</span>=<span class="sig-default">None</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__setattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">name</span>,
|
||||
<span class="sig-arg">value</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.__setattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method is used to set a property, a resource or a list of
|
||||
resources as property of the resource the method is invoked on.</p>
|
||||
<p>For example, to set a comment on a track, do</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>track = scapi.Track.new(title=<span class="py-string">'bar'</span>, sharing=<span class="py-string">"private"</span>)
|
||||
<span class="py-prompt">>>> </span>comment = scapi.Comment.create(body=<span class="py-string">"This is the body of my comment"</span>, timestamp=10)
|
||||
<span class="py-prompt">>>> </span>track.comments = comment</pre>
|
||||
<p>To set a list of users as permissions, do</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>me = sca.me()
|
||||
<span class="py-prompt">>>> </span>track = scapi.Track.new(title=<span class="py-string">'bar'</span>, sharing=<span class="py-string">"private"</span>)
|
||||
<span class="py-prompt">>>> </span>users = sca.users()
|
||||
<span class="py-prompt">>>> </span>users_to_set = [user <span class="py-keyword">for</span> user <span class="py-keyword">in</span> users[:10] <span class="py-keyword">if</span> user != me]
|
||||
<span class="py-prompt">>>> </span>track.permissions = users_to_set</pre>
|
||||
<p>And finally, to simply change the title of a track, do</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>track = sca.Track.get(track_id)
|
||||
<span class="py-prompt">>>> </span>track.title = <span class="py-string">"new_title"</span></pre>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>name</code></strong> (str) - the property name</li>
|
||||
<li><strong class="pname"><code>value</code></strong> (RESTBase | list<RESTBase> | basestring | long | int | float) - the property, resource or resources to set</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>None</dd>
|
||||
<dt>Overrides:
|
||||
object.__setattr__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="create"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">create</span>(<span class="sig-arg">cls</span>,
|
||||
<span class="sig-arg">scope</span>,
|
||||
<span class="sig-arg">**data</span>)</span>
|
||||
<br /><em class="fname">Class Method</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.create">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This is a convenience-method for creating an object that will be
|
||||
passed as parameter - e.g. a comment. A usage would look like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>track = sca.Track.new(title=<span class="py-string">'bar'</span>, sharing=<span class="py-string">"private"</span>)
|
||||
<span class="py-prompt">>>> </span>comment = sca.Comment.create(body=<span class="py-string">"This is the body of my comment"</span>, timestamp=10)
|
||||
<span class="py-prompt">>>> </span>track.comments = comment</pre>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="new"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">new</span>(<span class="sig-arg">cls</span>,
|
||||
<span class="sig-arg">scope</span>,
|
||||
<span class="sig-arg">**data</span>)</span>
|
||||
<br /><em class="fname">Class Method</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.new">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Create a new resource inside a given Scope. The actual values are in
|
||||
data.</p>
|
||||
<p>So for creating new resources, you have two options:</p>
|
||||
<ul>
|
||||
<li>
|
||||
create an instance directly using the class:
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>scope = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>scope.User.new(...)
|
||||
<span class="py-output"><scapi.User object at 0x1234></span></pre>
|
||||
</li>
|
||||
<li>
|
||||
create a instance in a certain scope:
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>scope = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>user = scapi.User(<span class="py-string">"1"</span>)
|
||||
<span class="py-prompt">>>> </span>track = user.tracks.new()
|
||||
<span class="py-output"><scapi.Track object at 0x1234></span></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>scope</code></strong> (tuple<Scope>[1]) - if not empty, a one-element tuple containing the Scope</li>
|
||||
<li><strong class="pname"><code>data</code></strong> (dict) - the data</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>new instance of the resource</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get</span>(<span class="sig-arg">cls</span>,
|
||||
<span class="sig-arg">scope</span>,
|
||||
<span class="sig-arg">id</span>)</span>
|
||||
<br /><em class="fname">Class Method</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.get">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Fetch a resource by id.</p>
|
||||
<p>Simply pass a known id as argument. For example</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>track = sca.Track.get(id)</pre>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_scope"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_scope</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase._scope">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Return the scope this resource lives in, which is the KIND and id</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns:</dt>
|
||||
<dd>"<KIND>/<id>"</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_singleton"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_singleton</span>(<span class="sig-arg">cls</span>)</span>
|
||||
<br /><em class="fname">Class Method</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase._singleton">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method will take a resource name like "users" and
|
||||
return the single-case, in the example "user".</p>
|
||||
<p>Currently, it's not very sophisticated, only strips a trailing s.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__repr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.__repr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>repr(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__repr__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__hash__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__hash__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Hashing function)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.__hash__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>hash(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__hash__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__eq__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">other</span>)</span>
|
||||
<br /><em class="fname">(Equality operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#RESTBase.__eq__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Test for equality.</p>
|
||||
<p>Resources are considered equal if the have the same kind and id.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
|
||||
<a name="section-ClassVariableDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variable Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariableDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="REGISTRY"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">REGISTRY</h3>
|
||||
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">comments</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Comment'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">contacts</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.User'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">events</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Event'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">favorites</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Track'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">groups</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Group'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">me</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.User'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">permissions</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.User'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">playlists</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Playlist'><code class="variable-op">,</code>
|
||||
<code class="variable-ellipsis">...</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="ALL_DOMAIN_CLASSES"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">ALL_DOMAIN_CLASSES</h3>
|
||||
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">Comment</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Comment'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">Event</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Event'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">Group</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Group'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">Playlist</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Playlist'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">Track</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.Track'><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">User</code><code class="variable-quote">'</code><code class="variable-op">: </code><class 'scapi.User'><code class="variable-group">}</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,319 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.SCRedirectHandler</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class SCRedirectHandler
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.SCRedirectHandler-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class SCRedirectHandler</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
urllib2.BaseHandler --+
|
||||
|
|
||||
urllib2.HTTPRedirectHandler --+
|
||||
|
|
||||
<strong class="uidshort">SCRedirectHandler</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A urllib2-Handler to deal with the redirects the RESTful API of SC
|
||||
uses.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.SCRedirectHandler-class.html#http_error_303" class="summary-sig-name">http_error_303</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">req</span>,
|
||||
<span class="summary-sig-arg">fp</span>,
|
||||
<span class="summary-sig-arg">code</span>,
|
||||
<span class="summary-sig-arg">msg</span>,
|
||||
<span class="summary-sig-arg">hdrs</span>)</span><br />
|
||||
In case of return-code 303 (See-other), we have to store the location
|
||||
we got because that will determine the actual type of resource
|
||||
returned.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_303">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.SCRedirectHandler-class.html#http_error_201" class="summary-sig-name">http_error_201</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">req</span>,
|
||||
<span class="summary-sig-arg">fp</span>,
|
||||
<span class="summary-sig-arg">code</span>,
|
||||
<span class="summary-sig-arg">msg</span>,
|
||||
<span class="summary-sig-arg">hdrs</span>)</span><br />
|
||||
We fake a 201 being a 303 so that our redirection-scheme takes place
|
||||
for the 201 the API throws in case we created something.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_201">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.HTTPRedirectHandler</code></b>:
|
||||
<code>http_error_301</code>,
|
||||
<code>http_error_302</code>,
|
||||
<code>http_error_307</code>,
|
||||
<code>redirect_request</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.BaseHandler</code></b>:
|
||||
<code>__lt__</code>,
|
||||
<code>add_parent</code>,
|
||||
<code>close</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="alternate_method"></a><span class="summary-name">alternate_method</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.HTTPRedirectHandler</code></b>:
|
||||
<code>inf_msg</code>,
|
||||
<code>max_redirections</code>,
|
||||
<code>max_repeats</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.BaseHandler</code></b>:
|
||||
<code>handler_order</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="http_error_303"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">http_error_303</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">req</span>,
|
||||
<span class="sig-arg">fp</span>,
|
||||
<span class="sig-arg">code</span>,
|
||||
<span class="sig-arg">msg</span>,
|
||||
<span class="sig-arg">hdrs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_303">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>In case of return-code 303 (See-other), we have to store the location
|
||||
we got because that will determine the actual type of resource
|
||||
returned.</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
urllib2.HTTPRedirectHandler.http_error_302
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="http_error_201"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">http_error_201</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">req</span>,
|
||||
<span class="sig-arg">fp</span>,
|
||||
<span class="sig-arg">code</span>,
|
||||
<span class="sig-arg">msg</span>,
|
||||
<span class="sig-arg">hdrs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_201">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>We fake a 201 being a 303 so that our redirection-scheme takes place
|
||||
for the 201 the API throws in case we created something. If the location
|
||||
is not available though, that means that whatever we created has succeded
|
||||
- without being a named resource. Assigning an asset to a track is an
|
||||
example of such case.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,682 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Scope</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Scope
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Scope-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Scope</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Scope">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Scope</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>The basic means to query and create resources. The Scope uses the <a
|
||||
href="scapi.ApiConnector-class.html" class="link"
|
||||
onclick="show_private();">ApiConnector</a> to create the proper URIs for
|
||||
querying or creating resources.</p>
|
||||
<p>For accessing resources from the root level, you explcitly create a
|
||||
Scope and pass it an <a href="scapi.ApiConnector-class.html" class="link"
|
||||
onclick="show_private();">ApiConnector</a>-instance. Then you can query
|
||||
it or create new resources like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>connector = scapi.ApiConnector(host=<span class="py-string">'host'</span>, user=<span class="py-string">'user'</span>, password=<span class="py-string">'password'</span>) <span class="py-comment"># initialize the API</span>
|
||||
<span class="py-prompt">>>> </span>scope = scapi.Scope(connector) <span class="py-comment"># get the root scope</span>
|
||||
<span class="py-prompt">>>> </span>users = list(scope.users())
|
||||
<span class="py-output">[<scapi.User object at 0x12345>, ...]</span></pre>
|
||||
<p>Please not that all resources that are lists are returned as
|
||||
<b>generator</b>. So you need to either iterate over them, or call
|
||||
list(resources) on them.</p>
|
||||
<p>When accessing resources that belong to another resource, like
|
||||
contacts of a user, you access the parent's resource scope implicitly
|
||||
through the resource instance like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>user = scope.users().next()
|
||||
<span class="py-prompt">>>> </span>list(user.contacts())
|
||||
<span class="py-output">[<scapi.Contact object at 0x12345>, ...]</span></pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">connector</span>,
|
||||
<span class="summary-sig-arg">scope</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">parent</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
Create the Scope.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_get_connector"></a><span class="summary-sig-name">_get_connector</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope._get_connector">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#oauth_sign_get_request" class="summary-sig-name">oauth_sign_get_request</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">url</span>)</span><br />
|
||||
This method will take an arbitrary url, and rewrite it so that the
|
||||
current authenticator's oauth-headers are appended as
|
||||
query-parameters.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope.oauth_sign_get_request">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">urllib2.Request</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#_create_request" class="summary-sig-name" onclick="show_private();">_create_request</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">url</span>,
|
||||
<span class="summary-sig-arg">connector</span>,
|
||||
<span class="summary-sig-arg">parameters</span>,
|
||||
<span class="summary-sig-arg">queryparams</span>,
|
||||
<span class="summary-sig-arg">alternate_http_method</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">use_multipart</span>=<span class="summary-sig-default">False</span>)</span><br />
|
||||
This method returnes the urllib2.Request to perform the actual
|
||||
HTTP-request.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope._create_request">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">str</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#_create_query_string" class="summary-sig-name" onclick="show_private();">_create_query_string</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">queryparams</span>)</span><br />
|
||||
Small helpermethod to create the querystring from a dict.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope._create_query_string">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#_call" class="summary-sig-name" onclick="show_private();">_call</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">method</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
The workhorse.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope._call">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#_map" class="summary-sig-name" onclick="show_private();">_map</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">res</span>,
|
||||
<span class="summary-sig-arg">method</span>,
|
||||
<span class="summary-sig-arg">continue_list_fetching</span>)</span><br />
|
||||
This method will take the JSON-result of a HTTP-call and return our
|
||||
domain-objects.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope._map">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">_name</span>)</span><br />
|
||||
Retrieve an API-method or a scoped domain-class.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope.__getattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
repr(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope.__repr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.Scope-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
str(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#Scope.__str__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__setattr__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">connector</span>,
|
||||
<span class="sig-arg">scope</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">parent</span>=<span class="sig-default">None</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Create the Scope. It can have a resource as scope, and possibly a
|
||||
parent-scope.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>connector</code></strong> (ApiConnector) - The connector to use.</li>
|
||||
<li><strong class="pname"><code>scope</code></strong> (scapi.RESTBase) - the resource to make this scope belong to</li>
|
||||
<li><strong class="pname"><code>parent</code></strong> (scapi.Scope) - the parent scope of this scope</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="oauth_sign_get_request"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">oauth_sign_get_request</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">url</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope.oauth_sign_get_request">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method will take an arbitrary url, and rewrite it so that the
|
||||
current authenticator's oauth-headers are appended as
|
||||
query-parameters.</p>
|
||||
<p>This is used in streaming and downloading, because those content isn't
|
||||
served from the SoundCloud servers themselves.</p>
|
||||
<p>A usage example would look like this:</p>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>sca = scapi.Scope(connector)
|
||||
<span class="py-prompt">>>> </span>track = sca.tracks(params={
|
||||
<span class="py-output"> "filter" : "downloadable",</span>
|
||||
<span class="py-output"> }).next()</span></pre>
|
||||
<pre class="py-doctest">
|
||||
<span class="py-prompt">>>> </span>download_url = track.download_url
|
||||
<span class="py-prompt">>>> </span>signed_url = track.oauth_sign_get_request(download_url)
|
||||
<span class="py-prompt">>>> </span>data = urllib2.urlopen(signed_url).read()</pre>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_create_request"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_create_request</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">url</span>,
|
||||
<span class="sig-arg">connector</span>,
|
||||
<span class="sig-arg">parameters</span>,
|
||||
<span class="sig-arg">queryparams</span>,
|
||||
<span class="sig-arg">alternate_http_method</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">use_multipart</span>=<span class="sig-default">False</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope._create_request">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method returnes the urllib2.Request to perform the actual
|
||||
HTTP-request.</p>
|
||||
<p>We return a subclass that overload the get_method-method to return a
|
||||
custom method like "PUT". Additionally, the request is enhanced
|
||||
with the current authenticators authorization scheme headers.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>url</code></strong> - the destination url</li>
|
||||
<li><strong class="pname"><code>connector</code></strong> - our connector-instance</li>
|
||||
<li><strong class="pname"><code>parameters</code></strong> (None|dict<str, basestring|list<basestring>>) - the POST-parameters to use.</li>
|
||||
<li><strong class="pname"><code>queryparams</code></strong> (None|dict<str, basestring|list<basestring>>) - the queryparams to use</li>
|
||||
<li><strong class="pname"><code>alternate_http_method</code></strong> (str) - an alternate HTTP-method to use</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: urllib2.Request</dt>
|
||||
<dd>the fully equipped request</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_create_query_string"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_create_query_string</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">queryparams</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope._create_query_string">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Small helpermethod to create the querystring from a dict.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>queryparams</code></strong> (None|dict<str, basestring|list<basestring>>) - the queryparameters.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: str</dt>
|
||||
<dd>either the empty string, or a "?" followed by the
|
||||
parameters joined by "&"</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_call"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_call</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">method</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope._call">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>The workhorse. It's complicated, convoluted and beyond understanding
|
||||
of a mortal being.</p>
|
||||
<p>You have been warned.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_map"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_map</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">res</span>,
|
||||
<span class="sig-arg">method</span>,
|
||||
<span class="sig-arg">continue_list_fetching</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope._map">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>This method will take the JSON-result of a HTTP-call and return our
|
||||
domain-objects.</p>
|
||||
<p>It's also deep magic, don't look.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__getattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">_name</span>)</span>
|
||||
<br /><em class="fname">(Qualification operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope.__getattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Retrieve an API-method or a scoped domain-class.</p>
|
||||
<p>If the former, result is a callable that supports the following
|
||||
invocations:</p>
|
||||
<ul>
|
||||
<li>
|
||||
calling (...), with possible arguments (positional/keyword), return
|
||||
the resulting resource or list of resources. When calling, you can
|
||||
pass a keyword-argument <b>params</b>. This must be a dict or <a
|
||||
href="scapi.util.MultiDict-class.html" class="link">MultiDict</a> and
|
||||
will be used to add additional query-get-parameters.
|
||||
</li>
|
||||
<li>
|
||||
invoking append(resource) on it will PUT the resource, making it part
|
||||
of the current resource. Makes sense only if it's a collection of
|
||||
course.
|
||||
</li>
|
||||
<li>
|
||||
invoking remove(resource) on it will DELETE the resource from it's
|
||||
container. Also only usable on collections.
|
||||
<p>TODO: describe the latter</p>
|
||||
</li>
|
||||
</ul>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__repr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope.__repr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>repr(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__repr__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__str__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Informal representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#Scope.__str__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>str(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__str__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,264 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.Track</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class Track
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.Track-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Track</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#Track">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">Track</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A track domain object/resource.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'tracks'"><code class="variable-quote">'</code><code class="variable-string">tracks</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="ALIASES"></a><span class="summary-name">ALIASES</span> = <code title="['favorites']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">favorites</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,337 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.UnknownContentType</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class UnknownContentType
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.UnknownContentType-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class UnknownContentType</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#UnknownContentType">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
exceptions.BaseException --+
|
||||
|
|
||||
exceptions.Exception --+
|
||||
|
|
||||
<strong class="uidshort">UnknownContentType</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.UnknownContentType-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">msg</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.UnknownContentType-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
repr(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__repr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.UnknownContentType-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
str(x)</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__str__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
|
||||
<code>__new__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">msg</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__repr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__repr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>repr(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__repr__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__str__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Informal representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi-pysrc.html#UnknownContentType.__str__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>str(x)</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__str__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,264 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.User</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Class User
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.User-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class User</h1><p class="nomargin-top"><span class="codelink"><a href="scapi-pysrc.html#User">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a> --+
|
||||
|
|
||||
<strong class="uidshort">User</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<p>A user domain object/resource.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#__eq__">__eq__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__getattr__">__getattr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__hash__">__hash__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__init__">__init__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__ne__">__ne__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__repr__">__repr__</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#__setattr__">__setattr__</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_as_arguments" onclick="show_private();">_as_arguments</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_convert_value" onclick="show_private();">_convert_value</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#_scope" onclick="show_private();">_scope</a></code>
|
||||
</p></div>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS METHODS ==================== -->
|
||||
<a name="section-ClassMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#create">create</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#get">get</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#new">new</a></code>
|
||||
</p>
|
||||
<div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b> (private):
|
||||
<code><a href="scapi.RESTBase-class.html#_singleton" onclick="show_private();">_singleton</a></code>
|
||||
</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="KIND"></a><span class="summary-name">KIND</span> = <code title="'users'"><code class="variable-quote">'</code><code class="variable-string">users</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="ALIASES"></a><span class="summary-name">ALIASES</span> = <code title="['me', 'permissions', 'contacts', 'user']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">me</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">permissions</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">contacts</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">user</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="scapi.RESTBase-class.html" onclick="show_private();">RESTBase</a></code></b>:
|
||||
<code><a href="scapi.RESTBase-class.html#ALL_DOMAIN_CLASSES">ALL_DOMAIN_CLASSES</a></code>,
|
||||
<code><a href="scapi.RESTBase-class.html#REGISTRY">REGISTRY</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,228 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.authentication</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module authentication
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.authentication-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module authentication</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.authentication-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html" class="summary-name">OAuthSignatureMethod_HMAC_SHA1</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.authentication.OAuthAuthenticator-class.html" class="summary-name">OAuthAuthenticator</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.authentication.BasicAuthenticator-class.html" class="summary-name">BasicAuthenticator</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.authentication-module.html#USE_DOUBLE_ESCAPE_HACK" class="summary-name">USE_DOUBLE_ESCAPE_HACK</a> = <code title="True">True</code><br />
|
||||
There seems to be an uncertainty on the way parameters are to be
|
||||
escaped.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(__name__)">logging.getLogger(__name__)</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES DETAILS ==================== -->
|
||||
<a name="section-VariablesDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-VariablesDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="USE_DOUBLE_ESCAPE_HACK"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">USE_DOUBLE_ESCAPE_HACK</h3>
|
||||
<p>There seems to be an uncertainty on the way parameters are to be
|
||||
escaped. For now, this variable switches between two escaping
|
||||
mechanisms.</p>
|
||||
<p>If True, the passed parameters - GET or POST - are escaped
|
||||
*twice*.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
True
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,348 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.authentication</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module authentication
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.authentication-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="scapi.authentication-module.html" onclick="show_private();">Module scapi.authentication</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">## SouncCloudAPI implements a Python wrapper around the SoundCloud RESTful</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## API</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Copyright (C) 2008 Diez B. Roggisch</tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Contact mailto:deets@soundcloud.com</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## This library is free software; you can redistribute it and/or</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## modify it under the terms of the GNU Lesser General Public</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## License as published by the Free Software Foundation; either</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## version 2.1 of the License, or (at your option) any later version.</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## This library is distributed in the hope that it will be useful,</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Lesser General Public License for more details.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## You should have received a copy of the GNU Lesser General Public</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## License along with this library; if not, write to the Free Software</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">base64</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">time</tt><tt class="py-op">,</tt> <tt class="py-name">random</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urlparse</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hmac</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">hashlib</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package scapi=scapi-module.html"><a title="scapi" class="py-name" href="#" onclick="return doclink('link-0', 'scapi', 'link-0');">scapi</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module scapi.util=scapi.util-module.html"><a title="scapi.util" class="py-name" href="#" onclick="return doclink('link-1', 'util', 'link-1');">util</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Function scapi.util.escape()=scapi.util-module.html#escape"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-2', 'escape', 'link-2');">escape</a></tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable scapi.authentication.USE_DOUBLE_ESCAPE_HACK=scapi.authentication-module.html#USE_DOUBLE_ESCAPE_HACK"><a title="scapi.authentication.USE_DOUBLE_ESCAPE_HACK" class="py-name" href="#" onclick="return doclink('link-3', 'USE_DOUBLE_ESCAPE_HACK', 'link-3');">USE_DOUBLE_ESCAPE_HACK</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-string">"""</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-string">There seems to be an uncertainty on the way</tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-string">parameters are to be escaped. For now, this</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-string">variable switches between two escaping mechanisms.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-string"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-string">If True, the passed parameters - GET or POST - are</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-string">escaped *twice*.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-string">"""</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable scapi.authentication.logger=scapi.authentication-module.html#logger,Variable scapi.logger=scapi-module.html#logger,Variable scapi.tests.scapi_tests.logger=scapi.tests.scapi_tests-module.html#logger,Variable scapi.tests.test_connect.logger=scapi.tests.test_connect-module.html#logger,Variable scapi.tests.test_oauth.logger=scapi.tests.test_oauth-module.html#logger"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-4', 'logger', 'link-4');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-name">__name__</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1"></a><div id="OAuthSignatureMethod_HMAC_SHA1-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html">OAuthSignatureMethod_HMAC_SHA1</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt id="link-5" class="py-name" targets="Variable scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.FORBIDDEN=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#FORBIDDEN"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.FORBIDDEN" class="py-name" href="#" onclick="return doclink('link-5', 'FORBIDDEN', 'link-5');">FORBIDDEN</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'realm'</tt><tt class="py-op">,</tt> <tt class="py-string">'oauth_signature'</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1.get_name"></a><div id="OAuthSignatureMethod_HMAC_SHA1.get_name-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1.get_name-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1.get_name');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_name">get_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1.get_name-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1.get_name-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'HMAC-SHA1'</tt> </tt>
|
||||
</div><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1.build_signature"></a><div id="OAuthSignatureMethod_HMAC_SHA1.build_signature-def"><a name="L49"></a><tt class="py-lineno"> 49</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1.build_signature-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1.build_signature');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#build_signature">build_signature</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">,</tt> <tt class="py-param">consumer_secret</tt><tt class="py-op">,</tt> <tt class="py-param">token_secret</tt><tt class="py-op">,</tt> <tt class="py-param">oauth_parameters</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1.build_signature-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1.build_signature-expanded"><a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-6" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-6', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">level</tt> <tt class="py-op">==</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt id="link-7" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-7', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"request: %r"</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> <tt id="link-8" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-8', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"parameters: %r"</tt><tt class="py-op">,</tt> <tt class="py-name">parameters</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt id="link-9" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-9', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"consumer_secret: %r"</tt><tt class="py-op">,</tt> <tt class="py-name">consumer_secret</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> <tt id="link-10" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-10', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"token_secret: %r"</tt><tt class="py-op">,</tt> <tt class="py-name">token_secret</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"> <tt id="link-11" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-11', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"oauth_parameters: %r"</tt><tt class="py-op">,</tt> <tt class="py-name">oauth_parameters</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> <tt class="py-name">temp</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">oauth_parameters</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.FORBIDDEN" class="py-name" href="#" onclick="return doclink('link-12', 'FORBIDDEN', 'link-5');">FORBIDDEN</a></tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">temp</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-keyword">del</tt> <tt class="py-name">temp</tt><tt class="py-op">[</tt><tt class="py-name">p</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">parameters</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-name">temp</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">parameters</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-name">sig</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt id="link-13" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-13', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method()=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_method"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method" class="py-name" href="#" onclick="return doclink('link-14', 'get_normalized_http_method', 'link-14');">get_normalized_http_method</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt id="link-15" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-15', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url()=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_url"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url" class="py-name" href="#" onclick="return doclink('link-16', 'get_normalized_http_url', 'link-16');">get_normalized_http_url</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters()=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_parameters"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters" class="py-name" href="#" onclick="return doclink('link-17', 'get_normalized_parameters', 'link-17');">get_normalized_parameters</a></tt><tt class="py-op">(</tt><tt class="py-name">temp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment"># these are escaped in the method already</tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s&'</tt> <tt class="py-op">%</tt> <tt class="py-name">consumer_secret</tt> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">token_secret</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">+=</tt> <tt class="py-name">token_secret</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-name">raw</tt> <tt class="py-op">=</tt> <tt class="py-string">'&'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">sig</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt id="link-18" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-18', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"raw basestring: %s"</tt><tt class="py-op">,</tt> <tt class="py-name">raw</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt id="link-19" class="py-name"><a title="scapi.authentication.logger
|
||||
scapi.logger
|
||||
scapi.tests.scapi_tests.logger
|
||||
scapi.tests.test_connect.logger
|
||||
scapi.tests.test_oauth.logger" class="py-name" href="#" onclick="return doclink('link-19', 'logger', 'link-4');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"key: %s"</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-comment"># hmac object</tt> </tt>
|
||||
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">hashed</tt> <tt class="py-op">=</tt> <tt class="py-name">hmac</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Class Method scapi.RESTBase.new()=scapi.RESTBase-class.html#new"><a title="scapi.RESTBase.new" class="py-name" href="#" onclick="return doclink('link-20', 'new', 'link-20');">new</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">raw</tt><tt class="py-op">,</tt> <tt class="py-name">hashlib</tt><tt class="py-op">.</tt><tt class="py-name">sha1</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt class="py-comment"># calculate the digest base 64</tt> </tt>
|
||||
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">signature</tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-21', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-name">base64</tt><tt class="py-op">.</tt><tt class="py-name">b64encode</tt><tt class="py-op">(</tt><tt class="py-name">hashed</tt><tt class="py-op">.</tt><tt class="py-name">digest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">signature</tt> </tt>
|
||||
</div><a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> </tt>
|
||||
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method"></a><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_method">get_normalized_http_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_method</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">upper</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> </tt>
|
||||
<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
|
||||
<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-comment"># parses the url and rebuilds it to be scheme://host/path</tt> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url"></a><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url-def"><a name="L89"></a><tt class="py-lineno"> 89</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_http_url">get_normalized_http_url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url-expanded"><a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-name">url</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">get_full_url</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-name">parts</tt> <tt class="py-op">=</tt> <tt class="py-name">urlparse</tt><tt class="py-op">.</tt><tt class="py-name">urlparse</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">url_string</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s://%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">parts</tt><tt class="py-op">.</tt><tt class="py-name">scheme</tt><tt class="py-op">,</tt> <tt class="py-name">parts</tt><tt class="py-op">.</tt><tt class="py-name">netloc</tt><tt class="py-op">,</tt> <tt class="py-name">parts</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">url_string</tt> </tt>
|
||||
</div><a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> </tt>
|
||||
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters"></a><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters-def"><a name="L96"></a><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters-toggle" onclick="return toggle('OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_normalized_parameters">get_normalized_parameters</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">params</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters-expanded"><a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">params</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-comment"># exclude the signature if it exists</tt> </tt>
|
||||
<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">del</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-string">'oauth_signature'</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">key_values</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> </tt>
|
||||
<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">values</tt> <tt class="py-keyword">in</tt> <tt class="py-name">params</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-keyword">continue</tt> </tt>
|
||||
<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">long</tt><tt class="py-op">,</tt> <tt class="py-name">float</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">values</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">values</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-22" class="py-name"><a title="scapi.authentication.USE_DOUBLE_ESCAPE_HACK" class="py-name" href="#" onclick="return doclink('link-22', 'USE_DOUBLE_ESCAPE_HACK', 'link-3');">USE_DOUBLE_ESCAPE_HACK</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">"ouath"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-23', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">values</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">"utf-8"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">"utf-8"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-24" class="py-name"><a title="scapi.authentication.USE_DOUBLE_ESCAPE_HACK" class="py-name" href="#" onclick="return doclink('link-24', 'USE_DOUBLE_ESCAPE_HACK', 'link-3');">USE_DOUBLE_ESCAPE_HACK</a></tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">key</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">"oauth"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-comment"># this is a dirty hack to make the</tt> </tt>
|
||||
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># thing work with the current server-side</tt> </tt>
|
||||
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># implementation. Or is it by spec? </tt> </tt>
|
||||
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-25', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-name">key_values</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-26', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s=%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-comment"># sort lexicographically, first after key, then after value</tt> </tt>
|
||||
<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">key_values</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-comment"># combine key value pairs in string</tt> </tt>
|
||||
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">return</tt> <tt id="link-27" class="py-name"><a title="scapi.util.escape" class="py-name" href="#" onclick="return doclink('link-27', 'escape', 'link-2');">escape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">key_values</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> </tt>
|
||||
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthAuthenticator"></a><div id="OAuthAuthenticator-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="OAuthAuthenticator-toggle" onclick="return toggle('OAuthAuthenticator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.authentication.OAuthAuthenticator-class.html">OAuthAuthenticator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthAuthenticator-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="OAuthAuthenticator-expanded"><a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt id="link-28" class="py-name" targets="Variable scapi.authentication.OAuthAuthenticator.OAUTH_API_VERSION=scapi.authentication.OAuthAuthenticator-class.html#OAUTH_API_VERSION"><a title="scapi.authentication.OAuthAuthenticator.OAUTH_API_VERSION" class="py-name" href="#" onclick="return doclink('link-28', 'OAUTH_API_VERSION', 'link-28');">OAUTH_API_VERSION</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'1.0'</tt> </tt>
|
||||
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt id="link-29" class="py-name" targets="Variable scapi.authentication.OAuthAuthenticator.AUTHORIZATION_HEADER=scapi.authentication.OAuthAuthenticator-class.html#AUTHORIZATION_HEADER"><a title="scapi.authentication.OAuthAuthenticator.AUTHORIZATION_HEADER" class="py-name" href="#" onclick="return doclink('link-29', 'AUTHORIZATION_HEADER', 'link-29');">AUTHORIZATION_HEADER</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Authorization"</tt> </tt>
|
||||
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthAuthenticator.__init__"></a><div id="OAuthAuthenticator.__init__-def"><a name="L136"></a><tt class="py-lineno">136</tt> <a class="py-toggle" href="#" id="OAuthAuthenticator.__init__-toggle" onclick="return toggle('OAuthAuthenticator.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthAuthenticator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">consumer</tt><tt class="py-op">,</tt> <tt class="py-param">consumer_secret</tt><tt class="py-op">,</tt> <tt class="py-param">token</tt><tt class="py-op">,</tt> <tt class="py-param">secret</tt><tt class="py-op">,</tt> <tt class="py-param">signature_method</tt><tt class="py-op">=</tt><tt id="link-30" class="py-name" targets="Class scapi.authentication.OAuthSignatureMethod_HMAC_SHA1=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1" class="py-name" href="#" onclick="return doclink('link-30', 'OAuthSignatureMethod_HMAC_SHA1', 'link-30');">OAuthSignatureMethod_HMAC_SHA1</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthAuthenticator.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthAuthenticator.__init__-expanded"><a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_consumer</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_token</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_secret</tt> <tt class="py-op">=</tt> <tt class="py-name">consumer</tt><tt class="py-op">,</tt> <tt class="py-name">token</tt><tt class="py-op">,</tt> <tt class="py-name">secret</tt> </tt>
|
||||
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_consumer_secret</tt> <tt class="py-op">=</tt> <tt class="py-name">consumer_secret</tt> </tt>
|
||||
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_signature_method</tt> <tt class="py-op">=</tt> <tt class="py-name">signature_method</tt> </tt>
|
||||
<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">seed</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> </tt>
|
||||
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthAuthenticator.augment_request"></a><div id="OAuthAuthenticator.augment_request-def"><a name="L143"></a><tt class="py-lineno">143</tt> <a class="py-toggle" href="#" id="OAuthAuthenticator.augment_request-toggle" onclick="return toggle('OAuthAuthenticator.augment_request');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthAuthenticator-class.html#augment_request">augment_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">req</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">,</tt> <tt class="py-param">use_multipart</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">oauth_callback</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">oauth_verifier</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthAuthenticator.augment_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthAuthenticator.augment_request-expanded"><a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt>
|
||||
<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-string">'oauth_consumer_key'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_consumer</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-string">'oauth_timestamp'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method scapi.authentication.OAuthAuthenticator.generate_timestamp()=scapi.authentication.OAuthAuthenticator-class.html#generate_timestamp"><a title="scapi.authentication.OAuthAuthenticator.generate_timestamp" class="py-name" href="#" onclick="return doclink('link-31', 'generate_timestamp', 'link-31');">generate_timestamp</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-string">'oauth_nonce'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Method scapi.authentication.OAuthAuthenticator.generate_nonce()=scapi.authentication.OAuthAuthenticator-class.html#generate_nonce"><a title="scapi.authentication.OAuthAuthenticator.generate_nonce" class="py-name" href="#" onclick="return doclink('link-32', 'generate_nonce', 'link-32');">generate_nonce</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-string">'oauth_version'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="scapi.authentication.OAuthAuthenticator.OAUTH_API_VERSION" class="py-name" href="#" onclick="return doclink('link-33', 'OAUTH_API_VERSION', 'link-28');">OAUTH_API_VERSION</a></tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-string">'oauth_signature_method'</tt> <tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_signature_method</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_name()=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#get_name"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.get_name" class="py-name" href="#" onclick="return doclink('link-34', 'get_name', 'link-34');">get_name</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-comment">#'realm' : "http://soundcloud.com",</tt> </tt>
|
||||
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-op">}</tt> </tt>
|
||||
<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_token</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt><tt class="py-op">[</tt><tt class="py-string">'oauth_token'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_token</tt> </tt>
|
||||
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> </tt>
|
||||
<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">oauth_callback</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt><tt class="py-op">[</tt><tt class="py-string">'oauth_callback'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">oauth_callback</tt> </tt>
|
||||
<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> </tt>
|
||||
<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">oauth_verifier</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt><tt class="py-op">[</tt><tt class="py-string">'oauth_verifier'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">oauth_verifier</tt> </tt>
|
||||
<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> </tt>
|
||||
<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-comment"># in case we upload large files, we don't</tt> </tt>
|
||||
<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># sign the request over the parameters</tt> </tt>
|
||||
<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">use_multipart</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-name">parameters</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
|
||||
<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> </tt>
|
||||
<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt><tt class="py-op">[</tt><tt class="py-string">'oauth_signature'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_signature_method</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Method scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.build_signature()=scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html#build_signature"><a title="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1.build_signature" class="py-name" href="#" onclick="return doclink('link-35', 'build_signature', 'link-35');">build_signature</a></tt><tt class="py-op">(</tt><tt class="py-name">req</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">parameters</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_consumer_secret</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_secret</tt><tt class="py-op">,</tt> </tt>
|
||||
<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-name">oauth_parameters</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">to_header</tt><tt class="py-op">(</tt><tt class="py-param">d</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">","</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-string">'%s="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">oauth_parameters</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> </tt>
|
||||
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">req</tt><tt class="py-op">.</tt><tt class="py-name">add_header</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="scapi.authentication.OAuthAuthenticator.AUTHORIZATION_HEADER" class="py-name" href="#" onclick="return doclink('link-36', 'AUTHORIZATION_HEADER', 'link-29');">AUTHORIZATION_HEADER</a></tt><tt class="py-op">,</tt> <tt class="py-string">"OAuth %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">to_header</tt><tt class="py-op">(</tt><tt class="py-name">oauth_parameters</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthAuthenticator.generate_timestamp"></a><div id="OAuthAuthenticator.generate_timestamp-def"><a name="L176"></a><tt class="py-lineno">176</tt> <a class="py-toggle" href="#" id="OAuthAuthenticator.generate_timestamp-toggle" onclick="return toggle('OAuthAuthenticator.generate_timestamp');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthAuthenticator-class.html#generate_timestamp">generate_timestamp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthAuthenticator.generate_timestamp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthAuthenticator.generate_timestamp-expanded"><a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-comment"># * 1000.0)</tt> </tt>
|
||||
</div><a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> </tt>
|
||||
<a name="OAuthAuthenticator.generate_nonce"></a><div id="OAuthAuthenticator.generate_nonce-def"><a name="L179"></a><tt class="py-lineno">179</tt> <a class="py-toggle" href="#" id="OAuthAuthenticator.generate_nonce-toggle" onclick="return toggle('OAuthAuthenticator.generate_nonce');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.OAuthAuthenticator-class.html#generate_nonce">generate_nonce</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">length</tt><tt class="py-op">=</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="OAuthAuthenticator.generate_nonce-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="OAuthAuthenticator.generate_nonce-expanded"><a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">random</tt><tt class="py-op">.</tt><tt class="py-name">randint</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">9</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">length</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> </tt>
|
||||
<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> </tt>
|
||||
<a name="BasicAuthenticator"></a><div id="BasicAuthenticator-def"><a name="L183"></a><tt class="py-lineno">183</tt> <a class="py-toggle" href="#" id="BasicAuthenticator-toggle" onclick="return toggle('BasicAuthenticator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.authentication.BasicAuthenticator-class.html">BasicAuthenticator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="BasicAuthenticator-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="BasicAuthenticator-expanded"><a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> </tt>
|
||||
<a name="BasicAuthenticator.__init__"></a><div id="BasicAuthenticator.__init__-def"><a name="L185"></a><tt class="py-lineno">185</tt> <a class="py-toggle" href="#" id="BasicAuthenticator.__init__-toggle" onclick="return toggle('BasicAuthenticator.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.BasicAuthenticator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">user</tt><tt class="py-op">,</tt> <tt class="py-param">password</tt><tt class="py-op">,</tt> <tt class="py-param">consumer</tt><tt class="py-op">,</tt> <tt class="py-param">consumer_secret</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="BasicAuthenticator.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BasicAuthenticator.__init__-expanded"><a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_base64string</tt> <tt class="py-op">=</tt> <tt class="py-name">base64</tt><tt class="py-op">.</tt><tt class="py-name">encodestring</tt><tt class="py-op">(</tt><tt class="py-string">"%s:%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_x_auth_header</tt> <tt class="py-op">=</tt> <tt class="py-string">'OAuth oauth_consumer_key="%s" oauth_consumer_secret="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">consumer</tt><tt class="py-op">,</tt> <tt class="py-name">consumer_secret</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> </tt>
|
||||
<a name="BasicAuthenticator.augment_request"></a><div id="BasicAuthenticator.augment_request-def"><a name="L189"></a><tt class="py-lineno">189</tt> <a class="py-toggle" href="#" id="BasicAuthenticator.augment_request-toggle" onclick="return toggle('BasicAuthenticator.augment_request');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.authentication.BasicAuthenticator-class.html#augment_request">augment_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">req</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="BasicAuthenticator.augment_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="BasicAuthenticator.augment_request-expanded"><a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt class="py-name">req</tt><tt class="py-op">.</tt><tt class="py-name">add_header</tt><tt class="py-op">(</tt><tt class="py-string">"Authorization"</tt><tt class="py-op">,</tt> <tt class="py-string">"Basic %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_base64string</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt class="py-name">req</tt><tt class="py-op">.</tt><tt class="py-name">add_header</tt><tt class="py-op">(</tt><tt class="py-string">"X-Authorization"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_x_auth_header</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:50 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,267 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.authentication.BasicAuthenticator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.authentication-module.html" onclick="show_private();">Module authentication</a> ::
|
||||
Class BasicAuthenticator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.authentication.BasicAuthenticator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class BasicAuthenticator</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.authentication-pysrc.html#BasicAuthenticator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">BasicAuthenticator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.authentication.BasicAuthenticator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">user</span>,
|
||||
<span class="summary-sig-arg">password</span>,
|
||||
<span class="summary-sig-arg">consumer</span>,
|
||||
<span class="summary-sig-arg">consumer_secret</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#BasicAuthenticator.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="augment_request"></a><span class="summary-sig-name">augment_request</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">req</span>,
|
||||
<span class="summary-sig-arg">parameters</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#BasicAuthenticator.augment_request">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">user</span>,
|
||||
<span class="sig-arg">password</span>,
|
||||
<span class="sig-arg">consumer</span>,
|
||||
<span class="sig-arg">consumer_secret</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi.authentication-pysrc.html#BasicAuthenticator.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,337 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.authentication.OAuthAuthenticator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.authentication-module.html" onclick="show_private();">Module authentication</a> ::
|
||||
Class OAuthAuthenticator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.authentication.OAuthAuthenticator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class OAuthAuthenticator</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">OAuthAuthenticator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.authentication.OAuthAuthenticator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">consumer</span>,
|
||||
<span class="summary-sig-arg">consumer_secret</span>,
|
||||
<span class="summary-sig-arg">token</span>,
|
||||
<span class="summary-sig-arg">secret</span>,
|
||||
<span class="summary-sig-arg">signature_method</span>=<span class="summary-sig-default">OAuthSignatureMethod_HMAC_SHA1()</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="augment_request"></a><span class="summary-sig-name">augment_request</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">req</span>,
|
||||
<span class="summary-sig-arg">parameters</span>,
|
||||
<span class="summary-sig-arg">use_multipart</span>=<span class="summary-sig-default">False</span>,
|
||||
<span class="summary-sig-arg">oauth_callback</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">oauth_verifier</span>=<span class="summary-sig-default">None</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator.augment_request">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="generate_timestamp"></a><span class="summary-sig-name">generate_timestamp</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator.generate_timestamp">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="generate_nonce"></a><span class="summary-sig-name">generate_nonce</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">length</span>=<span class="summary-sig-default">8</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator.generate_nonce">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="OAUTH_API_VERSION"></a><span class="summary-name">OAUTH_API_VERSION</span> = <code title="'1.0'"><code class="variable-quote">'</code><code class="variable-string">1.0</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="AUTHORIZATION_HEADER"></a><span class="summary-name">AUTHORIZATION_HEADER</span> = <code title="'Authorization'"><code class="variable-quote">'</code><code class="variable-string">Authorization</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">consumer</span>,
|
||||
<span class="sig-arg">consumer_secret</span>,
|
||||
<span class="sig-arg">token</span>,
|
||||
<span class="sig-arg">secret</span>,
|
||||
<span class="sig-arg">signature_method</span>=<span class="sig-default">OAuthSignatureMethod_HMAC_SHA1()</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthAuthenticator.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,294 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.authentication.OAuthSignatureMethod_HMAC_SHA1</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.authentication-module.html" onclick="show_private();">Module authentication</a> ::
|
||||
Class OAuthSignatureMethod_HMAC_SHA1
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.authentication.OAuthSignatureMethod_HMAC_SHA1-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class OAuthSignatureMethod_HMAC_SHA1</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">OAuthSignatureMethod_HMAC_SHA1</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_name"></a><span class="summary-sig-name">get_name</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1.get_name">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="build_signature"></a><span class="summary-sig-name">build_signature</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>,
|
||||
<span class="summary-sig-arg">parameters</span>,
|
||||
<span class="summary-sig-arg">consumer_secret</span>,
|
||||
<span class="summary-sig-arg">token_secret</span>,
|
||||
<span class="summary-sig-arg">oauth_parameters</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1.build_signature">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_normalized_http_method"></a><span class="summary-sig-name">get_normalized_http_method</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_method">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_normalized_http_url"></a><span class="summary-sig-name">get_normalized_http_url</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1.get_normalized_http_url">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_normalized_parameters"></a><span class="summary-sig-name">get_normalized_parameters</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">params</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.authentication-pysrc.html#OAuthSignatureMethod_HMAC_SHA1.get_normalized_parameters">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="FORBIDDEN"></a><span class="summary-name">FORBIDDEN</span> = <code title="['realm', 'oauth_signature']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">realm</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">oauth_signature</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.config</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module config
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.config-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module config</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.config-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.config</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module config
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.config-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="scapi.config-module.html">Module scapi.config</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:50 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,218 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module json
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module json</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json._StringGenerator-class.html" class="summary-name" onclick="show_private();">_StringGenerator</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.WriteException-class.html" class="summary-name">WriteException</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.ReadException-class.html" class="summary-name">ReadException</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.JsonReader-class.html" class="summary-name">JsonReader</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.JsonWriter-class.html" class="summary-name">JsonWriter</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== FUNCTIONS ==================== -->
|
||||
<a name="section-Functions"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Functions</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Functions"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">obj</span>,
|
||||
<span class="summary-sig-arg">escaped_forward_slash</span>=<span class="summary-sig-default">False</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#write">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">s</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#read">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,433 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Module json
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="scapi.json-module.html">Module scapi.json</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">string</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">types</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment">## json.py implements a JSON (http://json.org) reader and writer.</tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Copyright (C) 2005 Patrick D. Logan</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Contact mailto:patrickdlogan@stardecisions.com</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## This library is free software; you can redistribute it and/or</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## modify it under the terms of the GNU Lesser General Public</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## License as published by the Free Software Foundation; either</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## version 2.1 of the License, or (at your option) any later version.</tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## This library is distributed in the hope that it will be useful,</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Lesser General Public License for more details.</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## You should have received a copy of the GNU Lesser General Public</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## License along with this library; if not, write to the Free Software</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> </tt>
|
||||
<a name="_StringGenerator"></a><div id="_StringGenerator-def"><a name="L23"></a><tt class="py-lineno"> 23</tt> <a class="py-toggle" href="#" id="_StringGenerator-toggle" onclick="return toggle('_StringGenerator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.json._StringGenerator-class.html">_StringGenerator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="_StringGenerator-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_StringGenerator-expanded"><a name="_StringGenerator.__init__"></a><div id="_StringGenerator.__init__-def"><a name="L24"></a><tt class="py-lineno"> 24</tt> <a class="py-toggle" href="#" id="_StringGenerator.__init__-toggle" onclick="return toggle('_StringGenerator.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json._StringGenerator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="_StringGenerator.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="_StringGenerator.__init__-expanded"><a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">index</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
|
||||
</div><a name="_StringGenerator.peek"></a><div id="_StringGenerator.peek-def"><a name="L27"></a><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="_StringGenerator.peek-toggle" onclick="return toggle('_StringGenerator.peek');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json._StringGenerator-class.html#peek">peek</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="_StringGenerator.peek-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="_StringGenerator.peek-expanded"><a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">index</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op"><</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
|
||||
</div><a name="_StringGenerator.next"></a><div id="_StringGenerator.next-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="_StringGenerator.next-toggle" onclick="return toggle('_StringGenerator.next');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json._StringGenerator-class.html#next">next</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="_StringGenerator.next-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="_StringGenerator.next-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">index</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">index</tt> <tt class="py-op"><</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">index</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">StopIteration</tt> </tt>
|
||||
</div><a name="_StringGenerator.all"></a><div id="_StringGenerator.all-def"><a name="L39"></a><tt class="py-lineno"> 39</tt> <a class="py-toggle" href="#" id="_StringGenerator.all-toggle" onclick="return toggle('_StringGenerator.all');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json._StringGenerator-class.html#all">all</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="_StringGenerator.all-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="_StringGenerator.all-expanded"><a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">string</tt> </tt>
|
||||
</div></div><a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> </tt>
|
||||
<a name="WriteException"></a><div id="WriteException-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="WriteException-toggle" onclick="return toggle('WriteException');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.json.WriteException-class.html">WriteException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="WriteException-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="WriteException-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> </tt>
|
||||
<a name="ReadException"></a><div id="ReadException-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="ReadException-toggle" onclick="return toggle('ReadException');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.json.ReadException-class.html">ReadException</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ReadException-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ReadException-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader"></a><div id="JsonReader-def"><a name="L48"></a><tt class="py-lineno"> 48</tt> <a class="py-toggle" href="#" id="JsonReader-toggle" onclick="return toggle('JsonReader');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html">JsonReader</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="JsonReader-expanded"><a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt id="link-0" class="py-name" targets="Variable scapi.json.JsonReader.hex_digits=scapi.json.JsonReader-class.html#hex_digits"><a title="scapi.json.JsonReader.hex_digits" class="py-name" href="#" onclick="return doclink('link-0', 'hex_digits', 'link-0');">hex_digits</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'A'</tt><tt class="py-op">:</tt> <tt class="py-number">10</tt><tt class="py-op">,</tt><tt class="py-string">'B'</tt><tt class="py-op">:</tt> <tt class="py-number">11</tt><tt class="py-op">,</tt><tt class="py-string">'C'</tt><tt class="py-op">:</tt> <tt class="py-number">12</tt><tt class="py-op">,</tt><tt class="py-string">'D'</tt><tt class="py-op">:</tt> <tt class="py-number">13</tt><tt class="py-op">,</tt><tt class="py-string">'E'</tt><tt class="py-op">:</tt> <tt class="py-number">14</tt><tt class="py-op">,</tt><tt class="py-string">'F'</tt><tt class="py-op">:</tt><tt class="py-number">15</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt id="link-1" class="py-name" targets="Variable scapi.json.JsonReader.escapes=scapi.json.JsonReader-class.html#escapes"><a title="scapi.json.JsonReader.escapes" class="py-name" href="#" onclick="return doclink('link-1', 'escapes', 'link-1');">escapes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'t'</tt><tt class="py-op">:</tt><tt class="py-string">'\t'</tt><tt class="py-op">,</tt><tt class="py-string">'n'</tt><tt class="py-op">:</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt><tt class="py-string">'f'</tt><tt class="py-op">:</tt><tt class="py-string">'\f'</tt><tt class="py-op">,</tt><tt class="py-string">'r'</tt><tt class="py-op">:</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt><tt class="py-string">'b'</tt><tt class="py-op">:</tt><tt class="py-string">'\b'</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader.read"></a><div id="JsonReader.read-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="JsonReader.read-toggle" onclick="return toggle('JsonReader.read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader.read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader.read-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name" targets="Class scapi.json._StringGenerator=scapi.json._StringGenerator-class.html"><a title="scapi.json._StringGenerator" class="py-name" href="#" onclick="return doclink('link-2', '_StringGenerator', 'link-2');">_StringGenerator</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method scapi.json.JsonReader._read()=scapi.json.JsonReader-class.html#_read"><a title="scapi.json.JsonReader._read" class="py-name" href="#" onclick="return doclink('link-3', '_read', 'link-3');">_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._read"></a><div id="JsonReader._read-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="JsonReader._read-toggle" onclick="return toggle('JsonReader._read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_read">_read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._read-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method scapi.json.JsonReader._eatWhitespace()=scapi.json.JsonReader-class.html#_eatWhitespace"><a title="scapi.json.JsonReader._eatWhitespace" class="py-name" href="#" onclick="return doclink('link-4', '_eatWhitespace', 'link-4');">_eatWhitespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt id="link-5" class="py-name" targets="Method scapi.json._StringGenerator.peek()=scapi.json._StringGenerator-class.html#peek"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-5', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method scapi.json.JsonReader._peek()=scapi.json.JsonReader-class.html#_peek"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-6', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-7" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-7', 'peek', 'link-5');">peek</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-8" class="py-name" targets="Class scapi.json.ReadException=scapi.json.ReadException-class.html"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-8', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Nothing to read: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method scapi.json._StringGenerator.all()=scapi.json._StringGenerator-class.html#all"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-9', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-10" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-10', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'{'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method scapi.json.JsonReader._readObject()=scapi.json.JsonReader-class.html#_readObject"><a title="scapi.json.JsonReader._readObject" class="py-name" href="#" onclick="return doclink('link-11', '_readObject', 'link-11');">_readObject</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-12" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-12', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'['</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method scapi.json.JsonReader._readArray()=scapi.json.JsonReader-class.html#_readArray"><a title="scapi.json.JsonReader._readArray" class="py-name" href="#" onclick="return doclink('link-13', '_readArray', 'link-13');">_readArray</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-14" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-14', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method scapi.json.JsonReader._readString()=scapi.json.JsonReader-class.html#_readString"><a title="scapi.json.JsonReader._readString" class="py-name" href="#" onclick="return doclink('link-15', '_readString', 'link-15');">_readString</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-16" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-16', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'-'</tt> <tt class="py-keyword">or</tt> <tt id="link-17" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-17', 'peek', 'link-5');">peek</a></tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method scapi.json.JsonReader._readNumber()=scapi.json.JsonReader-class.html#_readNumber"><a title="scapi.json.JsonReader._readNumber" class="py-name" href="#" onclick="return doclink('link-18', '_readNumber', 'link-18');">_readNumber</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-19" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-19', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'t'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method scapi.json.JsonReader._readTrue()=scapi.json.JsonReader-class.html#_readTrue"><a title="scapi.json.JsonReader._readTrue" class="py-name" href="#" onclick="return doclink('link-20', '_readTrue', 'link-20');">_readTrue</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-21" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-21', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'f'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method scapi.json.JsonReader._readFalse()=scapi.json.JsonReader-class.html#_readFalse"><a title="scapi.json.JsonReader._readFalse" class="py-name" href="#" onclick="return doclink('link-22', '_readFalse', 'link-22');">_readFalse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-23" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-23', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'n'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Method scapi.json.JsonReader._readNull()=scapi.json.JsonReader-class.html#_readNull"><a title="scapi.json.JsonReader._readNull" class="py-name" href="#" onclick="return doclink('link-24', '_readNull', 'link-24');">_readNull</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-25" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-25', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method scapi.json.JsonReader._readComment()=scapi.json.JsonReader-class.html#_readComment"><a title="scapi.json.JsonReader._readComment" class="py-name" href="#" onclick="return doclink('link-26', '_readComment', 'link-26');">_readComment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="scapi.json.JsonReader._read" class="py-name" href="#" onclick="return doclink('link-27', '_read', 'link-3');">_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-28" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-28', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Input is not valid JSON: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-29', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readTrue"></a><div id="JsonReader._readTrue-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="JsonReader._readTrue-toggle" onclick="return toggle('JsonReader._readTrue');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readTrue">_readTrue</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readTrue-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readTrue-expanded"><a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method scapi.json.JsonReader._assertNext()=scapi.json.JsonReader-class.html#_assertNext"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-30', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'t'</tt><tt class="py-op">,</tt> <tt class="py-string">"true"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-31', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'r'</tt><tt class="py-op">,</tt> <tt class="py-string">"true"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-32', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'u'</tt><tt class="py-op">,</tt> <tt class="py-string">"true"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-33', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'e'</tt><tt class="py-op">,</tt> <tt class="py-string">"true"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
|
||||
</div><a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readFalse"></a><div id="JsonReader._readFalse-def"><a name="L89"></a><tt class="py-lineno"> 89</tt> <a class="py-toggle" href="#" id="JsonReader._readFalse-toggle" onclick="return toggle('JsonReader._readFalse');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readFalse">_readFalse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readFalse-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readFalse-expanded"><a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-34', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'f'</tt><tt class="py-op">,</tt> <tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-35', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'a'</tt><tt class="py-op">,</tt> <tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-36', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'l'</tt><tt class="py-op">,</tt> <tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-37', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'s'</tt><tt class="py-op">,</tt> <tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-38', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'e'</tt><tt class="py-op">,</tt> <tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
|
||||
</div><a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readNull"></a><div id="JsonReader._readNull-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="JsonReader._readNull-toggle" onclick="return toggle('JsonReader._readNull');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readNull">_readNull</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readNull-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readNull-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-39', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'n'</tt><tt class="py-op">,</tt> <tt class="py-string">"null"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-40', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'u'</tt><tt class="py-op">,</tt> <tt class="py-string">"null"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-41', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'l'</tt><tt class="py-op">,</tt> <tt class="py-string">"null"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="scapi.json.JsonReader._assertNext" class="py-name" href="#" onclick="return doclink('link-42', '_assertNext', 'link-30');">_assertNext</a></tt><tt class="py-op">(</tt><tt class="py-string">'l'</tt><tt class="py-op">,</tt> <tt class="py-string">"null"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
|
||||
</div><a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._assertNext"></a><div id="JsonReader._assertNext-def"><a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="JsonReader._assertNext-toggle" onclick="return toggle('JsonReader._assertNext');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_assertNext">_assertNext</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ch</tt><tt class="py-op">,</tt> <tt class="py-param">target</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._assertNext-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._assertNext-expanded"><a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method scapi.json.JsonReader._next()=scapi.json.JsonReader-class.html#_next"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-43', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">ch</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-44" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-44', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Trying to read %s: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">target</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-45', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readNumber"></a><div id="JsonReader._readNumber-def"><a name="L108"></a><tt class="py-lineno">108</tt> <a class="py-toggle" href="#" id="JsonReader._readNumber-toggle" onclick="return toggle('JsonReader._readNumber');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readNumber">_readNumber</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readNumber-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readNumber-expanded"><a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-name">isfloat</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
|
||||
<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-46', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt id="link-47" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-47', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-48', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt id="link-49" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-49', 'peek', 'link-5');">peek</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt id="link-50" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-50', 'peek', 'link-5');">peek</a></tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt id="link-51" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-51', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"."</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-name">isfloat</tt> <tt class="py-op">=</tt> <tt class="py-name">isfloat</tt> <tt class="py-keyword">or</tt> <tt id="link-52" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-52', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">==</tt> <tt class="py-string">"."</tt> </tt>
|
||||
<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-53', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt id="link-54" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-54', 'peek', 'link-5');">peek</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-55', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">isfloat</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-56" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-56', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON number: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readString"></a><div id="JsonReader._readString-def"><a name="L124"></a><tt class="py-lineno">124</tt> <a class="py-toggle" href="#" id="JsonReader._readString-toggle" onclick="return toggle('JsonReader._readString');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readString">_readString</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readString-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readString-expanded"><a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
|
||||
<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-57', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt> </tt>
|
||||
<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-58', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-string">'"'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-59', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ch</tt> <tt class="py-op">==</tt> <tt class="py-string">"\\"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-60', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ch</tt> <tt class="py-keyword">in</tt> <tt class="py-string">'brnft'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="scapi.json.JsonReader.escapes" class="py-name" href="#" onclick="return doclink('link-61', 'escapes', 'link-1');">escapes</a></tt><tt class="py-op">[</tt><tt class="py-name">ch</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ch</tt> <tt class="py-op">==</tt> <tt class="py-string">"u"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-name">ch4096</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-62', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-name">ch256</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-63', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-name">ch16</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-64', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-name">ch1</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-65', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-number">4096</tt> <tt class="py-op">*</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Method scapi.json.JsonReader._hexDigitToInt()=scapi.json.JsonReader-class.html#_hexDigitToInt"><a title="scapi.json.JsonReader._hexDigitToInt" class="py-name" href="#" onclick="return doclink('link-66', '_hexDigitToInt', 'link-66');">_hexDigitToInt</a></tt><tt class="py-op">(</tt><tt class="py-name">ch4096</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">+=</tt> <tt class="py-number">256</tt> <tt class="py-op">*</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="scapi.json.JsonReader._hexDigitToInt" class="py-name" href="#" onclick="return doclink('link-67', '_hexDigitToInt', 'link-66');">_hexDigitToInt</a></tt><tt class="py-op">(</tt><tt class="py-name">ch256</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">+=</tt> <tt class="py-number">16</tt> <tt class="py-op">*</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="scapi.json.JsonReader._hexDigitToInt" class="py-name" href="#" onclick="return doclink('link-68', '_hexDigitToInt', 'link-66');">_hexDigitToInt</a></tt><tt class="py-op">(</tt><tt class="py-name">ch16</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="scapi.json.JsonReader._hexDigitToInt" class="py-name" href="#" onclick="return doclink('link-69', '_hexDigitToInt', 'link-66');">_hexDigitToInt</a></tt><tt class="py-op">(</tt><tt class="py-name">ch1</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">unichr</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ch</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-string">'"/\\'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-70" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-70', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid escaped JSON character: '%s' in %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">ch</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-71', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt> <tt class="py-op">+</tt> <tt class="py-name">ch</tt> </tt>
|
||||
<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">StopIteration</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-72" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-72', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON string: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-73', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-74', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt> </tt>
|
||||
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._hexDigitToInt"></a><div id="JsonReader._hexDigitToInt-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="JsonReader._hexDigitToInt-toggle" onclick="return toggle('JsonReader._hexDigitToInt');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_hexDigitToInt">_hexDigitToInt</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ch</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._hexDigitToInt-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._hexDigitToInt-expanded"><a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="scapi.json.JsonReader.hex_digits" class="py-name" href="#" onclick="return doclink('link-75', 'hex_digits', 'link-0');">hex_digits</a></tt><tt class="py-op">[</tt><tt class="py-name">ch</tt><tt class="py-op">.</tt><tt class="py-name">upper</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">ch</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-76" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-76', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"The character %s is not a hex digit."</tt> <tt class="py-op">%</tt> <tt class="py-name">ch</tt> </tt>
|
||||
<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readComment"></a><div id="JsonReader._readComment-def"><a name="L162"></a><tt class="py-lineno">162</tt> <a class="py-toggle" href="#" id="JsonReader._readComment-toggle" onclick="return toggle('JsonReader._readComment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readComment">_readComment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readComment-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readComment-expanded"><a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-77', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"/"</tt> </tt>
|
||||
<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-name">second</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-78', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">second</tt> <tt class="py-op">==</tt> <tt class="py-string">"/"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Method scapi.json.JsonReader._readDoubleSolidusComment()=scapi.json.JsonReader-class.html#_readDoubleSolidusComment"><a title="scapi.json.JsonReader._readDoubleSolidusComment" class="py-name" href="#" onclick="return doclink('link-79', '_readDoubleSolidusComment', 'link-79');">_readDoubleSolidusComment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">second</tt> <tt class="py-op">==</tt> <tt class="py-string">'*'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name" targets="Method scapi.json.JsonReader._readCStyleComment()=scapi.json.JsonReader-class.html#_readCStyleComment"><a title="scapi.json.JsonReader._readCStyleComment" class="py-name" href="#" onclick="return doclink('link-80', '_readCStyleComment', 'link-80');">_readCStyleComment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-81" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-81', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON comment: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-82', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readCStyleComment"></a><div id="JsonReader._readCStyleComment-def"><a name="L172"></a><tt class="py-lineno">172</tt> <a class="py-toggle" href="#" id="JsonReader._readCStyleComment-toggle" onclick="return toggle('JsonReader._readCStyleComment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readCStyleComment">_readCStyleComment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readCStyleComment-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readCStyleComment-expanded"><a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
|
||||
<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-83', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">ch</tt> <tt class="py-op">==</tt> <tt class="py-string">"*"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-84', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"/"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ch</tt> <tt class="py-op">==</tt> <tt class="py-string">"/"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-85', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"*"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-86" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-86', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON comment: %s, '/*' cannot be embedded in the comment."</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-87', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-88', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">StopIteration</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-89" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-89', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON comment: %s, expected */"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-90', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readDoubleSolidusComment"></a><div id="JsonReader._readDoubleSolidusComment-def"><a name="L184"></a><tt class="py-lineno">184</tt> <a class="py-toggle" href="#" id="JsonReader._readDoubleSolidusComment-toggle" onclick="return toggle('JsonReader._readDoubleSolidusComment');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readDoubleSolidusComment">_readDoubleSolidusComment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readDoubleSolidusComment-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readDoubleSolidusComment-expanded"><a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-91', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">ch</tt> <tt class="py-op">!=</tt> <tt class="py-string">"\r"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ch</tt> <tt class="py-op">!=</tt> <tt class="py-string">"\n"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-92', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">StopIteration</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readArray"></a><div id="JsonReader._readArray-def"><a name="L192"></a><tt class="py-lineno">192</tt> <a class="py-toggle" href="#" id="JsonReader._readArray-toggle" onclick="return toggle('JsonReader._readArray');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readArray">_readArray</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readArray-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readArray-expanded"><a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-93', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'['</tt> </tt>
|
||||
<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-94', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">']'</tt> </tt>
|
||||
<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="scapi.json.JsonReader._read" class="py-name" href="#" onclick="return doclink('link-95', '_read', 'link-3');">_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="scapi.json.JsonReader._eatWhitespace" class="py-name" href="#" onclick="return doclink('link-96', '_eatWhitespace', 'link-4');">_eatWhitespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-97', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">']'</tt> </tt>
|
||||
<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-98', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ch</tt> <tt class="py-op">!=</tt> <tt class="py-string">","</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-99" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-99', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON array: '%s' due to: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-100', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">ch</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-string">']'</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-101', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._readObject"></a><div id="JsonReader._readObject-def"><a name="L208"></a><tt class="py-lineno">208</tt> <a class="py-toggle" href="#" id="JsonReader._readObject-toggle" onclick="return toggle('JsonReader._readObject');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_readObject">_readObject</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._readObject-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._readObject-expanded"><a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-102', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'{'</tt> </tt>
|
||||
<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-103', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'}'</tt> </tt>
|
||||
<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="scapi.json.JsonReader._read" class="py-name" href="#" onclick="return doclink('link-104', '_read', 'link-3');">_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">StringType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-105" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-105', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON object key (should be a string): %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">key</tt> </tt>
|
||||
<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="scapi.json.JsonReader._eatWhitespace" class="py-name" href="#" onclick="return doclink('link-106', '_eatWhitespace', 'link-4');">_eatWhitespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-107', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ch</tt> <tt class="py-op">!=</tt> <tt class="py-string">":"</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-108" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-108', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON object: '%s' due to: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-109', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">ch</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="scapi.json.JsonReader._eatWhitespace" class="py-name" href="#" onclick="return doclink('link-110', '_eatWhitespace', 'link-4');">_eatWhitespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-name">val</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="scapi.json.JsonReader._read" class="py-name" href="#" onclick="return doclink('link-111', '_read', 'link-3');">_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">val</tt> </tt>
|
||||
<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name"><a title="scapi.json.JsonReader._eatWhitespace" class="py-name" href="#" onclick="return doclink('link-112', '_eatWhitespace', 'link-4');">_eatWhitespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> <tt class="py-name">done</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-113', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'}'</tt> </tt>
|
||||
<a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">done</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-name">ch</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-114', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ch</tt> <tt class="py-op">!=</tt> <tt class="py-string">","</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-115" class="py-name"><a title="scapi.json.ReadException" class="py-name" href="#" onclick="return doclink('link-115', 'ReadException', 'link-8');">ReadException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Not a valid JSON array: '%s' due to: '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="scapi.json._StringGenerator.all" class="py-name" href="#" onclick="return doclink('link-116', 'all', 'link-9');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">ch</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-117', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"}"</tt> </tt>
|
||||
<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
|
||||
</div><a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._eatWhitespace"></a><div id="JsonReader._eatWhitespace-def"><a name="L232"></a><tt class="py-lineno">232</tt> <a class="py-toggle" href="#" id="JsonReader._eatWhitespace-toggle" onclick="return toggle('JsonReader._eatWhitespace');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_eatWhitespace">_eatWhitespace</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._eatWhitespace-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._eatWhitespace-expanded"><a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-118', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">p</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">p</tt> <tt class="py-keyword">in</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">whitespace</tt> <tt class="py-keyword">or</tt> <tt class="py-name">p</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">p</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="scapi.json.JsonReader._readComment" class="py-name" href="#" onclick="return doclink('link-119', '_readComment', 'link-26');">_readComment</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="scapi.json.JsonReader._next" class="py-name" href="#" onclick="return doclink('link-120', '_next', 'link-43');">_next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L239"></a><tt class="py-lineno">239</tt> <tt class="py-line"> <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="scapi.json.JsonReader._peek" class="py-name" href="#" onclick="return doclink('link-121', '_peek', 'link-6');">_peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._peek"></a><div id="JsonReader._peek-def"><a name="L241"></a><tt class="py-lineno">241</tt> <a class="py-toggle" href="#" id="JsonReader._peek-toggle" onclick="return toggle('JsonReader._peek');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_peek">_peek</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._peek-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._peek-expanded"><a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="scapi.json._StringGenerator.peek" class="py-name" href="#" onclick="return doclink('link-122', 'peek', 'link-5');">peek</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonReader._next"></a><div id="JsonReader._next-def"><a name="L244"></a><tt class="py-lineno">244</tt> <a class="py-toggle" href="#" id="JsonReader._next-toggle" onclick="return toggle('JsonReader._next');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonReader-class.html#_next">_next</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonReader._next-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonReader._next-expanded"><a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generator</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name" targets="Method scapi.json._StringGenerator.next()=scapi.json._StringGenerator-class.html#next"><a title="scapi.json._StringGenerator.next" class="py-name" href="#" onclick="return doclink('link-123', 'next', 'link-123');">next</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonWriter"></a><div id="JsonWriter-def"><a name="L247"></a><tt class="py-lineno">247</tt> <a class="py-toggle" href="#" id="JsonWriter-toggle" onclick="return toggle('JsonWriter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="scapi.json.JsonWriter-class.html">JsonWriter</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonWriter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="JsonWriter-expanded"><a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonWriter._append"></a><div id="JsonWriter._append-def"><a name="L249"></a><tt class="py-lineno">249</tt> <a class="py-toggle" href="#" id="JsonWriter._append-toggle" onclick="return toggle('JsonWriter._append');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonWriter-class.html#_append">_append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonWriter._append-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonWriter._append-expanded"><a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_results</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonWriter.write"></a><div id="JsonWriter.write-def"><a name="L252"></a><tt class="py-lineno">252</tt> <a class="py-toggle" href="#" id="JsonWriter.write-toggle" onclick="return toggle('JsonWriter.write');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonWriter-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">,</tt> <tt class="py-param">escaped_forward_slash</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonWriter.write-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonWriter.write-expanded"><a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_escaped_forward_slash</tt> <tt class="py-op">=</tt> <tt class="py-name">escaped_forward_slash</tt> </tt>
|
||||
<a name="L254"></a><tt class="py-lineno">254</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_results</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name" targets="Method scapi.json.JsonWriter._write()=scapi.json.JsonWriter-class.html#_write"><a title="scapi.json.JsonWriter._write" class="py-name" href="#" onclick="return doclink('link-124', '_write', 'link-124');">_write</a></tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">""</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_results</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> </tt>
|
||||
<a name="JsonWriter._write"></a><div id="JsonWriter._write-def"><a name="L258"></a><tt class="py-lineno">258</tt> <a class="py-toggle" href="#" id="JsonWriter._write-toggle" onclick="return toggle('JsonWriter._write');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json.JsonWriter-class.html#_write">_write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">obj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="JsonWriter._write-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="JsonWriter._write-expanded"><a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> <tt class="py-name">ty</tt> <tt class="py-op">=</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">DictType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name" targets="Method scapi.json.JsonWriter._append()=scapi.json.JsonWriter-class.html#_append"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-125', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"{"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">k</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name"><a title="scapi.json.JsonWriter._write" class="py-name" href="#" onclick="return doclink('link-126', '_write', 'link-124');">_write</a></tt><tt class="py-op">(</tt><tt class="py-name">k</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-127', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">":"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="scapi.json.JsonWriter._write" class="py-name" href="#" onclick="return doclink('link-128', '_write', 'link-124');">_write</a></tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
|
||||
<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">n</tt> <tt class="py-op">></tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-129', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">","</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-130', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">ListType</tt> <tt class="py-keyword">or</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">TupleType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-131', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"["</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">obj</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="scapi.json.JsonWriter._write" class="py-name" href="#" onclick="return doclink('link-132', '_write', 'link-124');">_write</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
|
||||
<a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">n</tt> <tt class="py-op">></tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-133', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">","</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-134', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"]"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">StringType</tt> <tt class="py-keyword">or</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">UnicodeType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L281"></a><tt class="py-lineno">281</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-135" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-135', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\\'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_escaped_forward_slash</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\/'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\"'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L286"></a><tt class="py-lineno">286</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\b'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\b'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\f'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\f'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L288"></a><tt class="py-lineno">288</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\n'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\r'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">obj</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\t'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\t'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-136', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-137', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L293"></a><tt class="py-lineno">293</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">IntType</tt> <tt class="py-keyword">or</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">LongType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-138', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">ty</tt> <tt class="py-keyword">is</tt> <tt class="py-name">types</tt><tt class="py-op">.</tt><tt class="py-name">FloatType</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L296"></a><tt class="py-lineno">296</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-139', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"%f"</tt> <tt class="py-op">%</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">obj</tt> <tt class="py-keyword">is</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L298"></a><tt class="py-lineno">298</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-140', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"true"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">obj</tt> <tt class="py-keyword">is</tt> <tt class="py-name">False</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-141', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"false"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">obj</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L302"></a><tt class="py-lineno">302</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="scapi.json.JsonWriter._append" class="py-name" href="#" onclick="return doclink('link-142', '_append', 'link-125');">_append</a></tt><tt class="py-op">(</tt><tt class="py-string">"null"</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt id="link-143" class="py-name" targets="Class scapi.json.WriteException=scapi.json.WriteException-class.html"><a title="scapi.json.WriteException" class="py-name" href="#" onclick="return doclink('link-143', 'WriteException', 'link-143');">WriteException</a></tt><tt class="py-op">,</tt> <tt class="py-string">"Cannot write in JSON: %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> </tt>
|
||||
<a name="write"></a><div id="write-def"><a name="L306"></a><tt class="py-lineno">306</tt> <a class="py-toggle" href="#" id="write-toggle" onclick="return toggle('write');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json-module.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">obj</tt><tt class="py-op">,</tt> <tt class="py-param">escaped_forward_slash</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="write-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="write-expanded"><a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-144" class="py-name" targets="Class scapi.json.JsonWriter=scapi.json.JsonWriter-class.html"><a title="scapi.json.JsonWriter" class="py-name" href="#" onclick="return doclink('link-144', 'JsonWriter', 'link-144');">JsonWriter</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name" targets="Method scapi.json.JsonWriter.write()=scapi.json.JsonWriter-class.html#write,Function scapi.json.write()=scapi.json-module.html#write"><a title="scapi.json.JsonWriter.write
|
||||
scapi.json.write" class="py-name" href="#" onclick="return doclink('link-145', 'write', 'link-145');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">escaped_forward_slash</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L308"></a><tt class="py-lineno">308</tt> <tt class="py-line"> </tt>
|
||||
<a name="read"></a><div id="read-def"><a name="L309"></a><tt class="py-lineno">309</tt> <a class="py-toggle" href="#" id="read-toggle" onclick="return toggle('read');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="scapi.json-module.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="read-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="read-expanded"><a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-146" class="py-name" targets="Class scapi.json.JsonReader=scapi.json.JsonReader-class.html"><a title="scapi.json.JsonReader" class="py-name" href="#" onclick="return doclink('link-146', 'JsonReader', 'link-146');">JsonReader</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name" targets="Method scapi.json.JsonReader.read()=scapi.json.JsonReader-class.html#read,Function scapi.json.read()=scapi.json-module.html#read"><a title="scapi.json.JsonReader.read
|
||||
scapi.json.read" class="py-name" href="#" onclick="return doclink('link-147', 'read', 'link-147');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:50 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,544 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json.JsonReader</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.json-module.html">Module json</a> ::
|
||||
Class JsonReader
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json.JsonReader-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class JsonReader</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html#JsonReader">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">JsonReader</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">s</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader.read">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_read"></a><span class="summary-sig-name">_read</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._read">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readTrue"></a><span class="summary-sig-name">_readTrue</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readTrue">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readFalse"></a><span class="summary-sig-name">_readFalse</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readFalse">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readNull"></a><span class="summary-sig-name">_readNull</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readNull">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_assertNext"></a><span class="summary-sig-name">_assertNext</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">ch</span>,
|
||||
<span class="summary-sig-arg">target</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._assertNext">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readNumber"></a><span class="summary-sig-name">_readNumber</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readNumber">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readString"></a><span class="summary-sig-name">_readString</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readString">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_hexDigitToInt"></a><span class="summary-sig-name">_hexDigitToInt</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">ch</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._hexDigitToInt">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readComment"></a><span class="summary-sig-name">_readComment</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readComment">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readCStyleComment"></a><span class="summary-sig-name">_readCStyleComment</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readCStyleComment">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readDoubleSolidusComment"></a><span class="summary-sig-name">_readDoubleSolidusComment</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readDoubleSolidusComment">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readArray"></a><span class="summary-sig-name">_readArray</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readArray">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_readObject"></a><span class="summary-sig-name">_readObject</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._readObject">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_eatWhitespace"></a><span class="summary-sig-name">_eatWhitespace</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._eatWhitespace">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_peek"></a><span class="summary-sig-name">_peek</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._peek">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_next"></a><span class="summary-sig-name">_next</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonReader._next">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.JsonReader-class.html#hex_digits" class="summary-name">hex_digits</a> = <code title="{'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">: </code>10<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">B</code><code class="variable-quote">'</code><code class="variable-op">: </code>11<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">C</code><code class="variable-quote">'</code><code class="variable-op">: </code>12<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-quote">'</code><code class="variable-op">: </code>13<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">E</code><code class="variable-quote">'</code><code class="variable-op">: </code>14<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">F</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="scapi.json.JsonReader-class.html#escapes" class="summary-name">escapes</a> = <code title="{'b': '\x08', 'f': '\x0c', 'n': '\n', 'r': '\r', 't': '\t'}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x08</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">f</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x0c</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">n</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\n</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\r</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">t</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
|
||||
<a name="section-ClassVariableDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variable Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariableDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="hex_digits"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">hex_digits</h3>
|
||||
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">: </code>10<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">B</code><code class="variable-quote">'</code><code class="variable-op">: </code>11<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">C</code><code class="variable-quote">'</code><code class="variable-op">: </code>12<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-quote">'</code><code class="variable-op">: </code>13<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">E</code><code class="variable-quote">'</code><code class="variable-op">: </code>14<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">F</code><code class="variable-quote">'</code><code class="variable-op">: </code>15<code class="variable-group">}</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="escapes"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">escapes</h3>
|
||||
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">b</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x08</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">f</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x0c</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">n</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\n</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\r</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">t</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\t</code><code class="variable-quote">'</code><code class="variable-group">}</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,233 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json.JsonWriter</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.json-module.html">Module json</a> ::
|
||||
Class JsonWriter
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json.JsonWriter-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class JsonWriter</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html#JsonWriter">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">JsonWriter</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_append"></a><span class="summary-sig-name">_append</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">s</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonWriter._append">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">obj</span>,
|
||||
<span class="summary-sig-arg">escaped_forward_slash</span>=<span class="summary-sig-default">False</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonWriter.write">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_write"></a><span class="summary-sig-name">_write</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">obj</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#JsonWriter._write">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,196 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json.ReadException</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.json-module.html">Module json</a> ::
|
||||
Class ReadException
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json.ReadException-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class ReadException</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html#ReadException">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
exceptions.BaseException --+
|
||||
|
|
||||
exceptions.Exception --+
|
||||
|
|
||||
<strong class="uidshort">ReadException</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,196 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json.WriteException</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.json-module.html">Module json</a> ::
|
||||
Class WriteException
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json.WriteException-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class WriteException</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html#WriteException">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
exceptions.BaseException --+
|
||||
|
|
||||
exceptions.Exception --+
|
||||
|
|
||||
<strong class="uidshort">WriteException</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.Exception</code></b>:
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__getitem__</code>,
|
||||
<code>__getslice__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__setstate__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__hash__</code>,
|
||||
<code>__reduce_ex__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>exceptions.BaseException</code></b>:
|
||||
<code>args</code>,
|
||||
<code>message</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,291 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.json._StringGenerator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
<a href="scapi.json-module.html">Module json</a> ::
|
||||
Class _StringGenerator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.json._StringGenerator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class _StringGenerator</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">_StringGenerator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="scapi.json._StringGenerator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">string</span>)</span><br />
|
||||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="peek"></a><span class="summary-sig-name">peek</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator.peek">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="next"></a><span class="summary-sig-name">next</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator.next">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="all"></a><span class="summary-sig-name">all</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator.all">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__str__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">string</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="scapi.json-pysrc.html#_StringGenerator.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>x.__init__(...) initializes x; see x.__class__.__doc__ for
|
||||
signature</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
<dd><em class="note">(inherited documentation)</em></dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.tests</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Package tests
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.tests-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package tests</h1><p class="nomargin-top"><span class="codelink"><a href="scapi.tests-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.scapi_tests-module.html">scapi.tests.scapi_tests</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_connect-module.html">scapi.tests.test_connect</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="scapi.tests.test_oauth-module.html">scapi.tests.test_oauth</a></strong> </li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>scapi.tests</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="scapi-module.html">Package scapi</a> ::
|
||||
Package tests
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="scapi.tests-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="scapi.tests-module.html">Package scapi.tests</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="scapi-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
>SoundCloud API</th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:50 2009
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue