Skip to content

heggy231/Expense-organizer-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense organizer app with DBX API

Demo:

  • Dropbox (DBX) API to OAuth into DBX
    OAuth into DBX

  • DBX API to Render images
    Get access to DBX to Render images

Objective: Expense organizer app that runs on DBX. Dropbox APIs featuring content Endpoints.

* OAuth: Direct the user to Dropbox, and prompt for a code.
* Render image: Files/get_thumbnail Dropbox API call to return a jpeg image for a given path.

What do I do to try out OAuth on DBX?

  • OAuth DBX platform ====================
  1. Check for Python installation in your terminal, if Python is missing or not found, you’ll need to install it here.

python -V


  1. Install DropBox (DBX) Platform Python SDK.

pip install dropbox


  1. OAuth, direct the user to Dropbox, and prompt for a code. DropboxOAuth2FlowNoRedirect object constructs a URL to https://www.dropbox.com/oauth2/authorize

from dropbox import DropboxOAuth2FlowNoRedirect

auth_flow = DropboxOAuth2FlowNoRedirect("APP_KEY", "APP_SECRET") print("Authorize your script here: "+auth_flow.start()) code = raw_input('Input your code: ').strip()

print("Initializing Dropbox API...") dbx = dropbox.Dropbox(auth_flow.finish(code).access_token)


  1. Run db1.py in your terminal

  2. Go to the URL you are given to get the OAuth code to get access to the expense receipts

What do I do to try out the get image thumbnail on DBX?

  • Render Image Thumbnail on DBX platform =========================================
  1. Run db2.py.

python db2.py


  1. Go to http://localhost:8088

References:

About

Content Endpoints: files/get_thumbnail dropbox API call to return a jpeg image for a given path

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages