rawsc.service.Query Class Reference

Inherits dict.

List of all members.


Detailed Description

Constructs a query URL to be used in GET requests

Url parameters are created by adding key-value pairs to this object as a dict. For example, to add &paginate_by=50 to the URL do my_query['paginate_by'] = 50

Category queries are created by adding category strings to the categories member. All items in the categories list will be concatenated with the / symbol (symbolizing a category x AND y restriction). If you would like to OR 2 categories, append them as one string with a | between the categories. For example, do query.categories.append('Fritz|Laurie') to create a query like this feed/-/Fritz7CLaurie . This query will look for results in both categories.

Public Member Functions

def __init__


Member Function Documentation

def rawsc.service.Query.__init__ (   self,
  feed = None,
  text_query = None,
  params = None,
  categories = None 
)

Constructor for Query

Args: feed: str (optional) The path for the feed (Examples: '/dir/mysubdir/' or 'customer/used/' text_query: str (optional) The contents of the q query parameter. The contents of the text_query are URL escaped upon conversion to a URI. params: dict (optional) Parameter value string pairs which become URL params when translated to a URI. These parameters are added to the query's items (key-value pairs). categories: list (optional) List of category strings which should be included as query categories. Currently not supported by RAWS. If you want to get results from category A or B (both categories), specify a single list item 'A|B'.


Generated on Mon Mar 28 15:03:40 2011 for rawsc by  doxygen 1.5.3