zendesk_api 1.3.5 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/.yardopts +0 -2
- data/Gemfile +4 -30
- data/Gemfile.lock +38 -80
- data/Rakefile +0 -5
- data/lib/zendesk_api/actions.rb +3 -2
- data/lib/zendesk_api/client.rb +4 -1
- data/lib/zendesk_api/collection.rb +4 -0
- data/lib/zendesk_api/configuration.rb +2 -0
- data/lib/zendesk_api/middleware/request/upload.rb +1 -1
- data/lib/zendesk_api/middleware/request/url_based_access_token.rb +26 -0
- data/lib/zendesk_api/resources.rb +25 -1
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/client_spec.rb +1 -0
- data/spec/core/middleware/request/upload_spec.rb +26 -27
- data/spec/core/spec_helper.rb +27 -1
- data/spec/live/user_spec.rb +4 -2
- data/spec/live/user_view_spec.rb +16 -0
- data/spec/live/voice/phone_number_spec.rb +2 -0
- data/zendesk_api.gemspec +1 -4
- metadata +9 -191
- data/Procfile +0 -1
- data/bin/zendesk +0 -27
- data/config.ru +0 -6
- data/config/mongoid.yml +0 -81
- data/config/newrelic.yml +0 -255
- data/lib/zendesk_api/console/base.rb +0 -12
- data/lib/zendesk_api/console/console.rb +0 -144
- data/lib/zendesk_api/console/extensions.rb +0 -202
- data/lib/zendesk_api/console/options.rb +0 -41
- data/lib/zendesk_api/server/base.rb +0 -123
- data/lib/zendesk_api/server/docs/account_settings.md +0 -191
- data/lib/zendesk_api/server/docs/activity_stream.md +0 -121
- data/lib/zendesk_api/server/docs/attachments.md +0 -142
- data/lib/zendesk_api/server/docs/autocomplete.md +0 -29
- data/lib/zendesk_api/server/docs/automations.md +0 -256
- data/lib/zendesk_api/server/docs/categories.md +0 -193
- data/lib/zendesk_api/server/docs/changes_roadmap.md +0 -286
- data/lib/zendesk_api/server/docs/custom_roles.md +0 -88
- data/lib/zendesk_api/server/docs/forum_subscriptions.md +0 -139
- data/lib/zendesk_api/server/docs/forums.md +0 -229
- data/lib/zendesk_api/server/docs/group_memberships.md +0 -229
- data/lib/zendesk_api/server/docs/groups.md +0 -212
- data/lib/zendesk_api/server/docs/introduction.md +0 -165
- data/lib/zendesk_api/server/docs/job_statuses.md +0 -86
- data/lib/zendesk_api/server/docs/locales.md +0 -124
- data/lib/zendesk_api/server/docs/macros.md +0 -289
- data/lib/zendesk_api/server/docs/organizations.md +0 -271
- data/lib/zendesk_api/server/docs/problems.md +0 -117
- data/lib/zendesk_api/server/docs/requests.md +0 -274
- data/lib/zendesk_api/server/docs/satisfaction_ratings.md +0 -172
- data/lib/zendesk_api/server/docs/search.md +0 -106
- data/lib/zendesk_api/server/docs/sharing_agreements.md +0 -57
- data/lib/zendesk_api/server/docs/side_loading.md +0 -125
- data/lib/zendesk_api/server/docs/suspended_tickets.md +0 -184
- data/lib/zendesk_api/server/docs/tags.md +0 -145
- data/lib/zendesk_api/server/docs/ticket_audits.md +0 -688
- data/lib/zendesk_api/server/docs/ticket_export.md +0 -121
- data/lib/zendesk_api/server/docs/ticket_fields.md +0 -277
- data/lib/zendesk_api/server/docs/ticket_import.md +0 -65
- data/lib/zendesk_api/server/docs/ticket_metrics.md +0 -125
- data/lib/zendesk_api/server/docs/tickets.md +0 -696
- data/lib/zendesk_api/server/docs/topic_comments.md +0 -221
- data/lib/zendesk_api/server/docs/topic_subscriptions.md +0 -140
- data/lib/zendesk_api/server/docs/topic_votes.md +0 -153
- data/lib/zendesk_api/server/docs/topics.md +0 -335
- data/lib/zendesk_api/server/docs/triggers.md +0 -264
- data/lib/zendesk_api/server/docs/user_identities.md +0 -279
- data/lib/zendesk_api/server/docs/users.md +0 -455
- data/lib/zendesk_api/server/docs/views.md +0 -644
- data/lib/zendesk_api/server/helper.rb +0 -110
- data/lib/zendesk_api/server/html_renderer.rb +0 -98
- data/lib/zendesk_api/server/models/user_request.rb +0 -16
- data/lib/zendesk_api/server/models/zlib_json.rb +0 -13
- data/lib/zendesk_api/server/public/config.rb +0 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +0 -131
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +0 -658
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +0 -825
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +0 -1226
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +0 -2606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +0 -1302
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +0 -392
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +0 -283
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +0 -878
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +0 -1406
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +0 -823
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +0 -815
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +0 -357
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +0 -295
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error.html +0 -115
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/NetworkError.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +0 -371
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +0 -1559
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +0 -724
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +0 -810
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +0 -1379
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +0 -341
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +0 -797
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +0 -1189
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +0 -993
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +0 -1263
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +0 -610
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +0 -679
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +0 -1327
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +0 -494
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +0 -411
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +0 -462
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +0 -742
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +0 -610
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +0 -911
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +0 -3094
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +0 -787
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +0 -1039
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +0 -782
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +0 -1449
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +0 -1122
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +0 -983
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +0 -1039
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +0 -392
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +0 -287
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +0 -878
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +0 -1176
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +0 -3974
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +0 -926
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +0 -656
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +0 -332
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +0 -1650
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +0 -1744
- data/lib/zendesk_api/server/public/doc/_index.html +0 -799
- data/lib/zendesk_api/server/public/doc/class_list.html +0 -53
- data/lib/zendesk_api/server/public/doc/css/common.css +0 -1
- data/lib/zendesk_api/server/public/doc/css/full_list.css +0 -57
- data/lib/zendesk_api/server/public/doc/css/style.css +0 -338
- data/lib/zendesk_api/server/public/doc/file.Readme.html +0 -137
- data/lib/zendesk_api/server/public/doc/file_list.html +0 -55
- data/lib/zendesk_api/server/public/doc/frames.html +0 -28
- data/lib/zendesk_api/server/public/doc/index.html +0 -137
- data/lib/zendesk_api/server/public/doc/js/app.js +0 -214
- data/lib/zendesk_api/server/public/doc/js/full_list.js +0 -173
- data/lib/zendesk_api/server/public/doc/js/jquery.js +0 -4
- data/lib/zendesk_api/server/public/doc/method_list.html +0 -2332
- data/lib/zendesk_api/server/public/doc/top-level-namespace.html +0 -112
- data/lib/zendesk_api/server/public/favicon.ico +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
- data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
- data/lib/zendesk_api/server/public/javascripts/application.js +0 -186
- data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +0 -90
- data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +0 -96
- data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +0 -169
- data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +0 -157
- data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +0 -100
- data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +0 -218
- data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +0 -98
- data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +0 -151
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +0 -135
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +0 -275
- data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +0 -61
- data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +0 -285
- data/lib/zendesk_api/server/public/sass/screen.scss +0 -102
- data/lib/zendesk_api/server/public/sass/styles.scss +0 -5
- data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +0 -836
- data/lib/zendesk_api/server/public/stylesheets/screen.css +0 -129
- data/lib/zendesk_api/server/public/stylesheets/styles.css +0 -6208
- data/lib/zendesk_api/server/templates/footer.haml +0 -13
- data/lib/zendesk_api/server/templates/header.haml +0 -20
- data/lib/zendesk_api/server/templates/index.haml +0 -68
- data/lib/zendesk_api/server/templates/layout.haml +0 -44
- data/lib/zendesk_api/server/templates/param.haml +0 -4
- data/lib/zendesk_api/server/templates/search.haml +0 -23
- data/lib/zendesk_api/server/templates/sidebar.haml +0 -7
- data/spec/server/app_spec.rb +0 -140
- data/spec/server/helper_spec.rb +0 -97
- data/spec/server/html_renderer_spec.rb +0 -130
- data/spec/server/spec_helper.rb +0 -43
@@ -1,1226 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Class: ZendeskAPI::Client
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.5.2
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../_index.html">Index (C)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../ZendeskAPI.html" title="ZendeskAPI (module)">ZendeskAPI</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">Client</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Class: ZendeskAPI::Client
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
<dt class="r1">Inherits:</dt>
|
75
|
-
<dd class="r1">
|
76
|
-
<span class="inheritName">Object</span>
|
77
|
-
|
78
|
-
<ul class="fullTree">
|
79
|
-
<li>Object</li>
|
80
|
-
|
81
|
-
<li class="next">ZendeskAPI::Client</li>
|
82
|
-
|
83
|
-
</ul>
|
84
|
-
<a href="#" class="inheritanceTree">show all</a>
|
85
|
-
|
86
|
-
</dd>
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/zendesk_api/client.rb</dd>
|
98
|
-
|
99
|
-
</dl>
|
100
|
-
<div class="clear"></div>
|
101
|
-
|
102
|
-
<h2>Overview</h2><div class="docstring">
|
103
|
-
<div class="discussion">
|
104
|
-
|
105
|
-
<p>The top-level class that handles configuration and connection to the
|
106
|
-
Zendesk API. Can also be used as an accessor to resource collections.</p>
|
107
|
-
|
108
|
-
|
109
|
-
</div>
|
110
|
-
</div>
|
111
|
-
<div class="tags">
|
112
|
-
|
113
|
-
|
114
|
-
</div>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
119
|
-
<ul class="summary">
|
120
|
-
|
121
|
-
<li class="public ">
|
122
|
-
<span class="summary_signature">
|
123
|
-
|
124
|
-
<a href="#callbacks-instance_method" title="#callbacks (instance method)">- (Array) <strong>callbacks</strong> </a>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
</span>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
<span class="note title readonly">readonly</span>
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<span class="summary_desc"><div class='inline'>
|
144
|
-
<p>Custom response callbacks.</p>
|
145
|
-
</div></span>
|
146
|
-
|
147
|
-
</li>
|
148
|
-
|
149
|
-
|
150
|
-
<li class="public ">
|
151
|
-
<span class="summary_signature">
|
152
|
-
|
153
|
-
<a href="#config-instance_method" title="#config (instance method)">- (Configuration) <strong>config</strong> </a>
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
</span>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<span class="note title readonly">readonly</span>
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<span class="summary_desc"><div class='inline'>
|
173
|
-
<p>Config instance.</p>
|
174
|
-
</div></span>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
</ul>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
<h2>
|
186
|
-
Class Method Summary
|
187
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
188
|
-
</h2>
|
189
|
-
|
190
|
-
<ul class="summary">
|
191
|
-
|
192
|
-
<li class="public ">
|
193
|
-
<span class="summary_signature">
|
194
|
-
|
195
|
-
<a href="#check_deprecated_namespace_usage-class_method" title="check_deprecated_namespace_usage (class method)">+ (Object) <strong>check_deprecated_namespace_usage</strong>(attributes, name) </a>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
</span>
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<span class="summary_desc"><div class='inline'>
|
210
|
-
<p>show a nice warning for people using the old style api.</p>
|
211
|
-
</div></span>
|
212
|
-
|
213
|
-
</li>
|
214
|
-
|
215
|
-
|
216
|
-
</ul>
|
217
|
-
|
218
|
-
<h2>
|
219
|
-
Instance Method Summary
|
220
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
221
|
-
</h2>
|
222
|
-
|
223
|
-
<ul class="summary">
|
224
|
-
|
225
|
-
<li class="protected ">
|
226
|
-
<span class="summary_signature">
|
227
|
-
|
228
|
-
<a href="#build_connection-instance_method" title="#build_connection (instance method)">- (Object) <strong>build_connection</strong> </a>
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
</span>
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
<span class="note title protected">protected</span>
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
<span class="summary_desc"><div class='inline'>
|
243
|
-
<p>Called by <span class='object_link'><a href="#connection-instance_method" title="ZendeskAPI::Client#connection (method)">#connection</a></span> to build a connection.</p>
|
244
|
-
</div></span>
|
245
|
-
|
246
|
-
</li>
|
247
|
-
|
248
|
-
|
249
|
-
<li class="public ">
|
250
|
-
<span class="summary_signature">
|
251
|
-
|
252
|
-
<a href="#connection-instance_method" title="#connection (instance method)">- (Faraday::Connection) <strong>connection</strong> </a>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</span>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
<span class="summary_desc"><div class='inline'>
|
267
|
-
<p>Creates a connection if there is none, otherwise returns the existing
|
268
|
-
connection.</p>
|
269
|
-
</div></span>
|
270
|
-
|
271
|
-
</li>
|
272
|
-
|
273
|
-
|
274
|
-
<li class="public ">
|
275
|
-
<span class="summary_signature">
|
276
|
-
|
277
|
-
<a href="#current_account-instance_method" title="#current_account (instance method)">- (Hash) <strong>current_account</strong>(reload = false) </a>
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
</span>
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
<span class="summary_desc"><div class='inline'>
|
292
|
-
<p>Returns the current account.</p>
|
293
|
-
</div></span>
|
294
|
-
|
295
|
-
</li>
|
296
|
-
|
297
|
-
|
298
|
-
<li class="public ">
|
299
|
-
<span class="summary_signature">
|
300
|
-
|
301
|
-
<a href="#current_locale-instance_method" title="#current_locale (instance method)">- (ZendeskAPI::Locale) <strong>current_locale</strong>(reload = false) </a>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
</span>
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
<span class="summary_desc"><div class='inline'>
|
316
|
-
<p>Returns the current locale.</p>
|
317
|
-
</div></span>
|
318
|
-
|
319
|
-
</li>
|
320
|
-
|
321
|
-
|
322
|
-
<li class="public ">
|
323
|
-
<span class="summary_signature">
|
324
|
-
|
325
|
-
<a href="#current_user-instance_method" title="#current_user (instance method)">- (ZendeskAPI::User) <strong>current_user</strong>(reload = false) </a>
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
</span>
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
<span class="summary_desc"><div class='inline'>
|
340
|
-
<p>Returns the current user (aka me).</p>
|
341
|
-
</div></span>
|
342
|
-
|
343
|
-
</li>
|
344
|
-
|
345
|
-
|
346
|
-
<li class="public ">
|
347
|
-
<span class="summary_signature">
|
348
|
-
|
349
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Client) <strong>initialize</strong> {|config| ... }</a>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
</span>
|
354
|
-
|
355
|
-
|
356
|
-
<span class="note title constructor">constructor</span>
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
<span class="summary_desc"><div class='inline'>
|
366
|
-
<p>Creates a new <span class='object_link'><a href="" title="ZendeskAPI::Client (class)">Client</a></span> instance and yields <span class='object_link'><a href="#config-instance_method" title="ZendeskAPI::Client#config (method)">#config</a></span>.</p>
|
367
|
-
</div></span>
|
368
|
-
|
369
|
-
</li>
|
370
|
-
|
371
|
-
|
372
|
-
<li class="public ">
|
373
|
-
<span class="summary_signature">
|
374
|
-
|
375
|
-
<a href="#insert_callback-instance_method" title="#insert_callback (instance method)">- (Object) <strong>insert_callback</strong>(&block) </a>
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
</span>
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
<span class="summary_desc"><div class='inline'>
|
390
|
-
<p>Pushes a callback onto the stack.</p>
|
391
|
-
</div></span>
|
392
|
-
|
393
|
-
</li>
|
394
|
-
|
395
|
-
|
396
|
-
<li class="public ">
|
397
|
-
<span class="summary_signature">
|
398
|
-
|
399
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Collection) <strong>method_missing</strong>(method, *args, &block) </a>
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
</span>
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
<span class="summary_desc"><div class='inline'>
|
414
|
-
<p>Handles resources such as 'tickets'.</p>
|
415
|
-
</div></span>
|
416
|
-
|
417
|
-
</li>
|
418
|
-
|
419
|
-
|
420
|
-
</ul>
|
421
|
-
|
422
|
-
|
423
|
-
<div id="constructor_details" class="method_details_list">
|
424
|
-
<h2>Constructor Details</h2>
|
425
|
-
|
426
|
-
<div class="method_details first">
|
427
|
-
<h3 class="signature first" id="initialize-instance_method">
|
428
|
-
|
429
|
-
- (<tt><span class='object_link'><a href="" title="ZendeskAPI::Client (class)">Client</a></span></tt>) <strong>initialize</strong> {|config| ... }
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
</h3><div class="docstring">
|
436
|
-
<div class="discussion">
|
437
|
-
|
438
|
-
<p>Creates a new <span class='object_link'><a href="" title="ZendeskAPI::Client (class)">ZendeskAPI::Client</a></span> instance and yields <span class='object_link'><a href="#config-instance_method" title="ZendeskAPI::Client#config (method)">#config</a></span>.</p>
|
439
|
-
|
440
|
-
<p>Requires a block to be given.</p>
|
441
|
-
|
442
|
-
<p>Does basic configuration constraints:</p>
|
443
|
-
<ul><li>
|
444
|
-
<p><span class='object_link'><a href="Configuration.html#url-instance_method" title="ZendeskAPI::Configuration#url (method)">ZendeskAPI::Configuration#url</a></span> must be https unless <span class='object_link'><a href="Configuration.html#allow_http-instance_method" title="ZendeskAPI::Configuration#allow_http (method)">ZendeskAPI::Configuration#allow_http</a></span> is set.</p>
|
445
|
-
</li></ul>
|
446
|
-
|
447
|
-
|
448
|
-
</div>
|
449
|
-
</div>
|
450
|
-
<div class="tags">
|
451
|
-
|
452
|
-
<p class="tag_title">Yields:</p>
|
453
|
-
<ul class="yield">
|
454
|
-
|
455
|
-
<li>
|
456
|
-
|
457
|
-
|
458
|
-
<span class='type'>(<tt>config</tt>)</span>
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
</li>
|
463
|
-
|
464
|
-
</ul>
|
465
|
-
<p class="tag_title">Raises:</p>
|
466
|
-
<ul class="raise">
|
467
|
-
|
468
|
-
<li>
|
469
|
-
|
470
|
-
|
471
|
-
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
</li>
|
476
|
-
|
477
|
-
</ul>
|
478
|
-
|
479
|
-
</div><table class="source_code">
|
480
|
-
<tr>
|
481
|
-
<td>
|
482
|
-
<pre class="lines">
|
483
|
-
|
484
|
-
|
485
|
-
71
|
486
|
-
72
|
487
|
-
73
|
488
|
-
74
|
489
|
-
75
|
490
|
-
76
|
491
|
-
77
|
492
|
-
78
|
493
|
-
79
|
494
|
-
80
|
495
|
-
81
|
496
|
-
82
|
497
|
-
83
|
498
|
-
84
|
499
|
-
85
|
500
|
-
86
|
501
|
-
87
|
502
|
-
88</pre>
|
503
|
-
</td>
|
504
|
-
<td>
|
505
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 71</span>
|
506
|
-
|
507
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
508
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>block not given</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
509
|
-
|
510
|
-
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
511
|
-
<span class='kw'>yield</span> <span class='id identifier rubyid_config'>config</span>
|
512
|
-
|
513
|
-
<span class='ivar'>@callbacks</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
514
|
-
<span class='ivar'>@resource_cache</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
515
|
-
|
516
|
-
<span class='id identifier rubyid_check_url'>check_url</span>
|
517
|
-
|
518
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_retry'>retry</span> <span class='op'>=</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_retry'>retry</span> <span class='comment'># nil -> false
|
519
|
-
</span>
|
520
|
-
<span class='id identifier rubyid_set_token_auth'>set_token_auth</span>
|
521
|
-
|
522
|
-
<span class='id identifier rubyid_set_default_logger'>set_default_logger</span>
|
523
|
-
<span class='id identifier rubyid_add_warning_callback'>add_warning_callback</span>
|
524
|
-
<span class='kw'>end</span></pre>
|
525
|
-
</td>
|
526
|
-
</tr>
|
527
|
-
</table>
|
528
|
-
</div>
|
529
|
-
|
530
|
-
</div>
|
531
|
-
<div id="method_missing_details" class="method_details_list">
|
532
|
-
<h2>Dynamic Method Handling</h2>
|
533
|
-
<p class="notice this">
|
534
|
-
This class handles dynamic methods through the <tt>method_missing</tt> method
|
535
|
-
|
536
|
-
</p>
|
537
|
-
|
538
|
-
<div class="method_details first">
|
539
|
-
<h3 class="signature first" id="method_missing-instance_method">
|
540
|
-
|
541
|
-
- (<tt><span class='object_link'><a href="Collection.html" title="ZendeskAPI::Collection (class)">Collection</a></span></tt>) <strong>method_missing</strong>(method, *args, &block)
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
</h3><div class="docstring">
|
548
|
-
<div class="discussion">
|
549
|
-
|
550
|
-
<p>Handles resources such as 'tickets'. Any options are passed to the
|
551
|
-
underlying collection, except reload which disregards memoization and
|
552
|
-
creates a new Collection instance.</p>
|
553
|
-
|
554
|
-
|
555
|
-
</div>
|
556
|
-
</div>
|
557
|
-
<div class="tags">
|
558
|
-
|
559
|
-
<p class="tag_title">Returns:</p>
|
560
|
-
<ul class="return">
|
561
|
-
|
562
|
-
<li>
|
563
|
-
|
564
|
-
|
565
|
-
<span class='type'>(<tt><span class='object_link'><a href="Collection.html" title="ZendeskAPI::Collection (class)">Collection</a></span></tt>)</span>
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
—
|
570
|
-
<div class='inline'>
|
571
|
-
<p>Collection instance for resource</p>
|
572
|
-
</div>
|
573
|
-
|
574
|
-
</li>
|
575
|
-
|
576
|
-
</ul>
|
577
|
-
|
578
|
-
</div><table class="source_code">
|
579
|
-
<tr>
|
580
|
-
<td>
|
581
|
-
<pre class="lines">
|
582
|
-
|
583
|
-
|
584
|
-
31
|
585
|
-
32
|
586
|
-
33
|
587
|
-
34
|
588
|
-
35
|
589
|
-
36
|
590
|
-
37
|
591
|
-
38
|
592
|
-
39
|
593
|
-
40
|
594
|
-
41
|
595
|
-
42</pre>
|
596
|
-
</td>
|
597
|
-
<td>
|
598
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 31</span>
|
599
|
-
|
600
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
601
|
-
<span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
602
|
-
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
603
|
-
|
604
|
-
<span class='ivar'>@resource_cache</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
605
|
-
|
606
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:reload</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_cached'>cached</span> <span class='op'>=</span> <span class='ivar'>@resource_cache</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
607
|
-
<span class='id identifier rubyid_cached'>cached</span>
|
608
|
-
<span class='kw'>else</span>
|
609
|
-
<span class='ivar'>@resource_cache</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Collection</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='const'>ZendeskAPI</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Helpers</span><span class='period'>.</span><span class='id identifier rubyid_modulize_string'>modulize_string</span><span class='lparen'>(</span><span class='const'>Inflection</span><span class='period'>.</span><span class='id identifier rubyid_singular'>singular</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
610
|
-
<span class='kw'>end</span>
|
611
|
-
<span class='kw'>end</span></pre>
|
612
|
-
</td>
|
613
|
-
</tr>
|
614
|
-
</table>
|
615
|
-
</div>
|
616
|
-
|
617
|
-
</div>
|
618
|
-
|
619
|
-
<div id="instance_attr_details" class="attr_details">
|
620
|
-
<h2>Instance Attribute Details</h2>
|
621
|
-
|
622
|
-
|
623
|
-
<span id=""></span>
|
624
|
-
<div class="method_details first">
|
625
|
-
<h3 class="signature first" id="callbacks-instance_method">
|
626
|
-
|
627
|
-
- (<tt>Array</tt>) <strong>callbacks</strong> <span class="extras">(readonly)</span>
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
</h3><div class="docstring">
|
634
|
-
<div class="discussion">
|
635
|
-
|
636
|
-
<p>Custom response callbacks</p>
|
637
|
-
|
638
|
-
|
639
|
-
</div>
|
640
|
-
</div>
|
641
|
-
<div class="tags">
|
642
|
-
|
643
|
-
<p class="tag_title">Returns:</p>
|
644
|
-
<ul class="return">
|
645
|
-
|
646
|
-
<li>
|
647
|
-
|
648
|
-
|
649
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
—
|
654
|
-
<div class='inline'>
|
655
|
-
<p>Custom response callbacks</p>
|
656
|
-
</div>
|
657
|
-
|
658
|
-
</li>
|
659
|
-
|
660
|
-
</ul>
|
661
|
-
|
662
|
-
</div><table class="source_code">
|
663
|
-
<tr>
|
664
|
-
<td>
|
665
|
-
<pre class="lines">
|
666
|
-
|
667
|
-
|
668
|
-
26
|
669
|
-
27
|
670
|
-
28</pre>
|
671
|
-
</td>
|
672
|
-
<td>
|
673
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 26</span>
|
674
|
-
|
675
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_callbacks'>callbacks</span>
|
676
|
-
<span class='ivar'>@callbacks</span>
|
677
|
-
<span class='kw'>end</span></pre>
|
678
|
-
</td>
|
679
|
-
</tr>
|
680
|
-
</table>
|
681
|
-
</div>
|
682
|
-
|
683
|
-
|
684
|
-
<span id=""></span>
|
685
|
-
<div class="method_details ">
|
686
|
-
<h3 class="signature " id="config-instance_method">
|
687
|
-
|
688
|
-
- (<tt><span class='object_link'><a href="Configuration.html" title="ZendeskAPI::Configuration (class)">Configuration</a></span></tt>) <strong>config</strong> <span class="extras">(readonly)</span>
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
</h3><div class="docstring">
|
695
|
-
<div class="discussion">
|
696
|
-
|
697
|
-
<p>Config instance</p>
|
698
|
-
|
699
|
-
|
700
|
-
</div>
|
701
|
-
</div>
|
702
|
-
<div class="tags">
|
703
|
-
|
704
|
-
<p class="tag_title">Returns:</p>
|
705
|
-
<ul class="return">
|
706
|
-
|
707
|
-
<li>
|
708
|
-
|
709
|
-
|
710
|
-
<span class='type'>(<tt><span class='object_link'><a href="Configuration.html" title="ZendeskAPI::Configuration (class)">Configuration</a></span></tt>)</span>
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
—
|
715
|
-
<div class='inline'>
|
716
|
-
<p>Config instance</p>
|
717
|
-
</div>
|
718
|
-
|
719
|
-
</li>
|
720
|
-
|
721
|
-
</ul>
|
722
|
-
|
723
|
-
</div><table class="source_code">
|
724
|
-
<tr>
|
725
|
-
<td>
|
726
|
-
<pre class="lines">
|
727
|
-
|
728
|
-
|
729
|
-
24
|
730
|
-
25
|
731
|
-
26</pre>
|
732
|
-
</td>
|
733
|
-
<td>
|
734
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 24</span>
|
735
|
-
|
736
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
|
737
|
-
<span class='ivar'>@config</span>
|
738
|
-
<span class='kw'>end</span></pre>
|
739
|
-
</td>
|
740
|
-
</tr>
|
741
|
-
</table>
|
742
|
-
</div>
|
743
|
-
|
744
|
-
</div>
|
745
|
-
|
746
|
-
|
747
|
-
<div id="class_method_details" class="method_details_list">
|
748
|
-
<h2>Class Method Details</h2>
|
749
|
-
|
750
|
-
|
751
|
-
<div class="method_details first">
|
752
|
-
<h3 class="signature first" id="check_deprecated_namespace_usage-class_method">
|
753
|
-
|
754
|
-
+ (<tt>Object</tt>) <strong>check_deprecated_namespace_usage</strong>(attributes, name)
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
</h3><div class="docstring">
|
761
|
-
<div class="discussion">
|
762
|
-
|
763
|
-
<p>show a nice warning for people using the old style api</p>
|
764
|
-
|
765
|
-
|
766
|
-
</div>
|
767
|
-
</div>
|
768
|
-
<div class="tags">
|
769
|
-
|
770
|
-
|
771
|
-
</div><table class="source_code">
|
772
|
-
<tr>
|
773
|
-
<td>
|
774
|
-
<pre class="lines">
|
775
|
-
|
776
|
-
|
777
|
-
105
|
778
|
-
106
|
779
|
-
107
|
780
|
-
108
|
781
|
-
109</pre>
|
782
|
-
</td>
|
783
|
-
<td>
|
784
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 105</span>
|
785
|
-
|
786
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_check_deprecated_namespace_usage'>check_deprecated_namespace_usage</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
787
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
788
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>un-nest '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>' from the attributes</span><span class='tstring_end'>"</span></span>
|
789
|
-
<span class='kw'>end</span>
|
790
|
-
<span class='kw'>end</span></pre>
|
791
|
-
</td>
|
792
|
-
</tr>
|
793
|
-
</table>
|
794
|
-
</div>
|
795
|
-
|
796
|
-
</div>
|
797
|
-
|
798
|
-
<div id="instance_method_details" class="method_details_list">
|
799
|
-
<h2>Instance Method Details</h2>
|
800
|
-
|
801
|
-
|
802
|
-
<div class="method_details first">
|
803
|
-
<h3 class="signature first" id="build_connection-instance_method">
|
804
|
-
|
805
|
-
- (<tt>Object</tt>) <strong>build_connection</strong> <span class="extras">(protected)</span>
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
</h3><div class="docstring">
|
812
|
-
<div class="discussion">
|
813
|
-
|
814
|
-
<p>Called by <span class='object_link'><a href="#connection-instance_method" title="ZendeskAPI::Client#connection (method)">#connection</a></span> to build a connection. Can be overwritten in a
|
815
|
-
subclass to add additional middleware and make other configuration changes.</p>
|
816
|
-
|
817
|
-
<p>Uses middleware according to configuration options.</p>
|
818
|
-
|
819
|
-
<p>Request logger if logger is not nil</p>
|
820
|
-
|
821
|
-
<p>Retry middleware if retry is true</p>
|
822
|
-
|
823
|
-
|
824
|
-
</div>
|
825
|
-
</div>
|
826
|
-
<div class="tags">
|
827
|
-
|
828
|
-
|
829
|
-
</div><table class="source_code">
|
830
|
-
<tr>
|
831
|
-
<td>
|
832
|
-
<pre class="lines">
|
833
|
-
|
834
|
-
|
835
|
-
122
|
836
|
-
123
|
837
|
-
124
|
838
|
-
125
|
839
|
-
126
|
840
|
-
127
|
841
|
-
128
|
842
|
-
129
|
843
|
-
130
|
844
|
-
131
|
845
|
-
132
|
846
|
-
133
|
847
|
-
134
|
848
|
-
135
|
849
|
-
136
|
850
|
-
137
|
851
|
-
138
|
852
|
-
139
|
853
|
-
140
|
854
|
-
141
|
855
|
-
142
|
856
|
-
143
|
857
|
-
144
|
858
|
-
145
|
859
|
-
146
|
860
|
-
147
|
861
|
-
148
|
862
|
-
149
|
863
|
-
150
|
864
|
-
151
|
865
|
-
152
|
866
|
-
153</pre>
|
867
|
-
</td>
|
868
|
-
<td>
|
869
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 122</span>
|
870
|
-
|
871
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_build_connection'>build_connection</span>
|
872
|
-
<span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_builder'>builder</span><span class='op'>|</span>
|
873
|
-
<span class='comment'># response
|
874
|
-
</span> <span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>RaiseError</span>
|
875
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>Callback</span><span class='comma'>,</span> <span class='kw'>self</span>
|
876
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>Logger</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span> <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
|
877
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>ParseIsoDates</span>
|
878
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:content_type</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/json</span><span class='tstring_end'>'</span></span>
|
879
|
-
|
880
|
-
<span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>||</span> <span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_default_adapter'>default_adapter</span>
|
881
|
-
|
882
|
-
<span class='kw'>unless</span> <span class='lbracket'>[</span><span class='symbol'>:em_http</span><span class='comma'>,</span> <span class='const'>Faraday</span><span class='op'>::</span><span class='const'>Adapter</span><span class='op'>::</span><span class='const'>EMHttp</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_adapter'>adapter</span><span class='rparen'>)</span>
|
883
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>Gzip</span>
|
884
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Response</span><span class='op'>::</span><span class='const'>Deflate</span>
|
885
|
-
<span class='kw'>end</span>
|
886
|
-
|
887
|
-
<span class='comment'># request
|
888
|
-
</span> <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_access_token'>access_token</span>
|
889
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_authorization'>authorization</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bearer</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_access_token'>access_token</span><span class='rparen'>)</span>
|
890
|
-
<span class='kw'>else</span>
|
891
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>Faraday</span><span class='op'>::</span><span class='const'>Request</span><span class='op'>::</span><span class='const'>BasicAuthentication</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_password'>password</span>
|
892
|
-
<span class='kw'>end</span>
|
893
|
-
|
894
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Request</span><span class='op'>::</span><span class='const'>EtagCache</span><span class='comma'>,</span> <span class='symbol'>:cache</span> <span class='op'>=></span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_cache'>cache</span>
|
895
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Request</span><span class='op'>::</span><span class='const'>Upload</span>
|
896
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='symbol'>:multipart</span>
|
897
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='symbol'>:json</span>
|
898
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Request</span><span class='op'>::</span><span class='const'>Retry</span><span class='comma'>,</span> <span class='symbol'>:logger</span> <span class='op'>=></span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span> <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_retry'>retry</span> <span class='comment'># Should always be first in the stack
|
899
|
-
</span>
|
900
|
-
<span class='id identifier rubyid_builder'>builder</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='op'>*</span><span class='id identifier rubyid_adapter'>adapter</span>
|
901
|
-
<span class='kw'>end</span>
|
902
|
-
<span class='kw'>end</span></pre>
|
903
|
-
</td>
|
904
|
-
</tr>
|
905
|
-
</table>
|
906
|
-
</div>
|
907
|
-
|
908
|
-
<div class="method_details ">
|
909
|
-
<h3 class="signature " id="connection-instance_method">
|
910
|
-
|
911
|
-
- (<tt>Faraday::Connection</tt>) <strong>connection</strong>
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
</h3><div class="docstring">
|
918
|
-
<div class="discussion">
|
919
|
-
|
920
|
-
<p>Creates a connection if there is none, otherwise returns the existing
|
921
|
-
connection.</p>
|
922
|
-
|
923
|
-
|
924
|
-
</div>
|
925
|
-
</div>
|
926
|
-
<div class="tags">
|
927
|
-
|
928
|
-
<p class="tag_title">Returns:</p>
|
929
|
-
<ul class="return">
|
930
|
-
|
931
|
-
<li>
|
932
|
-
|
933
|
-
|
934
|
-
<span class='type'>(<tt>Faraday::Connection</tt>)</span>
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
—
|
939
|
-
<div class='inline'>
|
940
|
-
<p>Faraday connection for the client</p>
|
941
|
-
</div>
|
942
|
-
|
943
|
-
</li>
|
944
|
-
|
945
|
-
</ul>
|
946
|
-
|
947
|
-
</div><table class="source_code">
|
948
|
-
<tr>
|
949
|
-
<td>
|
950
|
-
<pre class="lines">
|
951
|
-
|
952
|
-
|
953
|
-
93
|
954
|
-
94
|
955
|
-
95
|
956
|
-
96</pre>
|
957
|
-
</td>
|
958
|
-
<td>
|
959
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 93</span>
|
960
|
-
|
961
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_connection'>connection</span>
|
962
|
-
<span class='ivar'>@connection</span> <span class='op'>||=</span> <span class='id identifier rubyid_build_connection'>build_connection</span>
|
963
|
-
<span class='kw'>return</span> <span class='ivar'>@connection</span>
|
964
|
-
<span class='kw'>end</span></pre>
|
965
|
-
</td>
|
966
|
-
</tr>
|
967
|
-
</table>
|
968
|
-
</div>
|
969
|
-
|
970
|
-
<div class="method_details ">
|
971
|
-
<h3 class="signature " id="current_account-instance_method">
|
972
|
-
|
973
|
-
- (<tt>Hash</tt>) <strong>current_account</strong>(reload = false)
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
</h3><div class="docstring">
|
980
|
-
<div class="discussion">
|
981
|
-
|
982
|
-
<p>Returns the current account</p>
|
983
|
-
|
984
|
-
|
985
|
-
</div>
|
986
|
-
</div>
|
987
|
-
<div class="tags">
|
988
|
-
|
989
|
-
<p class="tag_title">Returns:</p>
|
990
|
-
<ul class="return">
|
991
|
-
|
992
|
-
<li>
|
993
|
-
|
994
|
-
|
995
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
—
|
1000
|
-
<div class='inline'>
|
1001
|
-
<p>The attributes of the current account or nil</p>
|
1002
|
-
</div>
|
1003
|
-
|
1004
|
-
</li>
|
1005
|
-
|
1006
|
-
</ul>
|
1007
|
-
|
1008
|
-
</div><table class="source_code">
|
1009
|
-
<tr>
|
1010
|
-
<td>
|
1011
|
-
<pre class="lines">
|
1012
|
-
|
1013
|
-
|
1014
|
-
53
|
1015
|
-
54
|
1016
|
-
55
|
1017
|
-
56</pre>
|
1018
|
-
</td>
|
1019
|
-
<td>
|
1020
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 53</span>
|
1021
|
-
|
1022
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_current_account'>current_account</span><span class='lparen'>(</span><span class='id identifier rubyid_reload'>reload</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1023
|
-
<span class='kw'>return</span> <span class='ivar'>@current_account</span> <span class='kw'>if</span> <span class='ivar'>@current_account</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_reload'>reload</span>
|
1024
|
-
<span class='ivar'>@current_account</span> <span class='op'>=</span> <span class='const'>Hashie</span><span class='op'>::</span><span class='const'>Mash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>account/resolve</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
1025
|
-
<span class='kw'>end</span></pre>
|
1026
|
-
</td>
|
1027
|
-
</tr>
|
1028
|
-
</table>
|
1029
|
-
</div>
|
1030
|
-
|
1031
|
-
<div class="method_details ">
|
1032
|
-
<h3 class="signature " id="current_locale-instance_method">
|
1033
|
-
|
1034
|
-
- (<tt><span class='object_link'><a href="Locale.html" title="ZendeskAPI::Locale (class)">ZendeskAPI::Locale</a></span></tt>) <strong>current_locale</strong>(reload = false)
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
</h3><div class="docstring">
|
1041
|
-
<div class="discussion">
|
1042
|
-
|
1043
|
-
<p>Returns the current locale</p>
|
1044
|
-
|
1045
|
-
|
1046
|
-
</div>
|
1047
|
-
</div>
|
1048
|
-
<div class="tags">
|
1049
|
-
|
1050
|
-
<p class="tag_title">Returns:</p>
|
1051
|
-
<ul class="return">
|
1052
|
-
|
1053
|
-
<li>
|
1054
|
-
|
1055
|
-
|
1056
|
-
<span class='type'>(<tt><span class='object_link'><a href="Locale.html" title="ZendeskAPI::Locale (class)">ZendeskAPI::Locale</a></span></tt>)</span>
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
—
|
1061
|
-
<div class='inline'>
|
1062
|
-
<p>Current locale or nil</p>
|
1063
|
-
</div>
|
1064
|
-
|
1065
|
-
</li>
|
1066
|
-
|
1067
|
-
</ul>
|
1068
|
-
|
1069
|
-
</div><table class="source_code">
|
1070
|
-
<tr>
|
1071
|
-
<td>
|
1072
|
-
<pre class="lines">
|
1073
|
-
|
1074
|
-
|
1075
|
-
60
|
1076
|
-
61
|
1077
|
-
62
|
1078
|
-
63</pre>
|
1079
|
-
</td>
|
1080
|
-
<td>
|
1081
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 60</span>
|
1082
|
-
|
1083
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_current_locale'>current_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_reload'>reload</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1084
|
-
<span class='kw'>return</span> <span class='ivar'>@locale</span> <span class='kw'>if</span> <span class='ivar'>@locale</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_reload'>reload</span>
|
1085
|
-
<span class='ivar'>@locale</span> <span class='op'>=</span> <span class='id identifier rubyid_locales'>locales</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='symbol'>:id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>current</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1086
|
-
<span class='kw'>end</span></pre>
|
1087
|
-
</td>
|
1088
|
-
</tr>
|
1089
|
-
</table>
|
1090
|
-
</div>
|
1091
|
-
|
1092
|
-
<div class="method_details ">
|
1093
|
-
<h3 class="signature " id="current_user-instance_method">
|
1094
|
-
|
1095
|
-
- (<tt><span class='object_link'><a href="User.html" title="ZendeskAPI::User (class)">ZendeskAPI::User</a></span></tt>) <strong>current_user</strong>(reload = false)
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
</h3><div class="docstring">
|
1102
|
-
<div class="discussion">
|
1103
|
-
|
1104
|
-
<p>Returns the current user (aka me)</p>
|
1105
|
-
|
1106
|
-
|
1107
|
-
</div>
|
1108
|
-
</div>
|
1109
|
-
<div class="tags">
|
1110
|
-
|
1111
|
-
<p class="tag_title">Returns:</p>
|
1112
|
-
<ul class="return">
|
1113
|
-
|
1114
|
-
<li>
|
1115
|
-
|
1116
|
-
|
1117
|
-
<span class='type'>(<tt><span class='object_link'><a href="User.html" title="ZendeskAPI::User (class)">ZendeskAPI::User</a></span></tt>)</span>
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
—
|
1122
|
-
<div class='inline'>
|
1123
|
-
<p>Current user or nil</p>
|
1124
|
-
</div>
|
1125
|
-
|
1126
|
-
</li>
|
1127
|
-
|
1128
|
-
</ul>
|
1129
|
-
|
1130
|
-
</div><table class="source_code">
|
1131
|
-
<tr>
|
1132
|
-
<td>
|
1133
|
-
<pre class="lines">
|
1134
|
-
|
1135
|
-
|
1136
|
-
46
|
1137
|
-
47
|
1138
|
-
48
|
1139
|
-
49</pre>
|
1140
|
-
</td>
|
1141
|
-
<td>
|
1142
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 46</span>
|
1143
|
-
|
1144
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='lparen'>(</span><span class='id identifier rubyid_reload'>reload</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1145
|
-
<span class='kw'>return</span> <span class='ivar'>@current_user</span> <span class='kw'>if</span> <span class='ivar'>@current_user</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_reload'>reload</span>
|
1146
|
-
<span class='ivar'>@current_user</span> <span class='op'>=</span> <span class='id identifier rubyid_users'>users</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='symbol'>:id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>me</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1147
|
-
<span class='kw'>end</span></pre>
|
1148
|
-
</td>
|
1149
|
-
</tr>
|
1150
|
-
</table>
|
1151
|
-
</div>
|
1152
|
-
|
1153
|
-
<div class="method_details ">
|
1154
|
-
<h3 class="signature " id="insert_callback-instance_method">
|
1155
|
-
|
1156
|
-
- (<tt>Object</tt>) <strong>insert_callback</strong>(&block)
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
</h3><div class="docstring">
|
1163
|
-
<div class="discussion">
|
1164
|
-
|
1165
|
-
<p>Pushes a callback onto the stack. Callbacks are executed on responses, last
|
1166
|
-
in the Faraday middleware stack.</p>
|
1167
|
-
|
1168
|
-
|
1169
|
-
</div>
|
1170
|
-
</div>
|
1171
|
-
<div class="tags">
|
1172
|
-
<p class="tag_title">Parameters:</p>
|
1173
|
-
<ul class="param">
|
1174
|
-
|
1175
|
-
<li>
|
1176
|
-
|
1177
|
-
<span class='name'>block</span>
|
1178
|
-
|
1179
|
-
|
1180
|
-
<span class='type'>(<tt>Proc</tt>)</span>
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
—
|
1185
|
-
<div class='inline'>
|
1186
|
-
<p>The block to execute. Takes one parameter, env.</p>
|
1187
|
-
</div>
|
1188
|
-
|
1189
|
-
</li>
|
1190
|
-
|
1191
|
-
</ul>
|
1192
|
-
|
1193
|
-
|
1194
|
-
</div><table class="source_code">
|
1195
|
-
<tr>
|
1196
|
-
<td>
|
1197
|
-
<pre class="lines">
|
1198
|
-
|
1199
|
-
|
1200
|
-
100
|
1201
|
-
101
|
1202
|
-
102</pre>
|
1203
|
-
</td>
|
1204
|
-
<td>
|
1205
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/client.rb', line 100</span>
|
1206
|
-
|
1207
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_insert_callback'>insert_callback</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1208
|
-
<span class='ivar'>@callbacks</span> <span class='op'><<</span> <span class='id identifier rubyid_block'>block</span>
|
1209
|
-
<span class='kw'>end</span></pre>
|
1210
|
-
</td>
|
1211
|
-
</tr>
|
1212
|
-
</table>
|
1213
|
-
</div>
|
1214
|
-
|
1215
|
-
</div>
|
1216
|
-
|
1217
|
-
</div>
|
1218
|
-
|
1219
|
-
<div id="footer">
|
1220
|
-
Generated on Wed May 15 18:59:28 2013 by
|
1221
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1222
|
-
0.8.5.2 (ruby-1.9.3).
|
1223
|
-
</div>
|
1224
|
-
|
1225
|
-
</body>
|
1226
|
-
</html>
|