Ampache
[ class tree: Ampache ] [ index: Ampache ] [ all elements ]

Class: mp3tunes

Source Location: /modules/infotools/mp3tunes.class.php

Class Overview


This class returns the XML data as a array of key'd arrays, attributes


Variables

Methods



Class Details

[line 39]
This class returns the XML data as a array of key'd arrays, attributes

are stored in [][__attributes] = array(); Any questions, recommendations bugfixes or the like please contact mystrands@ampache.org or visit us on irc.ampache.org #ampache

There are some bugs in this library, and some things that are a little redundent, I will be fixing it in future releases.

  • Karl Vollmer
REQUIREMENTS:
  • fopen wrappers enabled to allow file_get_contents(URL);
  • PHP5




[ Top ]


Class Variables

$_containerTag =

[line 59]



Tags:

access:  public

Type:   mixed


[ Top ]

$_currentTag =

[line 58]



Tags:

access:  public

Type:   mixed


[ Top ]

$_grabtags =

[line 57]



Tags:

access:  public

Type:   mixed


[ Top ]

$_key =

[line 60]



Tags:

access:  public

Type:   mixed


[ Top ]

$_parser =

[line 56]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method set_auth_token [line 352]

static void set_auth_token( $token)

set_auth_token

This function should be called on load to set the auth_token, if you don't just hardcode it, also allows realtime switching between auth tokens so that users can use their own limits when querying




Tags:

access:  public


Parameters:

   $token  

[ Top ]

constructor __construct [line 67]

mp3tunes __construct( $username, $password)

Constructor

This takes a username and password, and verifys that this account exists before it will let the person actually try to run any operations




Tags:

access:  public


Parameters:

   $username  
   $password  

[ Top ]

method cdata [line 455]

void cdata( $parser, $cdata)



Parameters:

   $parser  
   $cdata  

[ Top ]

method create_parser [line 418]

void create_parser( )

create_parser

this sets up an XML Parser




Tags:

access:  public


[ Top ]

method end_element [line 466]

void end_element( $parser, $tag)



Parameters:

   $parser  
   $tag  

[ Top ]

method last_update [line 133]

void last_update( )

last_update

This returns a timestamp of the last time that the locker was updated usefull for caching operations




Tags:

access:  public


[ Top ]

method lookup_albums [line 182]

void lookup_albums( $ids)

lookup_albums

This returns the data for a given mp3tunes album (based on ID) If it's an array of ids pass as [] = ID, [] = ID




Tags:

access:  public


Parameters:

   $ids  

[ Top ]

method lookup_album_tracks [line 242]

void lookup_album_tracks( $mystrands_album_id, [ $alias = ''])

lookup_album_tracks

This takes a album ID and then returns the track list for it




Tags:

access:  public


Parameters:

   $mystrands_album_id  
   $alias  

[ Top ]

method lookup_artists [line 151]

void lookup_artists( $ids)

lookup_artists

This returns the data for a given mp3tunes artist (based on ID) If it's an array of ids pass as [] = ID, [] = ID




Tags:

access:  public


Parameters:

   $ids  

[ Top ]

method lookup_artist_albums [line 262]

void lookup_artist_albums( $artist_id, [ $limit = ''], [ $offset = ''])

lookup_artist_albums

This returns a list of the albums for a given artist ID you can pass an optional limit and offset




Tags:

access:  public


Parameters:

   $artist_id  
   $limit  
   $offset  

[ Top ]

method lookup_tracks [line 213]

void lookup_tracks( $ids)

lookup_tracks

This returns the data for a given mp3tunes track (based on ID) If it's an array of ids pass as [] = ID, [] = ID




Tags:

access:  public


Parameters:

   $ids  

[ Top ]

method run_parse [line 391]

void run_parse( $xml_doc)

run_parse

This will create the parser, de-fudge the doc and set $this->results to the result data




Tags:

access:  public


Parameters:

   $xml_doc  

[ Top ]

method search_albums [line 284]

void search_albums( $name, [ $limit = ''], [ $offset = ''])

search_albums

This searches for albums of the given name in your locker




Tags:

access:  public


Parameters:

   $name  
   $limit  
   $offset  

[ Top ]

method search_artists [line 306]

void search_artists( $name, [ $limit = ''], [ $offset = ''])

search_artists

This searches for artists of the given name in your locker




Tags:

access:  public


Parameters:

   $name  
   $limit  
   $offset  

[ Top ]

method search_tracks [line 328]

void search_tracks( $name, [ $limit = ''], [ $offset = ''])

search_tracks

This searches for tracks on Mystrands based on the search text




Tags:

access:  public


Parameters:

   $name  
   $limit  
   $offset  

[ Top ]

method start_element [line 435]

void start_element( $parser, $tag, $attributes)

start_element

This is part of our internal XML parser




Parameters:

   $parser  
   $tag  
   $attributes  

[ Top ]

method user_lookup_profile [line 115]

void user_lookup_profile( )

user_lookup_profile

This can only be called after you have authenticated, it returns account information




Tags:

access:  public


[ Top ]

method user_validate [line 95]

void user_validate( $username, $password)

user_validate

This takes a username, password and returns a key'd array of the result data




Tags:

access:  public


Parameters:

   $username  
   $password  

[ Top ]


Documentation generated on Thu, 12 Feb 2009 08:00:00 +0900 by phpDocumentor 1.4.2