Permalink
Browse files

Setup, fix syntax error, being verbose, .gitignore

Now comes with a setup.py, fixed some minor syntax errors, added
.gitignore and being a little more verbose.
  • Loading branch information...
michaelhelmick committed Jan 8, 2012
1 parent 03fb783 commit 7caa1d312767bee97140cdc4bfcdf819eb5ae0df
Showing with 55 additions and 3 deletions.
  1. +21 −0 .gitignore
  2. +1 −1 README.md
  3. +2 −2 netflix.py
  4. +31 −0 setup.py
View
@@ -0,0 +1,21 @@
+*.mo
+*.egg-info
+*.egg
+*.EGG
+*.EGG-INFO
+bin
+build
+develop-eggs
+downloads
+eggs
+fake-eggs
+parts
+dist
+.installed.cfg
+.mr.developer.cfg
+.hg
+.bzr
+.svn
+*.pyc
+*.pyo
+*.tmp*
View
@@ -17,7 +17,7 @@ auth_url = auth_props['auth_url']
#Store this token in a session or something for later use in the next step.
oauth_token_secret = auth_props['oauth_token_secret']
-Connect with Netflix via: % auth_url
+print 'Connect with Netflix via %s' % auth_url
```
Once you click "Allow" be sure that there is a URL set up to handle getting finalized tokens and possibly adding them to your database to use their information at a later date. \n\n'
View
@@ -82,7 +82,7 @@ def get_auth_url(self):
resp, content = self.client.request('%s?oauth_callback=%s' % (self.request_token_url, self.callback_url), 'GET', **request_args)
if resp['status'] != '200':
- raise NetflixAuthErrorError('There was a problem retrieving an authentication url.')
+ raise NetflixAuthError('There was a problem retrieving an authentication url.')
request_tokens = dict(parse_qsl(content))
@@ -150,7 +150,7 @@ def api_request(self, endpoint=None, method='GET', params={}, format='json'):
try:
content = json.loads(content)
except json.JSONDecodeError:
- raise NetflixAPIError('Content unable to be decoded.')
+ raise NetflixAPIError('Content is not valid JSON, unable to be decoded.')
if status < 200 or status >= 300:
raise NetflixAPIError('Code %d: %s' % (status, content['status']['message']))
View
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import sys, os
+from setuptools import setup
+from setuptools import find_packages
+
+__author__ = 'Mike Helmick <mikehelmick@me.com>'
+__version__ = '1.0'
+
+setup(
+ name='python-netflix',
+ version=__version__,
+ packages=find_packages(),
+ include_package_data=True,
+ install_requires=['httplib2', 'oauth2', 'simplejson'],
+ author='Mike Helmick',
+ author_email='mikehelmick@me.com',
+ license='MIT License',
+ url='http://github.com/michaelhelmick/python-netflix/',
+ keywords='python netflix oauth api',
+ description='A Python Library to interface with Netflix REST API & OAuth',
+ long_description=open('README.md').read(),
+ classifiers = [
+ 'Development Status :: 1 - Beta',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: MIT License',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ 'Topic :: Communications :: Chat',
+ 'Topic :: Internet'
+ ]
+)

0 comments on commit 7caa1d3

Please sign in to comment.