-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwitterapi.html
More file actions
227 lines (203 loc) · 10.3 KB
/
Copy pathtwitterapi.html
File metadata and controls
227 lines (203 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TwitterAPI.TwitterAPI — TwitterAPI 2.3 documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="TwitterAPI 2.3 documentation" href="index.html" />
<link rel="next" title="TwitterAPI.TwitterError" href="twittererror.html" />
<link rel="prev" title="Fault Tolerant Streams and Pages" href="faulttolerance.html" />
</head>
<body>
<div class="header"><h1 class="heading"><a href="index.html">
<span>TwitterAPI 2.3 documentation</span></a></h1>
<h2 class="heading"><span>TwitterAPI.TwitterAPI</span></h2>
</div>
<div class="topnav">
<p>
«  <a href="faulttolerance.html">Fault Tolerant Streams and Pages</a>
  ::  
<a class="uplink" href="index.html">Contents</a>
  ::  
<a href="twittererror.html">TwitterAPI.TwitterError</a>  »
</p>
</div>
<div class="content">
<div class="section" id="module-TwitterAPI.TwitterAPI">
<span id="twitterapi-twitterapi"></span><h1>TwitterAPI.TwitterAPI<a class="headerlink" href="#module-TwitterAPI.TwitterAPI" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="TwitterAPI.TwitterAPI.TwitterAPI">
<em class="property">class </em><tt class="descclassname">TwitterAPI.TwitterAPI.</tt><tt class="descname">TwitterAPI</tt><big>(</big><em>consumer_key=None</em>, <em>consumer_secret=None</em>, <em>access_token_key=None</em>, <em>access_token_secret=None</em>, <em>auth_type='oAuth1'</em>, <em>proxy_url=None</em><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterAPI" title="Permalink to this definition">¶</a></dt>
<dd><p>Access REST API or Streaming API resources.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>consumer_key</strong> – Twitter application consumer key</li>
<li><strong>consumer_secret</strong> – Twitter application consumer secret</li>
<li><strong>access_token_key</strong> – Twitter application access token key</li>
<li><strong>access_token_secret</strong> – Twitter application access token secret</li>
<li><strong>auth_type</strong> – “oAuth1” (default) or “oAuth2”</li>
<li><strong>proxy_url</strong> – HTTPS proxy URL (ex. “<a class="reference external" href="https://USER:PASSWORD@SERVER:PORT">https://USER:PASSWORD@SERVER:PORT</a>”)</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="TwitterAPI.TwitterAPI.TwitterAPI.request">
<tt class="descname">request</tt><big>(</big><em>resource</em>, <em>params=None</em>, <em>files=None</em><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterAPI.request" title="Permalink to this definition">¶</a></dt>
<dd><p>Request a Twitter REST API or Streaming API resource.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>resource</strong> – A valid Twitter endpoint (ex. “search/tweets”)</li>
<li><strong>params</strong> – Dictionary with endpoint parameters or None (default)</li>
<li><strong>files</strong> – Dictionary with multipart-encoded file or None (default)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">TwitterResponse</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">TwitterConnectionError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse">
<em class="property">class </em><tt class="descclassname">TwitterAPI.TwitterAPI.</tt><tt class="descname">TwitterResponse</tt><big>(</big><em>response</em>, <em>stream</em><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse" title="Permalink to this definition">¶</a></dt>
<dd><p>Response from either a REST API or Streaming API resource call.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>response</strong> – The requests.Response object returned by the API call</li>
<li><strong>stream</strong> – Boolean connection type (True if a streaming connection)</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.close">
<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Disconnect stream (blocks with Python 3).</p>
</dd></dl>
<dl class="method">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.get_iterator">
<tt class="descname">get_iterator</tt><big>(</big><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.get_iterator" title="Permalink to this definition">¶</a></dt>
<dd><p>Get API dependent iterator.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator for tweets or other message objects in response.</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body">TwitterConnectionError, TwitterRequestError</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.get_rest_quota">
<tt class="descname">get_rest_quota</tt><big>(</big><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.get_rest_quota" title="Permalink to this definition">¶</a></dt>
<dd><p>Quota information in the REST-only response header.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Dictionary of ‘remaining’ (count), ‘limit’ (count), ‘reset’ (time)</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.headers">
<tt class="descname">headers</tt><em class="property"> None</em><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.headers" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Dictionary of API response header contents.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.json">
<tt class="descname">json</tt><big>(</big><big>)</big><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.json" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">response as JSON object.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.status_code">
<tt class="descname">status_code</tt><em class="property"> None</em><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.status_code" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">HTTP response status code.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="TwitterAPI.TwitterAPI.TwitterResponse.text">
<tt class="descname">text</tt><em class="property"> None</em><a class="headerlink" href="#TwitterAPI.TwitterAPI.TwitterResponse.text" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Raw API response text.</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="bottomnav">
<p>
«  <a href="faulttolerance.html">Fault Tolerant Streams and Pages</a>
  ::  
<a class="uplink" href="index.html">Contents</a>
  ::  
<a href="twittererror.html">TwitterAPI.TwitterError</a>  »
</p>
</div>
<div class="footer">
© Copyright 2014, geduldig.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b2.
</div>
</body>
</html>