rename Micropub to MicropubClient to differentiate

This commit is contained in:
Kyle Mahan 2015-01-28 08:37:47 -08:00
parent 6db7529f4a
commit 1da9d95fc6
3 changed files with 6 additions and 5 deletions

View File

@ -1,10 +1,10 @@
from flask import Flask, request, url_for from flask import Flask, request, url_for
from flask.ext.micropub import Micropub from flask.ext.micropub import MicropubClient
app = Flask(__name__) app = Flask(__name__)
app.config['SECRET_KEY'] = 'my super secret key' app.config['SECRET_KEY'] = 'my super secret key'
micropub = Micropub(app) micropub = MicropubClient(app)
@app.route('/micropub-callback') @app.route('/micropub-callback')

View File

@ -21,7 +21,7 @@ else:
from urllib.parse import urlencode, parse_qs from urllib.parse import urlencode, parse_qs
class Micropub: class MicropubClient:
"""Flask-Micropub provides support for IndieAuth/Micropub """Flask-Micropub provides support for IndieAuth/Micropub
authentication and authorization. authentication and authorization.
@ -139,7 +139,8 @@ class Micropub:
return AuthResponse( return AuthResponse(
next_url=next_url, next_url=next_url,
error='authorization failed. {}: {}'.format( error='authorization failed. {}: {}'.format(
rdata.get('error'), rdata.get('error_description'))) next(rdata.get('error', []), None),
next(rdata.get('error_description', []), None)))
if 'me' not in rdata: if 'me' not in rdata:
return AuthResponse( return AuthResponse(

View File

@ -11,7 +11,7 @@ from setuptools import setup
setup( setup(
name='Flask-Micropub', name='Flask-Micropub',
version='0.1.1', version='0.1.2',
url='https://github.com/kylewm/flask-micropub/', url='https://github.com/kylewm/flask-micropub/',
license='BSD', license='BSD',
author='Kyle Mahan', author='Kyle Mahan',