blob: 1a103463e0c4f76591698e8eff0076a18a97b4f5 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="pubsub_v1beta1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1beta1.topics.html">topics</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(body)</a></code></p>
79<p class="firstline">Creates the given topic with the given name.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(topic)</a></code></p>
82<p class="firstline">Deletes the topic with the given name. All subscriptions to this topic are also deleted. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name.</p>
83<p class="toc_element">
84 <code><a href="#get">get(topic)</a></code></p>
85<p class="firstline">Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.</p>
86<p class="toc_element">
87 <code><a href="#list">list(pageToken=None, maxResults=None, query=None)</a></code></p>
88<p class="firstline">Lists matching topics.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#publish">publish(body)</a></code></p>
94<p class="firstline">Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(body)</code>
98 <pre>Creates the given topic with the given name.
99
100Args:
101 body: object, The request body. (required)
102 The object takes the form of:
103
104{ # A topic resource.
105 "name": "A String", # Name of the topic.
106 }
107
108
109Returns:
110 An object of the form:
111
112 { # A topic resource.
113 "name": "A String", # Name of the topic.
114 }</pre>
115</div>
116
117<div class="method">
118 <code class="details" id="delete">delete(topic)</code>
119 <pre>Deletes the topic with the given name. All subscriptions to this topic are also deleted. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name.
120
121Args:
122 topic: string, Name of the topic to delete. (required)
123</pre>
124</div>
125
126<div class="method">
127 <code class="details" id="get">get(topic)</code>
128 <pre>Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.
129
130Args:
131 topic: string, The name of the topic to get. (required)
132
133Returns:
134 An object of the form:
135
136 { # A topic resource.
137 "name": "A String", # Name of the topic.
138 }</pre>
139</div>
140
141<div class="method">
142 <code class="details" id="list">list(pageToken=None, maxResults=None, query=None)</code>
143 <pre>Lists matching topics.
144
145Args:
146 pageToken: string, The value obtained in the last ListTopicsResponse for continuation.
147 maxResults: integer, Maximum number of topics to return.
148 query: string, A valid label query expression.
149
150Returns:
151 An object of the form:
152
153 {
154 "nextPageToken": "A String", # If not empty, indicates that there are more topics that match the request, and this value should be passed to the next ListTopicsRequest to continue.
155 "topic": [ # The resulting topics.
156 { # A topic resource.
157 "name": "A String", # Name of the topic.
158 },
159 ],
160 }</pre>
161</div>
162
163<div class="method">
164 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
165 <pre>Retrieves the next page of results.
166
167Args:
168 previous_request: The request for the previous page. (required)
169 previous_response: The response from the request for the previous page. (required)
170
171Returns:
172 A request object that you can call 'execute()' on to request the next
173 page. Returns None if there are no more items in the collection.
174 </pre>
175</div>
176
177<div class="method">
178 <code class="details" id="publish">publish(body)</code>
179 <pre>Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.
180
181Args:
182 body: object, The request body. (required)
183 The object takes the form of:
184
185{
186 "topic": "A String", # The name of the topic for which the message is being added.
187 "message": { # A message data and its labels. # The message to publish.
188 "data": "A String", # The message payload.
189 "label": [ # Optional list of labels for this message. Keys in this collection must be unique.
190 { # A key-value pair applied to a given object.
191 "numValue": "A String", # An integer value.
192 "strValue": "A String", # A string value.
193 "key": "A String", # The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated.
194 #
195 # Keys are defined by the following grammar:
196 #
197 # key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment = alphadigit | *[ alphadigit | "-" | "_" | "." ]
198 #
199 # where "hostname" and "alphadigit" are defined as in RFC 1738.
200 #
201 # Example key: spanner.google.com/universe
202 },
203 ],
204 },
205 }
206
207</pre>
208</div>
209
210</body></html>