inbo / iassetR

Interact with the iAsset api using R
https://inbo.github.io/iassetR/
Other
0 stars 1 forks source link

write a readme #4

Closed PietrH closed 6 months ago

PietrH commented 9 months ago

Ideally we'd also add a vignette on how to use the package, but this is something for beyond v0.1.

Things to mention in the readme:

PietrH commented 8 months ago

@SanderDevisscher Would you be willing to tackle this?

PietrH commented 8 months ago

I think the basic example could be something like;

# You need an access token to talk to the iAsset API. You can reuse this token
# over multiple requests, but you need to request a new one at least once every
# 24 hours.
my_token <- get_access_token("my_username")
# By default the package will only look on the `riparias` domain, and only for
# the `Vespa-Watch` custom inspection. If you don't provide an access token, the
# package will try to create one.
get_records(inspection_name = "Vespa-Watch", access_token = my_token)

It would be great if we could include a few rows of output as well, but we'd need to be really careful on what data we put in there.