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
Help center translations API #48
Conversation
|
||
# Since Zendesk2::Request#find! calls .to_i on hash keys, we need an integer | ||
# key for this. | ||
key = [source_type, source_id, locale].join("-").each_byte.inject(0) {|char, acc| acc + char } |
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.
we should either pull this function up or lift the to_i
restriction on find!
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 seem to recall the to_i
restriction was because of people using :symbol
and "text"
keys for the service.data
hash? I'll pull this into a class method.
https://developer.zendesk.com/rest_api/docs/help_center/translations Translations API to update article title & body, section title and category title.
Typo in categories URL. Allow filtering with `locale` or `locales` arguments when listing translations
Extracted out the shared methods in various request classes to the `TranslationSource` module. Also pulled out the `source=` method into the module.
Check if the params has the `translations` key when looking for `source_id` and `source_type`. If it doesn't then look at the root of the params for the attributes. This way we can reuse the module for all our translation requests.
0514c07
to
3e149e0
Compare
@omgitsads cheers 🍻 |
https://developer.zendesk.com/rest_api/docs/help_center/translations
Translations API to update article title & body, section title and
category title.