musixmatch.api.QueryString Class Reference
Inheritance diagram for musixmatch.api.QueryString:
Inheritance graph
Collaboration diagram for musixmatch.api.QueryString:
Collaboration graph

Public Member Functions

def __init__ (self, items=(), keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __iter__ (self)
 
def values (self)
 
def keys (self)
 
def items (self)
 
def __hash__ (self)
 
def __cmp__ (self, other)
 
def __init__ (self, items=(), keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __iter__ (self)
 
def values (self)
 
def keys (self)
 
def items (self)
 
def __hash__ (self)
 
def __cmp__ (self, other)
 
def __init__ (self, items=(), keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __iter__ (self)
 
def values (self)
 
def keys (self)
 
def items (self)
 
def __hash__ (self)
 
def __cmp__ (self, other)
 
def __init__ (self, items=(), keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __iter__ (self)
 
def values (self)
 
def keys (self)
 
def items (self)
 
def __hash__ (self)
 
def __cmp__ (self, other)
 

Detailed Description

A class representing  the keyword arguments to be used in HTTP requests as
query string. Takes a :py:class:`dict` of keywords, and encode values
using utf-8. Also, the query string is sorted by keyword name, so that its
string representation is always the same, thus can be used in hashes.

Casting a :py:class:`QueryString` to :py:class:`str` returns the urlencoded
query string:

>>> from musixmatch.api import QueryString
>>> str(QueryString({ 'country': 'it', 'page': 1, 'page_size': 3 }))
'country=it&page=1&page_size=3'

Using :py:func:`repr` on :py:class:`QueryString` returns an evaluable
representation of the current instance, excluding apikey value:

>>> from musixmatch.api import QueryString
>>> repr(QueryString({ 'country': 'it', 'page': 1, 'apikey': 'whatever'}))
"QueryString({'country': 'it', 'page': '1'})"

Definition at line 192 of file musixmatch-master/build/lib/musixmatch/api.py.

Constructor & Destructor Documentation

def musixmatch.api.QueryString.__init__ (   self,
  items = (),
  keywords 
)
def musixmatch.api.QueryString.__init__ (   self,
  items = (),
  keywords 
)

Definition at line 213 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__init__ (   self,
  items = (),
  keywords 
)
def musixmatch.api.QueryString.__init__ (   self,
  items = (),
  keywords 
)

Definition at line 213 of file Yading/musixmatch-master/musixmatch/api.py.

Member Function Documentation

def musixmatch.api.QueryString.__cmp__ (   self,
  other 
)
def musixmatch.api.QueryString.__cmp__ (   self,
  other 
)

Definition at line 252 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__cmp__ (   self,
  other 
)

Definition at line 252 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__cmp__ (   self,
  other 
)
def musixmatch.api.QueryString.__hash__ (   self)
def musixmatch.api.QueryString.__hash__ (   self)
def musixmatch.api.QueryString.__hash__ (   self)

Definition at line 249 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__hash__ (   self)

Definition at line 249 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__iter__ (   self)
Returns an iterator method which will yield keys sorted by name.
Sorting allow the query strings to be used (reasonably) as caching key.

Definition at line 227 of file Yading/musixmatch-master/build/lib/musixmatch/api.py.

def musixmatch.api.QueryString.__iter__ (   self)
Returns an iterator method which will yield keys sorted by name.
Sorting allow the query strings to be used (reasonably) as caching key.

Definition at line 227 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__iter__ (   self)
Returns an iterator method which will yield keys sorted by name.
Sorting allow the query strings to be used (reasonably) as caching key.

Definition at line 227 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__iter__ (   self)
Returns an iterator method which will yield keys sorted by name.
Sorting allow the query strings to be used (reasonably) as caching key.

Definition at line 227 of file musixmatch-master/build/lib/musixmatch/api.py.

Referenced by musixmatch.api.QueryString.__iter__().

def musixmatch.api.QueryString.__repr__ (   self)
def musixmatch.api.QueryString.__repr__ (   self)
def musixmatch.api.QueryString.__repr__ (   self)

Definition at line 221 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__repr__ (   self)

Definition at line 221 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__str__ (   self)
def musixmatch.api.QueryString.__str__ (   self)
def musixmatch.api.QueryString.__str__ (   self)

Definition at line 218 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.__str__ (   self)

Definition at line 218 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.items (   self)
Overloads :py:meth:`dict.item` using :py:meth:`__iter__`.

Definition at line 245 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.items (   self)
Overloads :py:meth:`dict.item` using :py:meth:`__iter__`.

Definition at line 245 of file musixmatch-master/build/lib/musixmatch/api.py.

Referenced by musixmatch.api.QueryString.items().

def musixmatch.api.QueryString.items (   self)
Overloads :py:meth:`dict.item` using :py:meth:`__iter__`.

Definition at line 245 of file Yading/musixmatch-master/build/lib/musixmatch/api.py.

def musixmatch.api.QueryString.items (   self)
Overloads :py:meth:`dict.item` using :py:meth:`__iter__`.

Definition at line 245 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.keys (   self)
Overloads :py:meth:`dict.keys` using :py:meth:`__iter__`.

Definition at line 241 of file Yading/musixmatch-master/build/lib/musixmatch/api.py.

def musixmatch.api.QueryString.keys (   self)
Overloads :py:meth:`dict.keys` using :py:meth:`__iter__`.

Definition at line 241 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.keys (   self)
Overloads :py:meth:`dict.keys` using :py:meth:`__iter__`.

Definition at line 241 of file musixmatch-master/build/lib/musixmatch/api.py.

Referenced by musixmatch.api.QueryString.keys().

def musixmatch.api.QueryString.keys (   self)
Overloads :py:meth:`dict.keys` using :py:meth:`__iter__`.

Definition at line 241 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.values (   self)
Overloads :py:meth:`dict.values` using :py:meth:`__iter__`.

Definition at line 237 of file Yading/musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.values (   self)
Overloads :py:meth:`dict.values` using :py:meth:`__iter__`.

Definition at line 237 of file musixmatch-master/musixmatch/api.py.

def musixmatch.api.QueryString.values (   self)
Overloads :py:meth:`dict.values` using :py:meth:`__iter__`.

Definition at line 237 of file Yading/musixmatch-master/build/lib/musixmatch/api.py.

def musixmatch.api.QueryString.values (   self)
Overloads :py:meth:`dict.values` using :py:meth:`__iter__`.

Definition at line 237 of file musixmatch-master/build/lib/musixmatch/api.py.

Referenced by musixmatch.api.QueryString.values().


The documentation for this class was generated from the following file: