
9Vc           @   s,   d  d l  m Z m Z d Z d d  Z d S(   i(   t   decryptt   encrypti2   c   
      C   s   t  |  } d | k r6 t | j d  |  |  } n  | j d t  } | | | |  \ } } }	 t | |  |  | d <| | d <| | |	 f S(   s9  
    A helper for the bookmark pager.

    :param key: the private key of you API
    :param seed: the crypo seed for this session
    :param args: the verbatim filtering+paging arguments
    :param callback: a function that takes (a dictionary of filters, the current bookmark, the page size)
                 and return a tuple (next_results, dictionary_ready_for_next_iteration, approx_number_of_element_left)
    :param initial_bookmark: pass here an optional initial bookmark for the first request
    :return: the tuple result_list and new encrypted bookmark
    t
   pager_infot	   page_size(   t   dictR    t   popt   DEFAULT_PAGE_SIZER   (
   t   keyt   seedt   argst   callbackt   initial_bookmarkt   filterR   t   result_listt   new_bookmarkt   approx_result_size(    (    s;   /tmp/pip-build-Q6F9ld/flask-restful/flask_restful/paging.pyt   retrieve_next_page   s    
N(   t   flask_restful.utils.cryptoR    R   R   t   NoneR   (    (    (    s;   /tmp/pip-build-Q6F9ld/flask-restful/flask_restful/paging.pyt   <module>   s   