diff --git a/API.md b/API.md index 2a90caf..ea2a6f9 100644 --- a/API.md +++ b/API.md @@ -7,22 +7,22 @@ | Notecard API | Python Library API | | -----------------------| -------------------| | `card.attn` | card.attn | -| `card.aux` | NOT IMPLEMENTED | -| `card.contact` | NOT IMPLEMENTED | -| `card.location.mode` | NOT IMPLEMENTED | -| `card.location.track` | NOT IMPLEMENTED | -| `card.motion.mode` | NOT IMPLEMENTED | -| `card.motion.sync` | NOT IMPLEMENTED | -| `card.motion.track` | NOT IMPLEMENTED | -| `card.restart` | NOT IMPLEMENTED | -| `card.restore` | NOT IMPLEMENTED | +| `card.aux` | NOT IMPLEMENTED | +| `card.contact` | NOT IMPLEMENTED | +| `card.location.mode` | NOT IMPLEMENTED | +| `card.location.track` | NOT IMPLEMENTED | +| `card.motion.mode` | NOT IMPLEMENTED | +| `card.motion.sync` | NOT IMPLEMENTED | +| `card.motion.track` | NOT IMPLEMENTED | +| `card.restart` | NOT IMPLEMENTED | +| `card.restore` | NOT IMPLEMENTED | | `card.status` | card.status | | `card.temp` | card.temp | | `card.time` | card.time | -| `card.usage.get` | NOT IMPLEMENTED | -| `card.usage.test` | NOT IMPLEMENTED | -| `card.version` | card.version | -| `card.voltage` | card.voltage | +| `card.usage.get` | NOT IMPLEMENTED | +| `card.usage.test` | NOT IMPLEMENTED | +| `card.version` | card.version | +| `card.voltage` | card.voltage | | `card.wireless` | card.wireless | ## Note Commands @@ -36,6 +36,7 @@ | `note.delete` | note.delete | | `note.get` | note.get | | `note.update` | note.update | +| `note.template` | note.template | ## Hub Commands @@ -63,9 +64,9 @@ | Notecard API | Python Library API | | -----------------------| -------------------| -| `default` | env.default | -| `get` | env.get | -| `modified` | env.modified | +| `env.default` | env.default | +| `env.get` | env.get | +| `env.modified` | env.modified | | `set` | env.set | ## File Commands @@ -85,4 +86,4 @@ | -----------------------| -------------------| | `web.get` | NOT IMPLEMENTED | | `web.post` | NOT IMPLEMENTED | -| `web.put` | NOT IMPLEMENTED | \ No newline at end of file +| `web.put` | NOT IMPLEMENTED | diff --git a/README.md b/README.md index c5af8fa..babb90c 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,9 @@ card = notecard.OpenI2C(port, 0, 0) Whether using Serial or I2C, sending Notecard requests and reading responses follows the same pattern: -1. Create a JSON object that adheres to the Notecard API -2. Call `card.Transaction`, `card.Request` or `card.RequestResponse` and pass - in the request JSON object. +1. Create a JSON object that adheres to the Notecard API. +2. Call `Transaction` on a `Notecard` object and pass in the request JSON +object. 3. Make sure the response contains the data you need ```python @@ -101,12 +101,11 @@ print(rsp) # {"total":1} ### Using the Library Fluent API The `notecard` class allows complete access to the Notecard API via manual JSON -object construction and the `Transaction`, `Request`, and `RequestResponse` -methods. Alternatively, you can import one or more Fluent API helpers to work - with common aspects of the Notecard API without having to author JSON objects, - by hand. **Note** that not all aspects of the Notecard API are available using - these helpers. For a complete list of supported helpers, visit the - [API](API.md) doc. +object construction and the `Transaction` method. Alternatively, you can import +one or more Fluent API helpers to work with common aspects of the Notecard API +without having to author JSON objects, by hand. **Note** that not all aspects of +the Notecard API are available using these helpers. For a complete list of +supported helpers, visit the [API](API.md) doc. Here's an example that uses the `hub` helper to set the Notecard Product UID in CircuitPython: diff --git a/docs/api.md b/docs/api.md index 0aea11d..5391fe4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -618,8 +618,6 @@ class notecard::notecard::OpenSerial --------------------------------|--------------------------------------------- `public `[`uart`](#classnotecard_1_1notecard_1_1_open_serial_1a535a6dffc769a9f55214ea22095f598f) | `public `[`lock`](#classnotecard_1_1notecard_1_1_open_serial_1afbc7e0e12502762f8d7a205085ec9deb) | -`public def `[`Request`](#classnotecard_1_1notecard_1_1_open_serial_1aed3df72d86f07f5960500b811213db68)`(self,req)` | Call the Transaction method and discard the result. -`public def `[`RequestResponse`](#classnotecard_1_1notecard_1_1_open_serial_1aec9d0d2754f4d8744c4db8d9488c859f)`(self,req)` | Call the Transaction method and return the result. `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. `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. `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 #### `public `[`lock`](#classnotecard_1_1notecard_1_1_open_serial_1afbc7e0e12502762f8d7a205085ec9deb) -#### `public def `[`Request`](#classnotecard_1_1notecard_1_1_open_serial_1aed3df72d86f07f5960500b811213db68)`(self,req)` - -Call the Transaction method and discard the result. - -#### `public def `[`RequestResponse`](#classnotecard_1_1notecard_1_1_open_serial_1aec9d0d2754f4d8744c4db8d9488c859f)`(self,req)` - -Call the Transaction method and return the result. - #### `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.