@@ -2242,6 +2242,13 @@ public Iterable<Translation> getArticleTranslations(Long articleId) {
2242
2242
handleList (Translation .class , "translations" ));
2243
2243
}
2244
2244
2245
+ public Translation getArticleTranslation (long articleId , String locale ) {
2246
+ return complete (submit (req ("GET" ,
2247
+ tmpl ("/help_center/articles/{articleId}/translations/{locale}.json" )
2248
+ .set ("articleId" , articleId ).set ("locale" , locale )),
2249
+ handle (Translation .class , "translation" )));
2250
+ }
2251
+
2245
2252
public Article createArticle (Article article ) {
2246
2253
checkHasSectionId (article );
2247
2254
return complete (submit (req ("POST" , tmpl ("/help_center/sections/{id}/articles.json" ).set ("id" , article .getSectionId ()),
@@ -2333,6 +2340,14 @@ public Iterable<Translation> getCategoryTranslations(Long categoryId) {
2333
2340
tmpl ("/help_center/categories/{categoryId}/translations.json" ).set ("categoryId" , categoryId ),
2334
2341
handleList (Translation .class , "translations" ));
2335
2342
}
2343
+
2344
+ public Translation getCategoryTranslation (long categoryId , String locale ) {
2345
+ return complete (submit (req ("GET" ,
2346
+ tmpl ("/help_center/categories/{categoryId}/translations/{locale}.json" )
2347
+ .set ("categoryId" , categoryId ).set ("locale" , locale )),
2348
+ handle (Translation .class , "translation" )));
2349
+ }
2350
+
2336
2351
public Category createCategory (Category category ) {
2337
2352
return complete (submit (req ("POST" , cnst ("/help_center/categories.json" ),
2338
2353
JSON , json (Collections .singletonMap ("category" , category ))), handle (Category .class , "category" )));
@@ -2384,6 +2399,14 @@ public Iterable<Translation> getSectionTranslations(Long sectionId) {
2384
2399
tmpl ("/help_center/sections/{sectionId}/translations.json" ).set ("sectionId" , sectionId ),
2385
2400
handleList (Translation .class , "translations" ));
2386
2401
}
2402
+
2403
+ public Translation getSectionTranslation (long sectionId , String locale ) {
2404
+ return complete (submit (req ("GET" ,
2405
+ tmpl ("/help_center/sections/{sectionId}/translations/{locale}.json" )
2406
+ .set ("sectionId" , sectionId ).set ("locale" , locale )),
2407
+ handle (Translation .class , "translation" )));
2408
+ }
2409
+
2387
2410
public Section createSection (Section section ) {
2388
2411
checkHasCategoryId (section );
2389
2412
return complete (submit (req ("POST" , tmpl ("/help_center/categories/{id}/sections.json" ).set ("id" , section .getCategoryId ()),
0 commit comments