Example #1
0
 def __init__(self, client_id, base_url, store_dir=None):
     """LastFMClient Constructor."""
     # Parent class constructor
     BaseClient.__init__(self, client_id, base_url, store_dir)
     # Informing the version of our ArticleRetriver
     self.headers["client-arver"] =  articleretriever_version
     # Registering Command Handlers
     self.handlers["FINDUSERS"] = self.findusers
     self.handlers["GETPROFILE"] = self.getprofile
     self.handlers["GETLIBRARY"] = self.getlibrary
Example #2
0
 def _write_to_store(self, article_id, data):
     """Write a (compressed) article to store.
     
     Article_id is turned into something filesystem safe here.
     """
     # FIXME - Must customize this function for lastfm content
     # FIXME - Must customize this function for lastfm content
     # FIXME - Must customize this function for lastfm content
     safe_id = article_id.replace('/', '_')
     safe_id += '.xml.gz'
     BaseClient._write_to_store(self, safe_id, data)