Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 7caa1d312767bee97140cdc4bfcdf819eb5ae0df 1 parent 03fb783
Mike Helmick authored January 07, 2012
21  .gitignore
... ...
@@ -0,0 +1,21 @@
  1
+*.mo
  2
+*.egg-info
  3
+*.egg
  4
+*.EGG
  5
+*.EGG-INFO
  6
+bin
  7
+build
  8
+develop-eggs
  9
+downloads
  10
+eggs
  11
+fake-eggs
  12
+parts
  13
+dist
  14
+.installed.cfg
  15
+.mr.developer.cfg
  16
+.hg
  17
+.bzr
  18
+.svn
  19
+*.pyc
  20
+*.pyo
  21
+*.tmp*
2  README.md
Source Rendered
@@ -17,7 +17,7 @@ auth_url = auth_props['auth_url']
17 17
 #Store this token in a session or something for later use in the next step.
18 18
 oauth_token_secret = auth_props['oauth_token_secret']
19 19
 
20  
-Connect with Netflix via: % auth_url
  20
+print 'Connect with Netflix via %s' % auth_url
21 21
 ```
22 22
 
23 23
 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'
4  netflix.py
@@ -82,7 +82,7 @@ def get_auth_url(self):
82 82
         resp, content = self.client.request('%s?oauth_callback=%s' % (self.request_token_url, self.callback_url), 'GET', **request_args)
83 83
         
84 84
         if resp['status'] != '200':
85  
-            raise NetflixAuthErrorError('There was a problem retrieving an authentication url.')
  85
+            raise NetflixAuthError('There was a problem retrieving an authentication url.')
86 86
 
87 87
         request_tokens = dict(parse_qsl(content))
88 88
 
@@ -150,7 +150,7 @@ def api_request(self, endpoint=None, method='GET', params={}, format='json'):
150 150
         try:
151 151
             content = json.loads(content)
152 152
         except json.JSONDecodeError:
153  
-            raise NetflixAPIError('Content unable to be decoded.')
  153
+            raise NetflixAPIError('Content is not valid JSON, unable to be decoded.')
154 154
 
155 155
         if status < 200 or status >= 300:
156 156
             raise NetflixAPIError('Code %d: %s' % (status, content['status']['message']))
31  setup.py
... ...
@@ -0,0 +1,31 @@
  1
+#!/usr/bin/env python
  2
+
  3
+import sys, os
  4
+from setuptools import setup
  5
+from setuptools import find_packages
  6
+
  7
+__author__ = 'Mike Helmick <mikehelmick@me.com>'
  8
+__version__ = '1.0'
  9
+
  10
+setup(
  11
+    name='python-netflix',
  12
+    version=__version__,
  13
+    packages=find_packages(),
  14
+    include_package_data=True,
  15
+    install_requires=['httplib2', 'oauth2', 'simplejson'],
  16
+    author='Mike Helmick',
  17
+    author_email='mikehelmick@me.com',
  18
+    license='MIT License',
  19
+    url='http://github.com/michaelhelmick/python-netflix/',
  20
+    keywords='python netflix oauth api',
  21
+    description='A Python Library to interface with Netflix REST API & OAuth',
  22
+    long_description=open('README.md').read(),
  23
+    classifiers = [
  24
+        'Development Status :: 1 - Beta',
  25
+        'Intended Audience :: Developers',
  26
+        'License :: OSI Approved :: MIT License',
  27
+        'Topic :: Software Development :: Libraries :: Python Modules',
  28
+        'Topic :: Communications :: Chat',
  29
+        'Topic :: Internet'
  30
+    ]
  31
+)

0 notes on commit 7caa1d3

Please sign in to comment.
Something went wrong with that request. Please try again.