Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 authored Jul 1, 2021
1 parent 9edb419 commit 2e13c9a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ A Python based parser and RESTful API for ECN's webqueue.
See https://pages.github.itap.purdue.edu/ECN/webqueue2-api/

## Installation
1. Create virtual environment named __venv__
```bash
# Create virtual environment named __venv__
python3 -m venv __venv__
# Active virtual environment
```
2. Active virtual environment
```bash
source __venv__/bin/activate
# Update pip
```
3. Update pip
```bash
pip install -U pip
# Install package
```
4. Install package
```bash
pip install git+https://github.itap.purdue.edu/ECN/webqueue2-api@1.0.0#egg=webqueue2api
```

Expand Down Expand Up @@ -40,10 +46,12 @@ print( len( ce_1.subject ) )
```

## API Usage
1. Start the API in the background
```bash
# Start the API in the background
gunicorn --daemon webqueue2api.api:app
# Login
```
2. Login (replace `bob` and `super_secret` with your career account credentials.)
```bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"username": "bob", "password": "super_secret"}' \
Expand All @@ -53,6 +61,7 @@ curl -X POST \
# Expected Output
{"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjUxMTc4OTAsIm5iZiI6MTYyNTExNzg5MCwianRpIjoiMzZhODYzYmEtNmFhNS00NDc1LTk5NmYtMjhjMTcxZTc4N2M5IiwiZXhwIjoxNjI1MTE4NzkwLCJzdWIiOiJjYW1wYjMwMyIsImZyZXNoIjpmYWxzZSwidHlwZSI6ImFjY2VzcyIsImNzcmYiOiJkZDA4NmYzMi1lYTEwLTQxNmYtODg3NS1iZTFjZDkwZjkwMTAifQ.SEf_oTxr5vtvMndGtHo9By51LBgAWEQAVcX_N5t0twA"}
```

## Contributing
1. Clone the git repo:
```bash
Expand Down

0 comments on commit 2e13c9a

Please sign in to comment.