+
    TŎit                     Z   ^ RI Ht ^ RIHt ^ RIHtHtHtHt ^ RI	H
t
 ^ RI	Ht ^ RIHt ^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt ^ R	IHt ^ R
IHt ^ RIHt   ! R R]4      t ! R R]4      t ! R R]4      t ! R R4      t  ! R R]4      t!]R 4       t"R t#R#   ] d    ^ RIt L]i ; i)    )FacebookSession)	apiconfig)FacebookRequestErrorFacebookBadObjectError$FacebookUnavailablePropertyExceptionFacebookBadParameterError)	api_utils)urls)contextmanagerN)http_client)collections_abc)ObjectParser)TypeCheckerc                   ^   a  ] tR t^+t o RtRR ltR tR tR tR t	R t
R	 tR
 tR tRtV tR# )FacebookResponsez8Encapsulates an http response from Facebook's Graph API.Nc                L    Wn         W n        T;'       g    / V n        W@n        R# )zInitializes the object's internal data.
Args:
    body (optional): The response body as text.
    http_status (optional): The http status code.
    headers (optional): The http headers.
    call (optional): The original call that was made.
N)_body_http_status_headers_call)selfbodyhttp_statusheaderscalls   &&&&&d/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/facebook_business/api.py__init__FacebookResponse.__init__/   s!     
'2
    c                    V P                   # )zReturns the response body.)r   r   s   &r   r   FacebookResponse.body<   s    zzr   c                     \         P                  ! V P                  4      #   \        \        3 d    T P                  u # i ; i)z1Returns the response body -- in json if possible.)jsonloadsr   	TypeError
ValueErrorr!   s   &r   r$   FacebookResponse.json@   s8    	::djj)):& 	::	s   " AAc                    V P                   # )zReturn the response headers.r   r!   s   &r   r   FacebookResponse.headersG   s    }}r   c                8    V P                   P                  R4      # )z+Returns the ETag header value if it exists.ETag)r   getr!   s   &r   etagFacebookResponse.etagK   s    }}  ((r   c                    V P                   # )z-Returns the http status code of the response.)r   r!   s   &r   statusFacebookResponse.statusO   s       r   c                H   V P                  4       p\        V\        P                  4      '       d
   RV9   d   R# \	        V4      '       d   RV9   d
   VR,          # RV9  # V P
                  \        P                  8X  d   R# V P
                  \        P                  8X  d   R# R# )z6Returns boolean indicating if the call was successful.errorFsuccesszService UnavailableT)	r$   
isinstancer   Mappingboolr   r   NOT_MODIFIEDOK)r   	json_bodys   & r   
is_successFacebookResponse.is_successS   s     IIK	i!8!899g>R)__I% ++(	99+":"::+..0 r   c                ,    V P                  4       '       * # )z.Returns boolean indicating if the call failed.)r=   r!   s   &r   
is_failureFacebookResponse.is_failurek   s    ??$$$r   c                    V P                  4       '       dD   \        RV P                  V P                  4       V P	                  4       V P                  4       4      # R# )zf
Returns a FacebookRequestError (located in the exceptions module) with
an appropriate debug message.
zCall was not successfulN)r@   r   r   r2   r   r   r!   s   &r   r5   FacebookResponse.erroro   sH    
 ??')

		  r   )r   r   r   r   )NNNN)__name__
__module____qualname____firstlineno____doc__r   r   r$   r   r/   r2   r=   r@   r5   __static_attributes____classdictcell____classdict__s   @r   r   r   +   s:     B)!0% r   r   c                     a  ] tR t^t o Rt]P                  R,          t]P                  R,          tRt	Rt
RtRR],          /tR	tR	tRR
 ltR tR t]RR l4       t]R 4       t]R 4       t]R 4       t]R 4       tRR ltR tRtV tR	# )FacebookAdsApiay  Encapsulates session attributes and methods to make API calls.
Attributes:
    SDK_VERSION (class): indicating sdk version.
    HTTP_METHOD_GET (class): HTTP GET method name.
    HTTP_METHOD_POST (class): HTTP POST method name
    HTTP_METHOD_DELETE (class): HTTP DELETE method name
    HTTP_DEFAULT_HEADERS (class): Default HTTP headers for requests made by
        this sdk.
SDK_VERSIONAPI_VERSIONGETPOSTDELETEz
User-Agentzfbbizsdk-python-%sNc                p    Wn         ^ V n        ^ V n        T;'       g    V P                  V n        W0n        R# )zInitializes the api instance.
Args:
    session: FacebookSession object that contains a requests interface
        and attribute GRAPH (the Facebook GRAPH API URL).
    api_version: API version
N)_session_num_requests_succeeded_num_requests_attemptedrP   _api_version_enable_debug_logger)r   sessionapi_versionenable_debug_loggers   &&&&r   r   FacebookAdsApi.__init__   s5      '($'($';;4+;+;$7!r   c                    V P                   # )z&Returns the number of calls attempted.)rW   r!   s   &r   get_num_requests_attempted)FacebookAdsApi.get_num_requests_attempted       +++r   c                    V P                   # )z+Returns the number of calls that succeeded.)rV   r!   s   &r   get_num_requests_succeeded)FacebookAdsApi.get_num_requests_succeeded   ra   r   c
                    \        WW6V4      p
V ! WVR 7      pV P                  V4       V'       d   V P                  V4       V	'       d/   ^ RIHp V'       d   VP                  4        VP                  4        V# ))r\   )CrashReporter)r   set_default_apiset_default_account_idfacebook_business.crashreporterrf   enableLoggingenable)clsapp_id
app_secretaccess_token
account_idr[   proxiestimeoutdebug	crash_logrZ   apirf   s   &&&&&&&&&&   r   initFacebookAdsApi.init   sf     "&l")+'EBC &&z2E++-  "
r   c                    Wn         R# )zSets the default api instance.
When making calls to the api, objects will revert to using the default
api if one is not specified when initializing the objects.
Args:
    api_instance: The instance which to set as default.
N_default_api)rl   api_instances   &&r   rg   FacebookAdsApi.set_default_api   s
     (r   c                    V P                   # )z!Returns the default api instance.ry   rl   s   &r   get_default_apiFacebookAdsApi.get_default_api   s     r   c                j    \        V4      pVP                  R 4      R8X  d   \        R4      hWn        R# )act_zeAccount ID provided in FacebookAdsApi.set_default_account_id expects a string that begins with 'act_'N)strfindr'   _default_account_id)rl   rp   s   &&r   rh   %FacebookAdsApi.set_default_account_id   s6    _
??6"b(;  #-r   c                    V P                   # N)r   r~   s   &r   get_default_account_id%FacebookAdsApi.get_default_account_id   s    &&&r   c                   V'       g   / pV'       g   / pV'       g   / pT;'       g    V P                   pV'       d:   \        P                  ! RV4      '       g   \        RV P                  ,          4      hV ;P
                  ^,          un        \        V\        P                  4      '       gP   RP                  T;'       g    V P                  P                  VRP                  \        \        V4      4      34      pVP                  4       pVP                  \         P"                  4       V'       d   \%        V4      pVR9   dA   V P                  P&                  P)                  VVVVVV P                  P*                  R7      pM?V P                  P&                  P)                  VVVVVV P                  P*                  R7      pV P,                  '       d)   ^ RIp	\1        V	P3                  VP(                  4      4       \5        VP6                  VP8                  VP:                  RVRVR	VR
VRV/R7      p
V
P=                  4       '       d   V
P?                  4       hV ;P@                  ^,          un         V
# )a  Makes an API call.
Args:
    method: The HTTP method name (e.g. 'GET').
    path: A tuple of path tokens or a full URL string. A tuple will
        be translated to a url as follows:
        graph_url/tuple[0]/tuple[1]...
        It will be assumed that if the path is not a string, it will be
        iterable.
    params (optional): A mapping of request parameters where a key
        is the parameter name and its value is a string or an object
        which can be JSON-encoded.
    headers (optional): A mapping of request headers where a key is the
        header name and its value is the header value.
    files (optional): An optional mapping of file names to binary open
        file objects. These files will be attached to the request.
Returns:
    A FacebookResponse object containing the response body, headers,
    http status, and summary of the call that was made.
Raises:
    FacebookResponse.error() if the request failed.
zv[0-9]+\.[0-9]+z:Please provide the API version in the following format: %s/)paramsr   filesrr   )datar   r   rr   Nmethodpathr   r   r   r   r   r   r   )rQ   rS   )!rX   researchr   rP   rW   r7   sixstring_typesjoinrU   GRAPHmapr   copyupdaterN   HTTP_DEFAULT_HEADERS_top_level_param_json_encoderequestsrequestrr   rY   curlifyprintto_curlr   textr   status_coder@   r5   rV   )r   r   r   r   r   r   url_overrider[   responser   fb_responses   &&&&&&&&   r   r   FacebookAdsApi.call   s   > FGE!66T%6%6ryy);[II(L""# 
 	$$)$$ 0 0118833 3 3S$( D ,,.~::;1&9F &&}}--55-- 6 H }}--55-- 6 H $$$'//("2"234&$$ ,,&&7	
 !!####%%$$)$r   c                    \        V R7      # )zR
Returns a new FacebookAdsApiBatch, which when executed will go through
this api.
)ru   )FacebookAdsApiBatchr!   s   &r   	new_batchFacebookAdsApi.new_batchU  s    
 #t,,r   )rX   rY   rW   rV   rU   )NF)	NNNNNNNFT)NNNNN)rD   rE   rF   rG   rH   r   ads_api_configrO   rP   HTTP_METHOD_GETHTTP_METHOD_POSTHTTP_METHOD_DELETEr   rz   r   r   r_   rc   classmethodrv   rg   r   rh   r   r   r   rI   rJ   rK   s   @r   rN   rN      s      **=9K**=9KO! 	*[8 L8,,  8 ( (     - - ' 'gR- -r   rN   c                   N   a  ] tR tRt o RtR
R ltR tRR ltR
R ltR t	R	t
V tR# )r   i]  a  
Exposes methods to build a sequence of calls which can be executed with
a single http request.
Note: Individual exceptions won't be thrown for each call that fails.
    The success and failure callback functions corresponding to a call
    should handle its success or failure.
Nc                    Wn         . V n        . V n        . V n        . V n        Ve   V P                  P                  V4       Ve   V P                  P                  V4       . V n        R # r   )_api_files_batch_success_callbacks_failure_callbacksappend	_requests)r   ru   r6   failures   &&&&r   r   FacebookAdsApiBatch.__init__g  s`    	"$"$##**73##**73r   c                ,    \        V P                  4      # r   )lenr   r!   s   &r   __len__FacebookAdsApiBatch.__len__s      4;;r   c	           	        \        V\        P                  4      '       g   RP                  V4      p	MTp	RVRV	/p
V'       d   \	        V4      pVP                  4        UUu. uF"  w  rV: R\        P                  ! V4      : 2NK$  	  pppVR8X  d-   V
R;;,          RRP                  V4      ,           ,          uu&   MRP                  V4      V
R&   V'       d#   R	P                  VP                  4       4      V
R
&   V'       d8   . V
R&   V F,  p/ pWR&   WN,          VR&   V
R,          P                  V4       K.  	  V P                  P                  V
4       V P                  P                  V4       V P                  P                  V4       V P                  P                  V4       V P                  P                  V4       V
# u uppi )ar  Adds a call to the batch.
Args:
    method: The HTTP method name (e.g. 'GET').
    relative_path: A tuple of path tokens or a relative URL string.
        A tuple will be translated to a url as follows:
            <graph url>/<tuple[0]>/<tuple[1]>...
        It will be assumed that if the path is not a string, it will be
        iterable.
    params (optional): A mapping of request parameters where a key
        is the parameter name and its value is a string or an object
        which can be JSON-encoded.
    headers (optional): A mapping of request headers where a key is the
        header name and its value is the header value.
    files (optional): An optional mapping of file names to binary open
        file objects. These files will be attached to the request.
    success (optional): A callback function which will be called with
        the FacebookResponse of this call if the call succeeded.
    failure (optional): A callback function which will be called with
        the FacebookResponse of this call if the call failed.
    request (optional): The APIRequest object
Returns:
    A dictionary describing the call.
