#NEWLINE# def get( self , collection , entity = None , child = None , limit = None , include = None , full = None , page_limit = 100 , page_offset = 0 , sort_by = 'id' , get_all = False , parent = None , query = None , count = False , _url = None , _params = None ) : #NEWLINE# #INDENT# 'Main retrieval method for T1 Entities.\n\n        :param collection: str T1 collection, e.g. "advertisers", "agencies"\n        :param entity: int ID of entity being retrieved from T1\n        :param child: str child, e.g. "dma", "acl"\n        :param limit: dict[str]int query for relation entity, e.g. {"advertiser": 123456}\n        :param include: str/list of relations to include, e.g. "advertiser",\n            ["campaign", "advertiser"]\n        :param full: str/bool when retrieving multiple entities, specifies which\n            types to return the full record for.\n            e.g. "campaign", True, ["campaign", "advertiser"]\n        :param page_limit: int number of entities to return per query, 100 max\n        :param page_offset: int offset for results returned.\n        :param sort_by: str sort order. Default "id". e.g. "-id", "name"\n        :param get_all: bool whether to retrieve all results for a query or just a single page\n        :param parent: only return entities with this parent id\n        :param query: str search parameter. Invoked by `find`\n        :param count: bool return the number of entities as a second parameter\n        :param _url: str shortcut to bypass URL determination.\n        :param _params: dict query string parameters to bypass query determination\n        :return: If:\n            Collection is requested => generator over collection of entity objects\n            Entity ID is provided => Entity object\n            `count` is True => number of entities as second return val\n        :raise ClientError: if page_limit > 100\n        ' #NEWLINE# if ( ( type ( collection ) == type ) and issubclass ( collection , Entity ) ) : #NEWLINE# #INDENT# collection = MODEL_PATHS [ collection ] #NEWLINE# #UNINDENT# if ( page_limit > 100 ) : #NEWLINE# #INDENT# raise ClientError ( 'page_limit parameter must not exceed 100' ) #NEWLINE# #UNINDENT# child_id = None #NEWLINE# if ( _url is None ) : #NEWLINE# #INDENT# ( _url , child_id ) = self . _construct_url ( collection , entity , child , limit ) #NEWLINE# #UNINDENT# if get_all : #NEWLINE# #INDENT# gen = self . _get_all ( collection , entity = entity , child = child , include = include , full = full , sort_by = sort_by , parent = parent , query = query , count = count , _url = _url ) #NEWLINE# if count : #NEWLINE# #INDENT# ent_count = next ( gen ) #NEWLINE# return ( limit , ent_count ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return gen #NEWLINE# #UNINDENT# #UNINDENT# if ( _params is None ) : #NEWLINE# #INDENT# _params = self . _construct_params ( entity , include , full , page_limit , page_offset , sort_by , parent , query ) #NEWLINE# #UNINDENT# ( entities , ent_count ) = super ( T1 , self ) . _get ( PATHS [ 'mgmt' ] , _url , params = _params ) #NEWLINE# if ( ent_count == 1 ) : #NEWLINE# #INDENT# return self . _return_class ( next ( entities ) , child , child_id , entity , collection ) #NEWLINE# #UNINDENT# ent_gen = self . _gen_classes ( entities , child , child_id , entity , collection ) #NEWLINE# if count : #NEWLINE# #INDENT# return ( ent_gen , ent_count ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ent_gen