Add extra metadata elements to record_summary and strip unicode characters #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I did two more things that I found I needed in this package. You are welcome to incorporate these if you think they make sense.
For my use cases, I really wanted to include the ORCID identifier in the summary response so that I always have that value in the object returned when running a bunch of these to build a dataset. I also added the last-modified-date property and included a new function to convert the timestamp values to an ISO8601 date string.
The other thing I found when looking through the responses (and validating this in the raw ORCID API response) were Unicode characters in some strings. I added a function to "deunicode" these, incorporated that into __get_value_from_keys function, and added a new function to handle this in the three cases where we need to put keys from an address object together. You may have a more elegant way of handling this, but it works well for my test cases.