Created
December 8, 2016 00:27
-
-
Save salexkidd/e75054b456dfc59912e5e5f10340cfe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boxsdk import (OAuth2, Client) | |
def get_file_property(file_id): | |
oauth2 = OAuth2( | |
client_id="<YOUR CLIENT_ID>", | |
client_secret="<YOUR CLIENT_SECRET>", | |
access_token="<YOUR ACCESS_TOKEN>", | |
) | |
client = Client(oauth2) | |
f = client.file(file_id=file_id).get() | |
print("filename: {} (id: {})".format(f.name, f.id)) | |
print("content_created_at: {}".format(f.content_created_at)) | |
if __name__ == "__main__": | |
file_id = input("Please input file_id: ") | |
get_file_property(file_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment