Skip to content

Commit

Permalink
Improvements to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
hughtopping committed Feb 6, 2017
1 parent 9eb0ccf commit 73dcabe
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# spektrixpython
A Python module for interacting with Spektrix API v3. This is module is written by a third party and is not supported by or affiliated with Spektrix.
A Python module for interacting with Spektrix API v3. This module is written
by a third party and is not supported by or affiliated with Spektrix.

For API v3 documentation, visit `https://system.spektrix.com/<clientname>/api/help`,
replacing `<clientname>` with your Spektrix system name.

## Usage

### Installation

`pip install spektrixpython`

### Example
Create a `spektrixpython.ini` config file from the `spektrixpython.ini.sample` template and fill in the details for your Spektrix system.

Create a `spektrixpython.ini` config file from the `spektrixpython.ini.sample` template.
### Example

```python
from spektrixpython import SpektrixRequest
Expand All @@ -18,11 +22,19 @@ from spektrixpython import SpektrixRequest
events = SpektrixRequest('events').get()
print events

# Create a new basket and print the Id
basket = SpektrixRequest('baskets').post()
print basket['id']
# Create a new basket
basket = SpektrixRequest('baskets').post()['id']

# Add a merchandise item to the newly created basket
endpoint = 'baskets/{}/merchandise'.format(basket)

# Replace this stockItem Id with one from your Spektrix system.
payload = {'stockItem':'1AHGJDSMMPLMPPGNLJBQVLBRSKVDLQRPP'}

SpektrixRequest(endpoint).post(payload)
```

## License

This module is licensed under the MIT License. Please see the LICENSE file for full details.
This module is licensed under the MIT License. Please see the LICENSE file for
full details.

0 comments on commit 73dcabe

Please sign in to comment.