-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dictionary Info GET method. #122
Conversation
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/682/dictionary/6mJXuCi2Mf19uHRefZJZBg/info | ||
method: GET | ||
response: | ||
body: '{"last_updated": "2019-06-04 19:23:11", "digest": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "item_count": 4}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled these values from the API documentation, but confirmed the format with our Fastly setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jmaingard, thank you for your contribution and apologies it's taken so long for us to review your changes. All looks good to me other than some minor consistency comments.
Thanks for rounding back to this one @phamann. I've made the suggested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
@philippschulte Unless you have any further comments, this could also be merged for our upcoming release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmhobbs thanks for your contribution! I have reviewed the PR and found only minor changes before we can finally merge the PR. Let me know if you have any questions about my comments or if you need help.
Previously, the documentation did not match API, which returns a different time format string than the others in the API.
46ecafc
to
ffbe533
Compare
9e6be7f
to
e736ee6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful! Thank you for your contribution! We'll take care of the testing documentation.
Adds the DictionaryInfo struct and the method to retrieve it from the API.
This one is a bit odd, as the timestamp format is not standardized to the rest of the API. I reported this irregularity and the current fix was to update the documentation for now, with the API changing at an undetermined point in the future.
As such, I had to shoehorn in some different timestamp parsing. Please let me know if there is a better way to do that, as I'm not terribly familiar with where I can hook into mapstructure. I had hoped to add another struct tag to target only this field, but I couldn't sort that out.
Thanks!