Skip to content

Commit 4d27705

Browse files
Update Notecard API from upstream schema changes (7ca219c11bbf9c76da818877668c7a07710104cb) (#154)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 2e00398 commit 4d27705

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

notecard/web.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def get(card, async_=None, binary=None, body=None, content=None, file=None, max=
9595

9696

9797
@validate_card_object
98-
def post(card, async_=None, binary=None, body=None, content=None, file=None, label=None, max=None, name=None, note=None, offset=None, payload=None, route=None, seconds=None, status=None, total=None, verify=None):
98+
def post(card, async_=None, binary=None, body=None, content=None, file=None, max=None, name=None, note=None, offset=None, payload=None, route=None, seconds=None, status=None, total=None, verify=None):
9999
"""Perform a simple HTTP or HTTPS `POST` request against an external endpoint, and returns the response to the Notecard.
100100
101101
Args:
@@ -105,7 +105,6 @@ def post(card, async_=None, binary=None, body=None, content=None, file=None, lab
105105
body (dict): The JSON body to send with the request.
106106
content (str): The MIME type of the body or payload of the response. Default is `application/json`.
107107
file (str): The name of the local-only Database Notefile (`.dbx`) to be used if the web request is issued asynchronously and you wish to store the response.
108-
label (str): A label for the upload, typically a filename.
109108
max (int): The maximum size of the response from the remote server, in bytes. Useful if a memory-constrained host wants to limit the response size.
110109
name (str): A web URL endpoint relative to the host configured in the Proxy Route. URL parameters may be added to this argument as well (e.g. `/addReading?id=1`).
111110
note (str): The unique Note ID for the local-only Database Notefile (`.dbx`). Only used with asynchronous web requests (see `file` argument above).
@@ -131,8 +130,6 @@ def post(card, async_=None, binary=None, body=None, content=None, file=None, lab
131130
req["content"] = content
132131
if file:
133132
req["file"] = file
134-
if label:
135-
req["label"] = label
136133
if max is not None:
137134
req["max"] = max
138135
if name:
@@ -157,7 +154,7 @@ def post(card, async_=None, binary=None, body=None, content=None, file=None, lab
157154

158155

159156
@validate_card_object
160-
def put(card, async_=None, binary=None, body=None, content=None, file=None, label=None, max=None, name=None, note=None, offset=None, payload=None, route=None, seconds=None, status=None, total=None, verify=None):
157+
def put(card, async_=None, binary=None, body=None, content=None, file=None, max=None, name=None, note=None, offset=None, payload=None, route=None, seconds=None, status=None, total=None, verify=None):
161158
"""Perform a simple HTTP or HTTPS `PUT` request against an external endpoint, and returns the response to the Notecard.
162159
163160
Args:
@@ -167,7 +164,6 @@ def put(card, async_=None, binary=None, body=None, content=None, file=None, labe
167164
body (dict): The JSON body to send with the request.
168165
content (str): The MIME type of the body or payload of the response. Default is `application/json`.
169166
file (str): The name of the local-only Database Notefile (`.dbx`) to be used if the web request is issued asynchronously and you wish to store the response.
170-
label (str): A label for the upload, typically a filename.
171167
max (int): The maximum size of the response from the remote server, in bytes. Useful if a memory-constrained host wants to limit the response size. Default (and maximum value) is 8192.
172168
name (str): A web URL endpoint relative to the host configured in the Proxy Route. URL parameters may be added to this argument as well (e.g. `/updateReading?id=1`).
173169
note (str): The unique Note ID for the local-only Database Notefile (`.dbx`). Only used with asynchronous web requests (see `file` argument above).
@@ -193,8 +189,6 @@ def put(card, async_=None, binary=None, body=None, content=None, file=None, labe
193189
req["content"] = content
194190
if file:
195191
req["file"] = file
196-
if label:
197-
req["label"] = label
198192
if max is not None:
199193
req["max"] = max
200194
if name:

0 commit comments

Comments
 (0)