Permalink
Browse files

Import fix, examples work from cli, requirements fix.

  • Loading branch information...
1 parent 080356b commit d8a32a7624b276bdb533aa4d203a2dda243de97e @shazow committed Oct 4, 2011
Showing with 24 additions and 2 deletions.
  1. +1 −1 apiclient/__init__.py
  2. +6 −0 examples/facebook.py
  3. +14 −0 examples/klout.py
  4. +3 −1 setup.py
View
2 apiclient/__init__.py
@@ -1,2 +1,2 @@
-from .base import SimpleAPI, SimpleAPI_SharedSecret
+from .base import APIClient, APIClient_SharedSecret
from .ratelimiter import RateLimiter
View
6 examples/facebook.py
@@ -32,3 +32,9 @@ def _handle_response(self, response):
return r
raise FacebookError(has_error['type'], has_error['message'], response=response)
+
+
+if __name__ == '__main__':
+ api = FacebookAPI()
+ r = api.call('/', ids='shazow,minecraft')
+ print r
View
14 examples/klout.py
@@ -60,3 +60,17 @@ def _handle_response(self, response):
def call(self, path, **params):
return self._request('GET', path, params=params)
+
+
+if __name__ == '__main__':
+ import sys
+
+ if len(sys.argv) < 2:
+ print "Must provide a Klout API key."
+ sys.exit(1)
+
+ api_key = sys.argv[1]
+
+ api = KloutAPI(api_key)
+ r = api.call('/users/show', users='shazow,limedaring')
+ print r
View
4 setup.py
@@ -12,7 +12,9 @@
version = '1.0'
long_description = open('README.rst').read()
-requirements = []
+requirements = [
+ 'urllib3',
+]
tests_requirements = requirements + [
'nose',
]

0 comments on commit d8a32a7

Please sign in to comment.