Stylistic and stylistic-adjacent corrections to documentation.
More elaborate explanation on how to set the subscription key, including options for non-interactive environments and explicitly introducing the concept of secrets management.
Substantial corrections to documentation, including clarification of the environment variable being used (it is DTM_SUBSCRIPTION_KEY, not DTM_API_KEY).
Apparently inconsequential change in API endpoint URL used by get_all_operations(): from "https://dtmapi.iom.int/v3/displacement/operation-List" to https://dtmapi.iom.int/v3/displacement/operation-list", but worth implementing to be safe and exact.
To manage this requirement in the dtmapi package, a new function,
set_subscription_key(), is introduced. Calling it without arguments prompts
the user to enter their subscription key, which will make the key available for
a given R session through the environment variable DTM_SUBSCRIPTION_KEY.
The functions which make API calls (such as get_idp_admin1_data()) have been
changed to make the subscription key that is assigned to the environment
variable part of the API request, since a valid key is a requirement for
the API.
dtmapi package, but it may technically be used by users to conveniently
return the currently available subscription key. HOWEVER, beware that the string
it returns is plain text and is more easily exposed, e.g. exposed to anyone
visually observing your machine.