-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add webqueue2api Package Getting Started docs
- Loading branch information
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
nav: | ||
- index.md | ||
- 'Dev Environment Setup Guide.md' | ||
- API: api | ||
- API: api | ||
- webqueue2api Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
See the [API Docs](api/Getting Started/). | ||
See the [API Docs](api/Getting Started/). | ||
|
||
See the [Python Package Docs](webqueue2api%20Package/Getting%20Started/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Getting Started | ||
|
||
The webqueue2api Package is the base of the [webqueue2 API](http://127.0.0.1:6061/ECN/webqueue2-api/api/Getting%20Started/). It consists of two primary parts: | ||
|
||
- **Parser**: allows for the programtic access of data from the ECN queue system. | ||
- **API**: exposes a [WSGI](https://wsgi.readthedocs.io/en/latest/what.html) compliant RESTful API. | ||
|
||
## Basic Usage | ||
|
||
!!! example "Load a single Queue and show its Items." | ||
```python | ||
import webqueue2api | ||
|
||
bidc_queue = webqueue2api.Queue("bidc") | ||
print(bidc_queue.items) | ||
``` | ||
```python | ||
# Expected Output | ||
[ | ||
"[bidc2] (nvatkar) Re: Un-Domain PC setup," | ||
"[bidc4] (maswabey) Question re. Autodesk Fusion 360 upda...," | ||
"[bidc3] (dgmc) Move a managed PC onto self managed," | ||
"[bidc1] (nvatkar) BIDC iPad purchase and PAL access - m..." | ||
] | ||
``` | ||
|
||
!!! example "Load a single Item and see when it was last updated." | ||
```python | ||
import webqueue2api | ||
|
||
ce_1 = webqueue2api.Item("ce", 1) | ||
print(ce_1.last_modified) | ||
``` | ||
```python | ||
# Expected Output | ||
"2021-06-04T11:01:00-0400" | ||
``` | ||
|
||
!!! example "Load all queues." | ||
```python | ||
import webqueue2api | ||
|
||
all_queues = webqueue2api.load_queues() | ||
|
||
# Print random Queue name | ||
print(all_queues[2].name) | ||
``` | ||
```python | ||
# Expected Output | ||
"che" | ||
``` | ||
|
||
!!! example "See configuration settings." | ||
```python | ||
import webqueue2api | ||
|
||
# All configuration settings. | ||
print(webqueue2api.config.parser.queue_directory) | ||
``` | ||
```python | ||
# Expected Output: | ||
"/home/pier/e/queue/Mail" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# YAML Configuration for Awesome Pages mkdocs Plugin | ||
# See: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin | ||
nav: | ||
- ... |