r   r   relative_url=rQ   ?&r   ,attached_filesr   namevalue)r7   r   r   r   r   itemsr
   quote_with_encodingkeysr   r   r   r   r   r   )r   r   relative_pathr   r   r   r6   r   r   r   r   keyr   keyvalsheaderbatch_formatted_headers   &&&&&&&&&       r   addFacebookAdsApiBatch.addv  s   D -)9)9::88M2L(L fL

 1&9F)/9)7:3 #&t'?'?'FG)7  9^$chhw.?(??$"xx0V%(XXejjl%;D!" DO!)+&17v.29/&w/Y&&'=>	 " 	4 5!&&w/&&w/g&19s   !(Gc           
        \         P                  ! VP                  4      pVP                  '       d   RP	                  VP                  4      VR&   V P                  VP                  VP                  VVP                  VVVR7      # )a  Interface to add a APIRequest to the batch.
Args:
    request: The APIRequest object to add
    success (optional): A callback function which will be called with
        the FacebookResponse of this call if the call succeeded.
    failure (optional): A callback function which will be called with
        the FacebookResponse of this call if the call failed.
    Returns:
        A dictionary describing the call.
r   fields)r   r   r   r   r6   r   r   )	r   deepcopy_params_fieldsr   r   _method_path_file_params)r   r   r6   r   updated_paramss   &&&& r   add_requestFacebookAdsApiBatch.add_request  so      w7???'*xx'@N8$xx??!--!&&  
 	
r   c                   V P                   '       g   R# Rp\        4       pRV P                   /p/ pV P                   F  pV'       g   K  VP                  V4       K   	  V P                  P                  VVVVR7      pVP                  4       p. p\        V4       F  w  rV
'       d   V
P                  R4      pV
P                  R4      pV
P                  R4      p\        VVVV P                   V	,          R7      pVP                  4       '       d7   V P                  V	,          '       d   V P                  V	,          ! V4       K  K  V P                  V	,          '       d   V P                  V	,          ! V4       K  K  VP                  V	4       K  	  V'       d   V P                  V P                  4      pV U	u. uF  qP                  V	,          NK  	  up	Vn        V U	u. uF  qP                   V	,          NK  	  up	Vn         V U	u. uF  p	V P                  V	,          NK  	  up	Vn        V U	u. uF  p	V P                  V	,          NK  	  up	Vn        V# R# u up	i u up	i u up	i u up	i )	a  Makes a batch call to the api associated with this object.
For each individual call response, calls the success or failure callback
function if they were specified.
Note: Does not explicitly raise exceptions. Individual exceptions won't
be thrown for each call that fails. The success and failure callback
functions corresponding to a call should handle its success or failure.
Returns:
    If some of the calls have failed, returns  a new FacebookAdsApiBatch
    object with those calls. Otherwise, returns None.
