Download folders/files by name using pythonSDK

回答済み
新規投稿

コメント

2件のコメント

  • RobinDeSchepper

    You can use the Search endpoint or you can search through the names in an item_collection of a folder and go down the path tree that way.

     

    https://developer.box.com/reference#searching-for-content

    https://developer.box.com/docs/search-for-content

    0
    コメントアクション パーマリンク
  • omal

    I tried this method but I didn't get the file information.  Check the code I have used, 

     

    search_term = 'Welcome to Box.pdf'
    type = 'file' # file, folder, or web_link
    limit = 10
    offset = 0

    # Set search config fields
    content = client.search().query(search_term, result_type=type, limit=limit, offset=offset)
    print(content.__dict__)

    Output: 

    {'_session': , '_url': 'https://api.box.com/2.0/search', '_limit': 10, '_fields': None, '_additional_params': {'query': 'Welcome to Box.pdf', 'type': 'file'}, '_return_full_pages': False, '_has_retrieved_all_items': False, '_all_items': None, '_offset': 0}

     

    Item did not get searched. What is the mistake I have done? Please explain.

     

    Thank you in advance.

     

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。