diff --git a/pylast.py b/pylast.py index 46db7e6..8a9ae14 100644 --- a/pylast.py +++ b/pylast.py @@ -422,33 +422,33 @@ class _Network(object): def search_for_album(self, album_name): """Searches for an album by its name. Returns a AlbumSearch object. - Use get_next_page() to retreive sequences of results.""" + Use get_next_page() to retrieve sequences of results.""" return AlbumSearch(album_name, self) def search_for_artist(self, artist_name): """Searches of an artist by its name. Returns a ArtistSearch object. - Use get_next_page() to retreive sequences of results.""" + Use get_next_page() to retrieve sequences of results.""" return ArtistSearch(artist_name, self) def search_for_tag(self, tag_name): """Searches of a tag by its name. Returns a TagSearch object. - Use get_next_page() to retreive sequences of results.""" + Use get_next_page() to retrieve sequences of results.""" return TagSearch(tag_name, self) def search_for_track(self, artist_name, track_name): """Searches of a track by its name and its artist. Set artist to an empty string if not available. Returns a TrackSearch object. - Use get_next_page() to retreive sequences of results.""" + Use get_next_page() to retrieve sequences of results.""" return TrackSearch(artist_name, track_name, self) def search_for_venue(self, venue_name, country_name): """Searches of a venue by its name and its country. Set country_name to an empty string if not available. Returns a VenueSearch object. - Use get_next_page() to retreive sequences of results.""" + Use get_next_page() to retrieve sequences of results.""" return VenueSearch(venue_name, country_name, self) @@ -915,7 +915,7 @@ class SessionKeyGenerator(object): self.web_auth_tokens = {} def _get_web_auth_token(self): - """Retreives a token from the network for web authentication. + """Retrieves a token from the network for web authentication. The token then has to be authorized from getAuthURL before creating session. """ @@ -943,7 +943,7 @@ class SessionKeyGenerator(object): return url def get_web_auth_session_key(self, url): - """Retreives the session key of a web authorization process by its url.""" + """Retrieves the session key of a web authorization process by its url.""" if url in self.web_auth_tokens.keys(): token = self.web_auth_tokens[url] @@ -961,7 +961,7 @@ class SessionKeyGenerator(object): return doc.getElementsByTagName('key')[0].firstChild.data def get_session_key(self, username, password_hash): - """Retreive a session key with a username and a md5 hash of the user's password.""" + """Retrieve a session key with a username and a md5 hash of the user's password.""" params = {"username": username, "authToken": md5(username + password_hash)} request = _Request(self.network, "auth.getMobileSession", params) @@ -3486,7 +3486,7 @@ class _Search(_BaseObject): return _extract(doc, "opensearch:totalResults") - def _retreive_page(self, page_index): + def _retrieve_page(self, page_index): """Returns the node of matches to be processed""" params = self._get_params() @@ -3495,9 +3495,9 @@ class _Search(_BaseObject): return doc.getElementsByTagName(self._ws_prefix + "matches")[0] - def _retreive_next_page(self): + def _retrieve_next_page(self): self._last_page_index += 1 - return self._retreive_page(self._last_page_index) + return self._retrieve_page(self._last_page_index) class AlbumSearch(_Search): """Search for an album by name.""" @@ -3509,7 +3509,7 @@ class AlbumSearch(_Search): def get_next_page(self): """Returns the next page of results as a sequence of Album objects.""" - master_node = self._retreive_next_page() + master_node = self._retrieve_next_page() seq = [] for node in master_node.getElementsByTagName("album"): @@ -3526,7 +3526,7 @@ class ArtistSearch(_Search): def get_next_page(self): """Returns the next page of results as a sequence of Artist objects.""" - master_node = self._retreive_next_page() + master_node = self._retrieve_next_page() seq = [] for node in master_node.getElementsByTagName("artist"): @@ -3546,7 +3546,7 @@ class TagSearch(_Search): def get_next_page(self): """Returns the next page of results as a sequence of Tag objects.""" - master_node = self._retreive_next_page() + master_node = self._retrieve_next_page() seq = [] for node in master_node.getElementsByTagName("tag"): @@ -3567,7 +3567,7 @@ class TrackSearch(_Search): def get_next_page(self): """Returns the next page of results as a sequence of Track objects.""" - master_node = self._retreive_next_page() + master_node = self._retrieve_next_page() seq = [] for node in master_node.getElementsByTagName("track"): @@ -3588,7 +3588,7 @@ class VenueSearch(_Search): def get_next_page(self): """Returns the next page of results as a sequence of Track objects.""" - master_node = self._retreive_next_page() + master_node = self._retrieve_next_page() seq = [] for node in master_node.getElementsByTagName("venue"):