NrR   batch)r   r   r   coder   r   )r   tupler   r   r   r   r$   	enumerater.   r   r=   r   r   r   	__class__)r   r   r   r   r   
call_filesr   	responsesretry_indicesindexr   r   r   r   inner_fb_responser   s   &               r   executeFacebookAdsApiBatch.execute  s5    {{{w4;;'++JzZ( & iinn	 % 
  $$&	(3OE||F+||F+",,y1$4# $U+	%! %//11..u55//67HI 6,,U33++E23DE 4 $$U+'  4* tyy1I@MNuE 2 2NI@MNuE 2 2NI9F,H9F -1,C,CE,J,J9F,HI( :G,H9F -1,C,CE,J,J9F,HI(  ON,H,Hs   9I II!/I&)r   r   r   r   r   r   NN)NNNNNN)rD   rE   rF   rG   rH   r   r   r   r   r   rI   rJ   rK   s   @r   r   r   ]  s*     
 FP
:> >r   r   c                      a  ] tR tRt o RtR]! / / 4      RRRRRR3R ltR tR tR	 t	R
 t
R tR tR tR tR tRR ltR tRtV tR# )FacebookRequesti  z
Represents an API request
NFTc                   T;'       g    \         P                  4       V n        Wn        W n        VP                  RR4      V n        WP                  RR4      3V n        WPn        W`n	        Wpn
        Wn        Wn        Wn        Wn        / V n        . V n        / V n        ^ V n        . V n        Ve,   VP(                  P*                  P-                  4       V n        R# R# )aB  
Args:
    node_id: The node id to perform the api call.
    method: The HTTP method of the call.
    endpoint: The edge of the api call.
    api (optional): The FacebookAdsApi object.
    param_checker (optional): Parameter checker.
    target_class (optional): The return class of the api call.
    api_type (optional): NODE or EDGE type of the call.
    allow_file_upload (optional): Whether the call allows upload.
    response_parser (optional): An ObjectParser to parse response.
    include_summary (optional): Include "summary".
    api_version (optional): API version.
r    N)rN   r   r   _node_idr   replace	_endpointr   _param_checker_target_class	_api_type_allow_file_upload_response_parser_include_summaryrX   r   r   r   _file_counter_accepted_fieldsField__dict__values)r   node_idr   endpointru   param_checkertarget_classapi_typeallow_file_uploadresponse_parserinclude_summaryr[   s   &&&&&&&&&&&&r   r   FacebookRequest.__init__!  s    8 ;;>99;	!))#r2//R89
+)!"3 / /' "#$0$6$6$?$?$F$F$HD! $r   c                   V P                   '       g/   \        P                  ! R V P                  ,           R,           4       R\	        V P
                  4      ,           p\        P                  P                  V4      '       d*   WP                  V&   V ;P
                  ^,          un        V # \        RV,           R,           4      h)z	Endpoint z cannot upload filessourcezCannot find file !)r   r	   warningr   r   r   osr   isfiler   r   )r   	file_pathfile_keys   && r   add_fileFacebookRequest.add_fileQ  s    &&&kDNN:=SSTc$"4"45577>>)$$*3h'!#
  ,#i/#5 r   c                F    Vf   V # V F  pV P                  V4       K  	  V # r   )r  )r   r   r  s   && r   	add_filesFacebookRequest.add_files^  s'    =KIMM)$ r   c                    WP                   9  d   V P                   P                  V4       WP                  9  d/   \        P                  ! V P
                  R ,           V,           4       V # )z does not allow field )r   r   r   r	   r  r   )r   fields   &&r   	add_fieldFacebookRequest.add_fielde  sL    $LL&---dnn/GG%OPr   c                F    Vf   V # V F  pV P                  V4       K  	  V # r   )r  )r   r   r  s   && r   
add_fieldsFacebookRequest.add_fieldsl  s'    >KENN5! r   c                   V P                   P                  W4      '       gs   \        P                  ! R V,           R,           R,           V P                   P	                  V4      ,           R,           R,           \        \        V4      4      ,           4       V P                   P                  V4      '       d   W P                  V&   V # V P                  V4      V P                  V&   V # )z	value of z might not be compatible. z Expect z; z got )r   is_valid_pairr	   r  get_typer   typeis_file_paramr   _extract_valuer   )r   r   r   s   &&&r   	add_paramFacebookRequest.add_params  s    ""00<<kC/2NN!0099#>?AEFd5k*+ , ,,S11%*c"  !% 3 3E :DLLr   c                p    Vf   V # VP                  4        F  pV P                  W!V,          4       K  	  V # r   )r   r$  )r   r   r   s   && r   
add_paramsFacebookRequest.add_params~  s1    >K;;=CNN3s, !r   c                ,    \        V P                  4      # r   )listr   r!   s   &r   
get_fieldsFacebookRequest.get_fields  s    DLL!!r   c                B    \         P                  ! V P                  4      # r   )r   r   r   r!   s   &r   
get_paramsFacebookRequest.get_params  s    }}T\\**r   c                   \         P                  ! V P                  4      pV P                  R 8X  d}   V P                  R8X  dl   \        V P                  VV P                  V P                  V P                  V P                  V P                  V P                  R7      pVP                  4        V# V P                  '       d   RP                  V P                  4      VR&   \        V P                   4      ;_uu_ 4       pV P                  P#                  V P                  V P$                  VVV P&                  R7      pVP)                  4       '       d   VP)                  4       hV P                  '       d4   V P                  P+                  VP-                  4       4      uuRRR4       # VuuRRR4       #   + '       g   i     R# ; i)EDGErQ   )target_objects_classr   r   r  ru   r  r  object_parserr   r   )r   r   r   r   r[   N)r   r   r   r   r   Cursorr   r   r   r   r   r   r   load_next_pager   
open_filesr   r   r   rX   r5   parse_singler$   )r   r   cursorr   r   s   &    r   r   FacebookRequest.execute  sG   t||,>>V#(=%)%7%7|| $ 5 5II"33	F !!#M<<<"xx5F8))**eyy~~||jj -- & H ~~nn&&$$$,,99(--/J +*   +***s   ;A6F12(F1%F11G	c                *    VP                  WV4       R # r   )r   )r   r   r6   r   s   &&&&r   add_to_batchFacebookRequest.add_to_batch  s    $1r   c                6  a  \        VR 4      '       d   VP                  4       # \        V\        4      '       d"   V Uu. uF  pS P	                  V4      NK  	  up# \        V\
        4      '       d$   \        V 3R lVP                  4        4       4      # V# u upi )export_all_datac              3   l   <"   T F)  w  rSP                  V4      SP                  V4      3x  K+  	  R # 5ir   )r#  ).0kvr   s   &  r   	<genexpr>1FacebookRequest._extract_value.<locals>.<genexpr>  s5      -+FQ ,,Q/1D1DQ1GH+s   14)hasattrr>  r7   r*  r#  dictr   )r   r   items   f& r   r#  FacebookRequest._extract_value  s    5+,,((**t$$:?@%$D''-%@@t$$ -#kkm- - - L As   B)r   r   r   r   rX   r   r   r   r   r   r   r   r   r   r   r   r   r   )rD   rE   rF   rG   rH   r   r   r  r  r  r  r$  r'  r+  r.  r   r;  r#  rI   rJ   rK   s   @r   r   r     so      !"b).I`	"+ @2	 	r   r   c                   t   a  ] tR tRt o RtRR ltR tR tR tR t	]	t
