Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved API keys to a compiled Python file. not going to stop someone d…

…etermined but better than plain text.
  • Loading branch information...
commit 7d5d20d77dbe99345afd357a184af6ba2d465a75 1 parent 0b5d9ef
Giles Lavelle authored
9 .gitignore
View
@@ -1,8 +1,11 @@
-*/api.json
*.sublime-project
*.sublime-workspace
-test.txt
-test.png
+
*.pyc
+
+!src/lib/apikeys.pyc
+src/lib/apikeys.py
+
clipcloud/*
+
*.DS_Store
BIN  src/lib/apikeys.pyc
View
Binary file not shown
6 src/lib/dbox.py
View
@@ -1,8 +1,11 @@
import webbrowser
import json
+
from dropbox.session import DropboxSession
from dropbox.client import DropboxClient
+
from lib.settings import *
+from lib.apikeys import *
from lib.message import Message
@@ -17,8 +20,7 @@ def __init__(self, in_user_mode=True):
self.m = Message(in_user_mode=in_user_mode)
- api_details = json.load(open('lib/dropbox/api.json'))['dropbox']
- session = DropboxSession(api_details['key'], api_details['secret'], self.ACCESS_TYPE)
+ session = DropboxSession(API_KEY, API_SECRET, self.ACCESS_TYPE)
# if there is a token saved, that can be used to connect with dropbox
if os.path.exists(TOKEN_PATH):
6 src/lib/dropbox/api.json
View
@@ -1,6 +0,0 @@
-{
- "dropbox": {
- "key": "dysgzktky4zqbib",
- "secret": "46s2f1c7oc1aoxw"
- }
-}
Please sign in to comment.
Something went wrong with that request. Please try again.