A newbie Python SDK question
Hi
While playing around with Python SDK, it it not clear to me how should I pass a shared folder link into sdk to download a file from that folder.
Example below from Python SDK perform a GET operation against api.box.com and I wonder if that is correct for an enterprise user?
Thanks
>>> from boxsdk import DevelopmentClient >>> client = DevelopmentClient() Enter developer token: <ENTER DEVELOPER TOKEN HERE> >>> user = client.user().get() GET https://api.box.com/2.0/users/me {'headers': {'Authorization': '---wXyZ', 'User-Agent': 'box-python-sdk-2.0.0', 'X-Box-UA': 'agent=box-python-sdk/2.0.0; env=python/3.6.5'}, 'params': None} "GET https://api.box.com/2.0/users/me" 200 454 {'Date': 'Thu, 01 Nov 2018 23:32:11 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'BOX-REQUEST-ID': '0b50luc09ahp56m2jmkla8mgmh2', 'Age': '0'} {'address': '', 'avatar_url': 'https://cloud.app.box.com/api/avatar/large/123456789', 'created_at': '2012-06-07T11:14:50-07:00', 'id': '123456789', 'job_title': '', 'language': 'en', 'login': 'user@example.com', 'max_upload_size': 16106127360, 'modified_at': '2018-10-30T17:01:27-07:00', 'name': 'Example User', 'phone': '', 'space_amount': 1000000000000000.0, 'space_used': 14330018065, 'status': 'active', 'timezone': 'America/Los_Angeles', 'type': 'user'} >>> print('The current user ID is {0}'.format(user.id)) The current user ID is 123456789
-
正式なコメント
Hello,
I would refer to our SDK examples. There is lots of example code in the docs section.
Hope this helps,
Alex, Box Developer Advocate
コメントアクション
サインインしてコメントを残してください。
コメント
1件のコメント