R	 tR
 tR tR tR tR tR tRtV tR# )r4  i  a  Cursor is an cursor over an object's connections.
    Previously called EdgeIterator.
Examples:
    >>> me = AdAccountUser('me')
    >>> my_accounts = [act for act in Cursor(me, AdAccount)]
    >>> my_accounts
    [<AdAccount act_abc>, <AdAccount act_xyz>]
Nc
                ^   \        T;'       g    / 4      V n        VP                  W0P                  4       Wn        W n        T;'       g    VP                  4       V n        T;'       g    VP                  4       V n        T;'       g    VP                  4       V n
        V P                  V P                  3V n        . V n        . V n        RV n        RV n        RV n        T;'       g    RV P                  9   V n        T	;'       g"    \%        V P                  V P                  R7      V n        R# )a  
Initializes an cursor over the objects to which there is an edge from
source_object.
To initialize, you'll need to provide either (source_object and
target_objects_class) or (api, node_id, endpoint, and object_parser)
Args:
    source_object: An AbstractObject instance from which to inspect an
        edge. This object should have an id.
    target_objects_class: Objects traversed over will be initialized
        with this AbstractObject class.
    fields (optional): A list of fields of target_objects_class to
        automatically read in.
    params (optional): A mapping of request parameters where a key
        is the parameter name and its value is a string or an object
        which can be JSON-encoded.
    include_summary (optional): Include summary.
    api (optional): FacebookAdsApi object.
    node_id (optional): The ID of calling node.
    endpoint (optional): The edge name.
    object_parser (optional): The ObjectParser to parse response.
