Skip to content

Commit ef31c13

Browse files
author
Max Gutman
committed
Updated examples. Removed RPM spec.
1 parent a1c5437 commit ef31c13

File tree

3 files changed

+12
-80
lines changed

3 files changed

+12
-80
lines changed

README.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Zendesk Python Library is available on pypi, so installation should be fairly si
2626
Example Use
2727
-----------------------------------------------------------------------------------------------------
2828

29-
from zendesk import Zendesk, get_id_from_url
29+
from zendesk import Zendesk, get_id_from_url
3030

3131
################################################################
3232
## NEW CONNECTION CLIENT
@@ -49,14 +49,14 @@ Example Use
4949
'description': 'please reheat my coffee',
5050
'set_tags': 'coffee drinks',
5151
'ticket_field_entries': [
52-
{
53-
'ticket_field_id': 1,
54-
'value': 'venti'
55-
},
56-
{
57-
'ticket_field_id': 2,
58-
'value': '$10'
59-
}
52+
{
53+
'ticket_field_id': 1,
54+
'value': 'venti'
55+
},
56+
{
57+
'ticket_field_id': 2,
58+
'value': '$10'
59+
}
6060
]
6161
}
6262
}

Rpm.spec

-64
This file was deleted.

examples/__init__.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
import re
21
from zendesk import Zendesk
32

4-
def get_id_from_url(url):
5-
match = re.match(r".*/(?P<identifier>\d+)\.(json|xml)", url)
6-
if match and match.group('identifier'):
7-
return match.group('identifier')
8-
9-
103
################################################################
114
## NEW CONNECTION CLIENT
125
################################################################
@@ -49,6 +42,9 @@ def get_id_from_url(url):
4942
}
5043
}
5144
ticket_url = zendesk.create_ticket(data=new_ticket)
45+
46+
# Need ticket ID?
47+
from zendesk import get_id_from_url
5248
ticket_id = get_id_from_url(ticket_url)
5349

5450
# Show

0 commit comments

Comments
 (0)