Skip to content

Commit e4fd4c2

Browse files
committed
Clean up the docs.
- Add note.template to API.md. - Remove references to Request and RequestResponse methods that do not exist.
1 parent 108cf6e commit e4fd4c2

File tree

3 files changed

+26
-36
lines changed

3 files changed

+26
-36
lines changed

API.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
| Notecard API | Python Library API |
88
| -----------------------| -------------------|
99
| `card.attn` | card.attn |
10-
| `card.aux` | NOT IMPLEMENTED |
11-
| `card.contact` | NOT IMPLEMENTED |
12-
| `card.location.mode` | NOT IMPLEMENTED |
13-
| `card.location.track` | NOT IMPLEMENTED |
14-
| `card.motion.mode` | NOT IMPLEMENTED |
15-
| `card.motion.sync` | NOT IMPLEMENTED |
16-
| `card.motion.track` | NOT IMPLEMENTED |
17-
| `card.restart` | NOT IMPLEMENTED |
18-
| `card.restore` | NOT IMPLEMENTED |
10+
| `card.aux` | NOT IMPLEMENTED |
11+
| `card.contact` | NOT IMPLEMENTED |
12+
| `card.location.mode` | NOT IMPLEMENTED |
13+
| `card.location.track` | NOT IMPLEMENTED |
14+
| `card.motion.mode` | NOT IMPLEMENTED |
15+
| `card.motion.sync` | NOT IMPLEMENTED |
16+
| `card.motion.track` | NOT IMPLEMENTED |
17+
| `card.restart` | NOT IMPLEMENTED |
18+
| `card.restore` | NOT IMPLEMENTED |
1919
| `card.status` | card.status |
2020
| `card.temp` | card.temp |
2121
| `card.time` | card.time |
22-
| `card.usage.get` | NOT IMPLEMENTED |
23-
| `card.usage.test` | NOT IMPLEMENTED |
24-
| `card.version` | card.version |
25-
| `card.voltage` | card.voltage |
22+
| `card.usage.get` | NOT IMPLEMENTED |
23+
| `card.usage.test` | NOT IMPLEMENTED |
24+
| `card.version` | card.version |
25+
| `card.voltage` | card.voltage |
2626
| `card.wireless` | card.wireless |
2727

2828
## Note Commands
@@ -36,6 +36,7 @@
3636
| `note.delete` | note.delete |
3737
| `note.get` | note.get |
3838
| `note.update` | note.update |
39+
| `note.template` | note.template |
3940

4041
## Hub Commands
4142

@@ -63,9 +64,9 @@
6364

6465
| Notecard API | Python Library API |
6566
| -----------------------| -------------------|
66-
| `default` | env.default |
67-
| `get` | env.get |
68-
| `modified` | env.modified |
67+
| `env.default` | env.default |
68+
| `env.get` | env.get |
69+
| `env.modified` | env.modified |
6970
| `set` | env.set |
7071

7172
## File Commands
@@ -85,4 +86,4 @@
8586
| -----------------------| -------------------|
8687
| `web.get` | NOT IMPLEMENTED |
8788
| `web.post` | NOT IMPLEMENTED |
88-
| `web.put` | NOT IMPLEMENTED |
89+
| `web.put` | NOT IMPLEMENTED |

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ card = notecard.OpenI2C(port, 0, 0)
8484
Whether using Serial or I2C, sending Notecard requests and reading responses
8585
follows the same pattern:
8686

87-
1. Create a JSON object that adheres to the Notecard API
88-
2. Call `card.Transaction`, `card.Request` or `card.RequestResponse` and pass
89-
in the request JSON object.
87+
1. Create a JSON object that adheres to the Notecard API.
88+
2. Call `Transaction` on a `Notecard` object and pass in the request JSON
89+
object.
9090
3. Make sure the response contains the data you need
9191

9292
```python
@@ -101,12 +101,11 @@ print(rsp) # {"total":1}
101101
### Using the Library Fluent API
102102

103103
The `notecard` class allows complete access to the Notecard API via manual JSON
104-
object construction and the `Transaction`, `Request`, and `RequestResponse`
105-
methods. Alternatively, you can import one or more Fluent API helpers to work
106-
with common aspects of the Notecard API without having to author JSON objects,
107-
by hand. **Note** that not all aspects of the Notecard API are available using
108-
these helpers. For a complete list of supported helpers, visit the
109-
[API](API.md) doc.
104+
object construction and the `Transaction` method. Alternatively, you can import
105+
one or more Fluent API helpers to work with common aspects of the Notecard API
106+
without having to author JSON objects, by hand. **Note** that not all aspects of
107+
the Notecard API are available using these helpers. For a complete list of
108+
supported helpers, visit the [API](API.md) doc.
110109

111110
Here's an example that uses the `hub` helper to set the Notecard Product UID
112111
in CircuitPython:

docs/api.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,6 @@ class notecard::notecard::OpenSerial
618618
--------------------------------|---------------------------------------------
619619
`public `[`uart`](#classnotecard_1_1notecard_1_1_open_serial_1a535a6dffc769a9f55214ea22095f598f) |
620620
`public `[`lock`](#classnotecard_1_1notecard_1_1_open_serial_1afbc7e0e12502762f8d7a205085ec9deb) |
621-
`public def `[`Request`](#classnotecard_1_1notecard_1_1_open_serial_1aed3df72d86f07f5960500b811213db68)`(self,req)` | Call the Transaction method and discard the result.
622-
`public def `[`RequestResponse`](#classnotecard_1_1notecard_1_1_open_serial_1aec9d0d2754f4d8744c4db8d9488c859f)`(self,req)` | Call the Transaction method and return the result.
623621
`public def `[`Command`](#classnotecard_1_1notecard_1_1_open_serial_1aa6f70223bc2bfdaf9da2667f4181d4ad)`(self,req)` | Perform a [Notecard](#classnotecard_1_1notecard_1_1_notecard) command and exit with no response.
624622
`public def `[`Transaction`](#classnotecard_1_1notecard_1_1_open_serial_1aeb9a39cf7f794a38e8aadd1d9db6f7c7)`(self,req)` | Perform a [Notecard](#classnotecard_1_1notecard_1_1_notecard) transaction and return the result.
625623
`public def `[`Reset`](#classnotecard_1_1notecard_1_1_open_serial_1a849ee6e929c9dd79438f0fa6df78a3c0)`(self)` | Reset the [Notecard](#classnotecard_1_1notecard_1_1_notecard).
@@ -631,14 +629,6 @@ class notecard::notecard::OpenSerial
631629

632630
#### `public `[`lock`](#classnotecard_1_1notecard_1_1_open_serial_1afbc7e0e12502762f8d7a205085ec9deb)
633631

634-
#### `public def `[`Request`](#classnotecard_1_1notecard_1_1_open_serial_1aed3df72d86f07f5960500b811213db68)`(self,req)`
635-
636-
Call the Transaction method and discard the result.
637-
638-
#### `public def `[`RequestResponse`](#classnotecard_1_1notecard_1_1_open_serial_1aec9d0d2754f4d8744c4db8d9488c859f)`(self,req)`
639-
640-
Call the Transaction method and return the result.
641-
642632
#### `public def `[`Command`](#classnotecard_1_1notecard_1_1_open_serial_1aa6f70223bc2bfdaf9da2667f4181d4ad)`(self,req)`
643633

644634
Perform a [Notecard](#classnotecard_1_1notecard_1_1_notecard) command and exit with no response.

0 commit comments

Comments
 (0)