File tree 2 files changed +56
-4
lines changed
2 files changed +56
-4
lines changed Original file line number Diff line number Diff line change 657
657
'valid_params' : ['ids' ],
658
658
'method' : 'DELETE' ,
659
659
},
660
+
661
+ # Help Center
662
+ 'list_categories' : {
663
+ 'path' : '/help_center/categories.json' ,
664
+ 'method' : 'GET' ,
665
+ },
666
+
667
+ 'show_category' : {
668
+ 'path' : '/help_center/categories/{{category_id}}.json' ,
669
+ 'method' : 'GET' ,
670
+ },
671
+
672
+ 'list_category_sections' : {
673
+ 'path' : '/help_center/categories/{{category_id}}/sections.json' ,
674
+ 'method' : 'GET' ,
675
+ },
676
+
677
+ 'show_section' : {
678
+ 'path' : '/help_center/sections/{{section_id}}.json' ,
679
+ 'method' : 'GET' ,
680
+ },
681
+
682
+ 'list_category_articles' : {
683
+ 'path' : '/help_center/categories/{{category_id}}/articles.json' ,
684
+ 'valid_params' : ['include' ],
685
+ 'method' : 'GET' ,
686
+ },
687
+
688
+ 'list_section_articles' : {
689
+ 'path' : '/help_center/sections/{{section_id}}/articles.json' ,
690
+ 'method' : 'GET' ,
691
+ },
692
+
693
+ 'list_articles' : {
694
+ 'path' : '/help_center/articles.json' ,
695
+ 'method' : 'GET' ,
696
+ },
697
+
698
+ 'show_article' : {
699
+ 'path' : '/help_center/articles/{{article_id}}.json' ,
700
+ 'method' : 'GET' ,
701
+ },
702
+
703
+
704
+
660
705
}
661
706
662
707
# Patch mapping table with correct HTTP Status expected
Original file line number Diff line number Diff line change @@ -189,12 +189,19 @@ def call(self, **kwargs):
189
189
# the 'search' endpoint in an open Zendesk site doesn't return a
190
190
# 401 to force authentication. Inject the credentials in the
191
191
# headers to ensure we get the results we're looking for
192
- if re .match ("^/search\..*" , path ):
193
- self .headers ["Authorization" ] = "Basic %s" % (
192
+ # if re.match("^/search\..*", path):
193
+ # self.headers["Authorization"] = "Basic %s" % (
194
+ # base64.b64encode(self.zendesk_username + ':' +
195
+ # self.zendesk_password))
196
+ # elif "Authorization" in self.headers:
197
+ # del(self.headers["Authorization"])
198
+
199
+ # always inject the credentials, this seems to be required for
200
+ # help center endpoints
201
+ self .headers ["Authorization" ] = "Basic %s" % (
194
202
base64 .b64encode (self .zendesk_username + ':' +
195
203
self .zendesk_password ))
196
- elif "Authorization" in self .headers :
197
- del (self .headers ["Authorization" ])
204
+
198
205
199
206
# Make an http request (data replacements are finalized)
200
207
response , content = \
You can’t perform that action at this time.
0 commit comments