Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 8f341c3

Browse files
author
Grace Yim
committed
Cleanup text in the README
1 parent 8ca207b commit 8f341c3

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ToopherPython [![Build Status](https://travis-ci.org/toopher/toopher-python.png?branch=master)](https://travis-ci.org/toopher/toopher-python)
22

3-
ToopherPython is a Toopher API library that simplifies the task of interfacing with the Toopher API from Python code. This project wrangles all the required OAuth and JSON functionality so you can focus on just using the API.
3+
ToopherPython is a Toopher API library that simplifies the task of interfacing with the Toopher API from Python code.
4+
This project wrangles all the dependency libraries and handles the required OAuth and JSON functionality so you can
5+
focus on just using the API.
46

57
### Python Version
68
* 2.6
@@ -12,20 +14,23 @@ Make sure you visit [https://dev.toopher.com](https://dev.toopher.com) to get ac
1214
## ToopherApi Workflow
1315

1416
### Step 1: Pair
15-
Before you can enhance your website's actions with Toopher, your customers will need to pair their mobile device's Toopher app with your website. To do this, they generate a unique pairing phrase from within the app on their mobile device. You will need to prompt them for a pairing phrase as part of the Toopher enrollment process. Once you have a pairing phrase, just send it to the Toopher web service and we'll return a pairing ID that you can use whenever you want to authenticate an action for that user.
17+
Before you can enhance your website's actions with Toopher, your customers will need to pair their mobile device's Toopher app with your website. To do this, they generate a unique pairing phrase from within the app on their mobile device. You will need to prompt them for a pairing phrase as part of the Toopher enrollment process. Once you have a pairing phrase, just send it to the Toopher web service along with your requester credentials and we'll return a pairing ID that you can use whenever you want to authenticate an action for that user.
1618

1719
```python
1820
import toopher
1921

20-
# Create an API Object Using Your Credentials
22+
# Create an API object using your credentials
2123
api = toopher.ToopherApi("<your consumer key>", "<your consumer secret>")
2224

2325
# Step 1 - Pair with their mobile device's Toopher app
2426
pairing = api.pair("username@yourservice.com", "pairing phrase")
2527
```
2628

2729
### Step 2: Authenticate
28-
You have complete control over what actions you want to authenticate using Toopher (for example: logging in, changing account information, making a purchase, etc.). Just send us the user's pairing ID and a name for the terminal they're using and we'll make sure they actually want it to happen.
30+
You have complete control over what actions you want to authenticate using Toopher (logging in, changing account
31+
information, making a purchase, etc.). Just send us the username or pairing ID and we'll make sure they actually want it to happen
32+
. You can also choose to provide the following optional parameters: terminal name, requester specified ID and
33+
action name (*default: "Log in"*).
2934

3035
```python
3136
# Step 2 - Authenticate a log in
@@ -38,18 +43,19 @@ if not authentication_request.pending and authentication_request.granted:
3843
```
3944

4045
## ToopherIframe Workflow
46+
4147
### Step 1: Embed a request in an IFRAME
4248
1. Generate an authentication URL by providing a username.
4349
2. Display a webpage to your user that embeds this URL within an `<iframe>` element.
4450

4551
```python
4652
import toopher
4753

48-
# Create an API Object Using Your Credentials
54+
# Create an API object using your credentials
4955
iframe_api = toopher.ToopherIframe("<your consumer key>", "<your consumer secret>")
5056

5157

52-
auth_iframe_url = iframe_api.get_authentication_url(username);
58+
auth_iframe_url = iframe_api.get_authentication_url("username@yourservice.com");
5359

5460
# Add an <iframe> element to your HTML:
5561
# <iframe id="toopher_iframe" src=auth_iframe_url />
@@ -63,7 +69,7 @@ The simplest way to validate the postback data is to call `is_authentication_gra
6369
# Retrieve the postback data as a string from POST parameter 'iframe_postback_data'
6470
postback_data = request.args['iframe_postback_data']
6571

66-
# Returns boolean indicating if user should be granted access
72+
# Returns boolean indicating if authentication request was granted by user
6773
authentication_request_granted = iframe_api.is_authentication_granted(postback_data)
6874

6975
if authentication_request_granted:
@@ -74,7 +80,8 @@ if authentication_request_granted:
7480
If any request runs into an error a `ToopherApiError` will be thrown with more details on what went wrong.
7581

7682
### Demo
77-
Check out `demo.py` for an example program that walks you through the whole process! Just download the contents of this repo, make sure you have the dependencies listed above installed, and then run it like-a-this:
83+
Check out `demo.py` for an example program that walks you through the whole process! Just download the contents of
84+
this repo, make sure you have the dependencies installed, and run the command below:
7885
```shell
7986
$ python demo.py
8087
```
@@ -89,10 +96,10 @@ $ pip install -r requirements.txt
8996
```
9097

9198
### Tests
92-
To run tests using [nose](http://nose.readthedocs.org/en/latest/) enter:
99+
To run the tests using [nose](http://nose.readthedocs.org/en/latest/) enter:
93100
```shell
94101
$ nosetests test
95102
```
96103

97104
## License
98-
ToopherPython is licensed under the MIT License. See LICENSE.txt for the full license text.
105+
ToopherPython is licensed under the MIT License. See LICENSE.txt for the full text.

0 commit comments

Comments
 (0)