FNdefault_summary)ru   r  )rF  r   _assign_fields_to_params_source_object_target_objects_classget_id_assuredr   get_endpointr   get_apir   r   _queuer   _finished_iteration_total_count_summaryr   r   _object_parser)
r   source_objectr2  r   r   r  ru   r  r  r3  s
   &&&&&&&&&&r   r   Cursor.__init__  s    B 6<<R(55fkkJ+%9"AA=#?#?#A!HH%9%F%F%H22=002	MMNN

 #(   / S S3D3S+ 
 
|		330
r   c                ,    \        V P                  4      # r   )r   rR  r!   s   &r   __repr__Cursor.__repr__  r   r   c                ,    \        V P                  4      # r   )r   rR  r!   s   &r   r   Cursor.__len__  r   r   c                    V # r    r!   s   &r   __iter__Cursor.__iter__  s    r   c                    V P                   '       g!   V P                  4       '       g   \        4       hV P                   P                  ^ 4      # )r   )rR  r5  StopIterationpopr!   s   &r   __next__Cursor.__next__  s6     {{{4#6#6#8#8/!{{q!!r   c                (    V P                   V,          # r   )rR  )r   r   s   &&r   __getitem__Cursor.__getitem__  s    {{5!!r   c                    V P                   # r   r*   r!   s   &r   r   Cursor.headers  s    }}r   c                L    V P                   f   \        R4      hV P                   # )NzBCouldn't retrieve the object total count for that type of request.)rT  r   r!   s   &r   totalCursor.total  s.    $6     r   c                    V P                   e!   \        V P                   \        4      '       g   \        R4      hR\        P
                  ! V P                   R^RR7      : 2# )Nz>Couldn't retrieve the object summary for that type of request.z
<Summary> T)	sort_keysindent
separators)r   z: )rU  r7   rF  r   r$   dumpsr!   s   &r   summaryCursor.summary  s\    == 
4==$(G(G6  )H JJ&	
 	
r   c                H   V P                   '       d   R# V P                  '       d2   RV P                  9  d!   RV P                  9  d   RV P                  R&   V P                  P	                  RV P
                  V P                  R7      pVP                  4       pVP                  4       V n        RV9   dW   RVR,          9   dI   R	VR,          R,          9   d4   R
VR,          9   d&   VR,          R,          R	,          V P                  R	&   MRV n         V P                  '       d+   RV9   d$   RVR,          9   d   VR,          R,          V n	        V P                  '       d   RV9   d   VR,          V n
        V P                  V4      V n        \        V P                  4      ^ 8  # )zsQueries server for more nodes and loads them into the internal queue.
Returns:
    True if successful, else False.
FrK  rt  TrQ   )r   pagingcursorsafternexttotal_count)rS  r   r   r   r   r   r$   r   r   rT  rU  build_objects_from_responserR  r   )r   response_objr   s   &  r   r5  Cursor.load_next_page-  sf   
 ### !!!T[[0T[[(%)DKK	"yy~~JJ;; & 

  $$&$,,.  (++x))44hx((#+H#5i#@#IDKK  (,D$ !!!!Xi00 ( 3M BD   Y(%:$Y/DM66x@4;;!##r   c                    V  F  pVu # 	  R # r   r_  )r   objs   & r   get_oneCursor.get_one]  s    CJ r   c                8    V P                   P                  V4      # r   )rV  parse_multiple)r   r   s   &&r   r|  "Cursor.build_objects_from_responseb  s    ""11(;;r   )r   r   rS  r   r   r   rV  r   rR  rM  rU  rN  rT  r   )	NNNNTNNNN)rD   rE   rF   rG   rH   r   rZ  r   r`  re  rz  rh  r   rm  rt  r5  r  r|  rI   rJ   rK   s   @r   r4  r4    sT     5
n  " D"!
.$`
< <r   r4  c              #      "   / pV P                  4        F"  w  r#VP                  V\        VR 4      /4       K$  	  Vx  VP                  4        F  pVP	                  4        K  	  R# 5i)rbN)r   r   openr   close)r   opened_filesr   r   files   &    r   r6  r6  f  sX     L[[]	S$tT"234 #
##%

 &s   A&A(c                 D   V P                  4       p V P                  4        F{  w  r\        V\        P                  \        P
                  \        34      '       d>   \        V\        P                  4      '       g   \        P                  ! VR RR7      W&   Kw  W V&   K}  	  V # )T)rp  rr  )r   :)r   r   r7   r   r8   Sequencer9   r   r   r$   rs  )r   paramr   s   &  r   r   r   p  s|    [[]Fu668P8PRVWXXuc&6&677 JJ%FM "5M ' Mr   )$facebook_business.sessionr   facebook_businessr   facebook_business.exceptionsr   r   r   r   facebook_business.utilsr	   r
   
contextlibr   r   	six.movesr   r  r$   r   r   r   ImportErrorcollections(facebook_business.adobjects.objectparserr   facebook_business.typecheckerr   objectr   rN   r   r   r4  r6  r   r_  r   r   <module>r     s    6 '  . ( %  ! 	  
 	('
 B 5
Rv RjZ-V Z-z|& |~[ [|i<V i<X  e  ('(s   B B*)B*