This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import glob | |
| import json | |
| import requests | |
| from bs4 import BeautifulSoup, Comment | |
| def main(): | |
| subdomain = 'your_subdomain' # setting | |
| email = 'your_email' # setting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from urllib.parse import urlencode | |
| import requests | |
| credentials = 'your_zendesk_email', 'your_zendesk_password' | |
| session = requests.Session() | |
| session.auth = credentials | |
| params = { | |
| 'query': 'type:ticket status:open', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use LWP::UserAgent; | |
| use JSON; | |
| use MIME::Base64; | |
| use URI::Escape; | |
| my $credentials = encode_base64('your_email_address:your_password'); | |
| my %params = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import xlrd | |
| import requests | |
| session = requests.Session() | |
| session.headers = {'Content-Type': 'application/json'} | |
| session.auth = 'your_zd_email', 'your_zd_password' | |
| url = 'https://your_subdomain.zendesk.com/api/v2/users/create_many.json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.getElementById('search_btn').addEventListener('click', search_kb, false); | |
| function search_kb(event) { | |
| event.preventDefault(); | |
| var search_string = encodeURIComponent(document.getElementById('query').value); | |
| var url = 'https://your_subdomain.zendesk.com/api/v2/help_center/articles/search.json?query=' + search_string; | |
| var my_request = new XMLHttpRequest(); | |
| my_request.open('get', url, true); | |
| my_request.onload = show_results; | |
| my_request.onerror = show_error; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('#search_btn').click(function(event) { | |
| event.preventDefault(); | |
| var search_string = encodeURIComponent($('#query').val()); | |
| $.ajax({ | |
| url: 'https://your_subdomain.zendesk.com/api/v2/help_center/articles/search.json?query=' + search_string, | |
| contentType: 'application/json', | |
| success: show_results, | |
| error: show_error | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import requests | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("id") | |
| args = parser.parse_args() | |
| hc_id = args.id | |
| session = requests.Session() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use LWP::UserAgent; | |
| use JSON; | |
| use MIME::Base64; | |
| my $num_args = $#ARGV + 1; | |
| if ($num_args != 1) { | |
| print "Usage error: list_followers.pl hc_id\n"; | |
| exit; |