Closed stephhazlitt closed 5 years ago
Definitely agree. Probably a message over a warning (and probably just once per session).
Actually @stephhazlitt and @boshek - should this be in bcdc_get_data
rather than bcdc_get_record
? The latter is more likely to be scripted and thus vulnerable to changing names. Or both?
Another thought - a warning might actually be better since it shows up after the output, a message is printed first so could easily be missed.
I think bcdc_get_data()
for v0.1.0—and maybe also/eventually in bcdc_get_record()
for those that may do list gymnastics with the output of bcdc_get_record
as a feeder to getting the data?
It's easy enough to put it in both right now while I'm working on it...
Warnings are the new messages 😆
Another thought - a warning might actually be better since it shows up after the output, a message is printed first so could easily be missed.
Ok, weedy question. One warning per session regardless of the function? Or once per function per session? I.e., if call bcdc_get_record
with a name and get a warning, should you also get a warning if you call bcdc_get_data
with a name in the same session?
I ask because there is also bcdc_query_geodata
, bcdc_preview
, and bcdc_describe_feature
I'm going to go with just once for now - much simpler to implement.
You can get a record with both the record id (
bcdc_get_record("76b1b7a3-2112-4444-857a-afccf7b20da8"
) and the record name (bcdc_get_record("bc-airports"
). Users should get a warning in the console if they use the name -- while fine interactively, this is a more fragile approach in scripts as record names can change (with no redirects). Record IDs do not change.