Skip to content

Commit aadeeb2

Browse files
committed
fix: use camelCase for APIs
1 parent 5f861a8 commit aadeeb2

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

API.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
| ----------------------- | ------------------- |
99
| `card.attn` | card.attn |
1010
| `card.aux` | card.aux |
11-
| `card.aux.serial` | card.aux_serial |
11+
| `card.aux.serial` | card.auxSerial |
1212
| `card.binary` | card.binary |
13-
| `card.binary.get` | card.binary_get |
14-
| `card.binary.put` | card.binary_put |
13+
| `card.binary.get` | card.binaryGet |
14+
| `card.binary.put` | card.binaryPut |
1515
| `card.carrier` | card.carrier |
1616
| `card.contact` | card.contact |
1717
| `card.dfu` | NOT IMPLEMENTED |
1818
| `card.illumination` | NOT IMPLEMENTED |
1919
| `card.io` | NOT IMPLEMENTED |
2020
| `card.led` | NOT IMPLEMENTED |
2121
| `card.location` | card.location |
22-
| `card.location.mode` | card.location_mode |
23-
| `card.location.track` | card.location_track |
22+
| `card.location.mode` | card.locationMode |
23+
| `card.location.track` | card.locationTrack |
2424
| `card.monitor` | NOT IMPLEMENTED |
2525
| `card.motion` | NOT IMPLEMENTED |
2626
| `card.motion.mode` | NOT IMPLEMENTED |

notecard/card.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def location(card):
232232

233233

234234
@validate_card_object
235-
def location_mode(card, mode=None, seconds=None, vseconds=None, lat=None, lon=None, max=None):
235+
def locationMode(card, mode=None, seconds=None, vseconds=None, lat=None, lon=None, max=None):
236236
"""Set location-related configuration settings.
237237
238238
Args:
@@ -269,7 +269,7 @@ def location_mode(card, mode=None, seconds=None, vseconds=None, lat=None, lon=No
269269

270270

271271
@validate_card_object
272-
def location_track(card, start=None, heartbeat=None, hours=None, sync=None, stop=None, file=None):
272+
def locationTrack(card, start=None, heartbeat=None, hours=None, sync=None, stop=None, file=None):
273273
"""Store location data in a Notefile at the periodic interval, or using a specified heartbeat.
274274
275275
Args:
@@ -325,7 +325,7 @@ def binary(card, delete=None):
325325

326326

327327
@validate_card_object
328-
def binary_get(card, cobs=None, offset=None, length=None):
328+
def binaryGet(card, cobs=None, offset=None, length=None):
329329
"""Retrieve binary data stored in the binary storage area of the Notecard.
330330
331331
Args:
@@ -350,7 +350,7 @@ def binary_get(card, cobs=None, offset=None, length=None):
350350

351351

352352
@validate_card_object
353-
def binary_put(card, offset=None, cobs=None, status=None):
353+
def binaryPut(card, offset=None, cobs=None, status=None):
354354
"""Add binary data to the binary storage area of the Notecard.
355355
356356
Args:
@@ -502,7 +502,7 @@ def aux(card, mode=None, usage=None, seconds=None, max=None, start=None, gps=Non
502502

503503

504504
@validate_card_object
505-
def aux_serial(card, mode=None, duration=None, rate=None, limit=None, max=None, ms=None, minutes=None):
505+
def auxSerial(card, mode=None, duration=None, rate=None, limit=None, max=None, ms=None, minutes=None):
506506
"""Configure various uses of the AUXTX and AUXRX pins on the Notecard's edge connector.
507507
508508
Args:

test/fluent_api/test_card.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
{}
7777
),
7878
(
79-
card.location_mode,
79+
card.locationMode,
8080
'card.location.mode',
8181
{
8282
'mode': 'periodic',
@@ -88,7 +88,7 @@
8888
}
8989
),
9090
(
91-
card.location_track,
91+
card.locationTrack,
9292
'card.location.track',
9393
{
9494
'start': True,
@@ -107,7 +107,7 @@
107107
}
108108
),
109109
(
110-
card.binary_get,
110+
card.binaryGet,
111111
'card.binary.get',
112112
{
113113
'cobs': 1024,
@@ -116,7 +116,7 @@
116116
}
117117
),
118118
(
119-
card.binary_put,
119+
card.binaryPut,
120120
'card.binary.put',
121121
{
122122
'offset': 0,
@@ -163,7 +163,7 @@
163163
}
164164
),
165165
(
166-
card.aux_serial,
166+
card.auxSerial,
167167
'card.aux.serial',
168168
{
169169
'mode': 'notify,accel',

0 commit comments

Comments
 (0)