Skip to content

Commit 2585a28

Browse files
committed
Update docs
1 parent b0b2e33 commit 2585a28

File tree

20 files changed

+2221
-301
lines changed

20 files changed

+2221
-301
lines changed

docs/intercom_python_sdk/apis/articles/api.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h1 id="articles-api">Articles API</h1>
7070

7171

7272
@response_handler(catch_api_error)
73-
class ArticlesAPI(APIBase):
73+
class ArticlesAPI(APIBase): # type: ignore
7474
URI = &#34;/articles/&#34;
7575

7676
@returns(ArticleSchema) # type: ignore
@@ -86,7 +86,7 @@ <h1 id="articles-api">Articles API</h1>
8686
&#34;&#34;&#34;
8787

8888
@returns(ArticleSchema) # type: ignore
89-
@json
89+
@json # type: ignore
9090
@post(&#34;&#34;)
9191
def create(self, data: Body(type=ArticleSchema)): # type: ignore
9292

@@ -113,7 +113,7 @@ <h1 id="articles-api">Articles API</h1>
113113

114114
@returns(ArticleListSchema) # type: ignore
115115
@get(&#34;&#34;)
116-
def __list_all(self, page: Query(&#39;page&#39;), per_page: Query(&#39;per_page&#39;) = 50): # noqa # type: ignore
116+
def __list_all(self, page: Query(&#39;page&#39;), per_page: Query(&#39;per_page&#39;) = 50) -&gt; ArticleList: # noqa # type: ignore
117117
&#34;&#34;&#34; List all Articles. &#34;&#34;&#34;
118118

119119
def list_all(self, page: int = 1, per_page: int = 50) -&gt; ArticleList:
@@ -127,7 +127,7 @@ <h1 id="articles-api">Articles API</h1>
127127
ArticleList: A list of Articles.
128128
&#34;&#34;&#34;
129129

130-
article_list = self.__list_all(page=page, per_page=per_page)
130+
article_list: ArticleList = self.__list_all(page=page, per_page=per_page)
131131
while page &lt; article_list.pages[&#39;total_pages&#39;]:
132132
page += 1
133133
new_page = self.__list_all(page=page, per_page=per_page)
@@ -137,7 +137,7 @@ <h1 id="articles-api">Articles API</h1>
137137
return article_list
138138

139139
@returns(ArticleSchema) # type: ignore
140-
@json
140+
@json # type: ignore
141141
@put(&#34;{article_id}&#34;)
142142
def update_by_id(self, article_id: Union[str, int], data: Body(type=ArticleSchema)): # type: ignore
143143
&#34;&#34;&#34; Update an Article by ID.
@@ -176,7 +176,7 @@ <h2 id="args">Args</h2>
176176
<span>Expand source code</span>
177177
</summary>
178178
<pre><code class="python">@response_handler(catch_api_error)
179-
class ArticlesAPI(APIBase):
179+
class ArticlesAPI(APIBase): # type: ignore
180180
URI = &#34;/articles/&#34;
181181

182182
@returns(ArticleSchema) # type: ignore
@@ -192,7 +192,7 @@ <h2 id="args">Args</h2>
192192
&#34;&#34;&#34;
193193

194194
@returns(ArticleSchema) # type: ignore
195-
@json
195+
@json # type: ignore
196196
@post(&#34;&#34;)
197197
def create(self, data: Body(type=ArticleSchema)): # type: ignore
198198

@@ -219,7 +219,7 @@ <h2 id="args">Args</h2>
219219

220220
@returns(ArticleListSchema) # type: ignore
221221
@get(&#34;&#34;)
222-
def __list_all(self, page: Query(&#39;page&#39;), per_page: Query(&#39;per_page&#39;) = 50): # noqa # type: ignore
222+
def __list_all(self, page: Query(&#39;page&#39;), per_page: Query(&#39;per_page&#39;) = 50) -&gt; ArticleList: # noqa # type: ignore
223223
&#34;&#34;&#34; List all Articles. &#34;&#34;&#34;
224224

225225
def list_all(self, page: int = 1, per_page: int = 50) -&gt; ArticleList:
@@ -233,7 +233,7 @@ <h2 id="args">Args</h2>
233233
ArticleList: A list of Articles.
234234
&#34;&#34;&#34;
235235

236-
article_list = self.__list_all(page=page, per_page=per_page)
236+
article_list: ArticleList = self.__list_all(page=page, per_page=per_page)
237237
while page &lt; article_list.pages[&#39;total_pages&#39;]:
238238
page += 1
239239
new_page = self.__list_all(page=page, per_page=per_page)
@@ -243,7 +243,7 @@ <h2 id="args">Args</h2>
243243
return article_list
244244

245245
@returns(ArticleSchema) # type: ignore
246-
@json
246+
@json # type: ignore
247247
@put(&#34;{article_id}&#34;)
248248
def update_by_id(self, article_id: Union[str, int], data: Body(type=ArticleSchema)): # type: ignore
249249
&#34;&#34;&#34; Update an Article by ID.
@@ -270,7 +270,7 @@ <h3>Class variables</h3>
270270
<h3>Methods</h3>
271271
<dl>
272272
<dt id="intercom_python_sdk.apis.articles.api.ArticlesAPI.create"><code class="name flex">
273-
<span>def <span class="ident">create</span></span>(<span>self, data: <uplink.arguments.Body object at 0x10b77c510>)</span>
273+
<span>def <span class="ident">create</span></span>(<span>self, data: <uplink.arguments.Body object at 0x7ff252d82220>)</span>
274274
</code></dt>
275275
<dd>
276276
<div class="desc"><p>Create an Article.</p>
@@ -289,7 +289,7 @@ <h2 id="returns">Returns</h2>
289289
<span>Expand source code</span>
290290
</summary>
291291
<pre><code class="python">@returns(ArticleSchema) # type: ignore
292-
@json
292+
@json # type: ignore
293293
@post(&#34;&#34;)
294294
def create(self, data: Body(type=ArticleSchema)): # type: ignore
295295

@@ -399,7 +399,7 @@ <h2 id="returns">Returns</h2>
399399
ArticleList: A list of Articles.
400400
&#34;&#34;&#34;
401401

402-
article_list = self.__list_all(page=page, per_page=per_page)
402+
article_list: ArticleList = self.__list_all(page=page, per_page=per_page)
403403
while page &lt; article_list.pages[&#39;total_pages&#39;]:
404404
page += 1
405405
new_page = self.__list_all(page=page, per_page=per_page)
@@ -410,7 +410,7 @@ <h2 id="returns">Returns</h2>
410410
</details>
411411
</dd>
412412
<dt id="intercom_python_sdk.apis.articles.api.ArticlesAPI.update_by_id"><code class="name flex">
413-
<span>def <span class="ident">update_by_id</span></span>(<span>self, article_id: Union[str, int], data: <uplink.arguments.Body object at 0x10b77cf90>)</span>
413+
<span>def <span class="ident">update_by_id</span></span>(<span>self, article_id: Union[str, int], data: <uplink.arguments.Body object at 0x7ff252d82a00>)</span>
414414
</code></dt>
415415
<dd>
416416
<div class="desc"><p>Update an Article by ID.</p>
@@ -426,7 +426,7 @@ <h2 id="args">Args</h2>
426426
<span>Expand source code</span>
427427
</summary>
428428
<pre><code class="python">@returns(ArticleSchema) # type: ignore
429-
@json
429+
@json # type: ignore
430430
@put(&#34;{article_id}&#34;)
431431
def update_by_id(self, article_id: Union[str, int], data: Body(type=ArticleSchema)): # type: ignore
432432
&#34;&#34;&#34; Update an Article by ID.

docs/intercom_python_sdk/apis/articles/languages.html

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -80,44 +80,10 @@ <h2 class="section-title" id="header-classes">Classes</h2>
8080
<dl>
8181
<dt id="intercom_python_sdk.apis.articles.languages.ArticleLanguages"><code class="flex name class">
8282
<span>class <span class="ident">ArticleLanguages</span></span>
83-
<span>(</span><span>*args, **kwds)</span>
83+
<span>(</span><span>value, names=None, *, module=None, qualname=None, type=None, start=1)</span>
8484
</code></dt>
8585
<dd>
86-
<div class="desc"><p>Create a collection of name/value pairs.</p>
87-
<p>Example enumeration:</p>
88-
<pre><code class="language-python-repl">&gt;&gt;&gt; class Color(Enum):
89-
... RED = 1
90-
... BLUE = 2
91-
... GREEN = 3
92-
</code></pre>
93-
<p>Access them by:</p>
94-
<ul>
95-
<li>attribute access::</li>
96-
</ul>
97-
<pre><code class="language-python-repl">&gt;&gt;&gt; Color.RED
98-
&lt;Color.RED: 1&gt;
99-
</code></pre>
100-
<ul>
101-
<li>value lookup:</li>
102-
</ul>
103-
<pre><code class="language-python-repl">&gt;&gt;&gt; Color(1)
104-
&lt;Color.RED: 1&gt;
105-
</code></pre>
106-
<ul>
107-
<li>name lookup:</li>
108-
</ul>
109-
<pre><code class="language-python-repl">&gt;&gt;&gt; Color['RED']
110-
&lt;Color.RED: 1&gt;
111-
</code></pre>
112-
<p>Enumerations can be iterated over, and know how many members they have:</p>
113-
<pre><code class="language-python-repl">&gt;&gt;&gt; len(Color)
114-
3
115-
</code></pre>
116-
<pre><code class="language-python-repl">&gt;&gt;&gt; list(Color)
117-
[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]
118-
</code></pre>
119-
<p>Methods can be added to enumerations, and members can have their own
120-
attributes &ndash; see the documentation for details.</p></div>
86+
<div class="desc"><p>An enumeration.</p></div>
12187
<details class="source">
12288
<summary>
12389
<span>Expand source code</span>

docs/intercom_python_sdk/apis/articles/models.html

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ <h1 id="articles-api-models">Articles API Models</h1>
9191
See the `ArticleSchema` class.
9292
&#34;&#34;&#34;
9393
def __init__(self, *args, **kwargs):
94-
self.__type = kwargs.get(&#39;type&#39;, &#39;article&#39;)
95-
self.__workspace_id = kwargs.get(&#39;workspace_id&#39;, &#39;&#39;)
96-
self.__title = kwargs.get(&#39;title&#39;, &#39;&#39;)
97-
self.__description = kwargs.get(&#39;description&#39;, &#39;&#39;)
98-
self.__body = kwargs.get(&#39;body&#39;, &#39;&#39;)
99-
self.__author_id = kwargs.get(&#39;author_id&#39;, None)
100-
self.__state = kwargs.get(&#39;state&#39;, &#39;&#39;)
101-
self.__created_at = kwargs.get(&#39;created_at&#39;, None)
102-
self.__updated_at = kwargs.get(&#39;updated_at&#39;, None)
103-
self.__url = kwargs.get(&#39;url&#39;, &#39;&#39;)
104-
self.__parent_id = kwargs.get(&#39;parent_id&#39;, None)
105-
self.__parent_type = kwargs.get(&#39;parent_type&#39;, &#39;&#39;)
106-
self.__default_locale = kwargs.get(&#39;default_locale&#39;, &#39;&#39;)
94+
self.__type: str = kwargs.get(&#39;type&#39;, &#39;article&#39;)
95+
self.__workspace_id: str = kwargs.get(&#39;workspace_id&#39;, &#39;&#39;)
96+
self.__title: str = kwargs.get(&#39;title&#39;, &#39;&#39;)
97+
self.__description: str = kwargs.get(&#39;description&#39;, &#39;&#39;)
98+
self.__body: str = kwargs.get(&#39;body&#39;, &#39;&#39;)
99+
self.__author_id: int = kwargs.get(&#39;author_id&#39;, int())
100+
self.__state: str = kwargs.get(&#39;state&#39;, &#39;&#39;)
101+
self.__created_at: int = kwargs.get(&#39;created_at&#39;, int())
102+
self.__updated_at: int = kwargs.get(&#39;updated_at&#39;, int())
103+
self.__url: str = kwargs.get(&#39;url&#39;, &#39;&#39;)
104+
self.__parent_id: int = kwargs.get(&#39;parent_id&#39;, int())
105+
self.__parent_type: str = kwargs.get(&#39;parent_type&#39;, &#39;&#39;)
106+
self.__default_locale: str = kwargs.get(&#39;default_locale&#39;, &#39;&#39;)
107107
self.__statistics = kwargs.get(&#39;statistics&#39;, None)
108-
self.__id = kwargs.get(&#39;id&#39;, None)
109-
self.__translated_content = kwargs.get(&#39;translated_content&#39;, {})
108+
self.__id: int = kwargs.get(&#39;id&#39;, int())
109+
self.__translated_content: dict = kwargs.get(&#39;translated_content&#39;, {})
110110

111111
# Properties
112112
@property
@@ -470,7 +470,9 @@ <h1 id="articles-api-models">Articles API Models</h1>
470470
&#34;&#34;&#34;
471471
data = a_schemas.ArticleSchema().dump(self)
472472
schema = a_schemas.ArticleSchema().load(data)
473-
self.api_client.update_by_id(self.id, schema)
473+
self.api_client.update_by_id(self.id, schema) # type: ignore
474+
475+
return self
474476

475477

476478
class ArticleList(ModelBase):
@@ -666,22 +668,22 @@ <h2 id="attributes">Attributes</h2>
666668
See the `ArticleSchema` class.
667669
&#34;&#34;&#34;
668670
def __init__(self, *args, **kwargs):
669-
self.__type = kwargs.get(&#39;type&#39;, &#39;article&#39;)
670-
self.__workspace_id = kwargs.get(&#39;workspace_id&#39;, &#39;&#39;)
671-
self.__title = kwargs.get(&#39;title&#39;, &#39;&#39;)
672-
self.__description = kwargs.get(&#39;description&#39;, &#39;&#39;)
673-
self.__body = kwargs.get(&#39;body&#39;, &#39;&#39;)
674-
self.__author_id = kwargs.get(&#39;author_id&#39;, None)
675-
self.__state = kwargs.get(&#39;state&#39;, &#39;&#39;)
676-
self.__created_at = kwargs.get(&#39;created_at&#39;, None)
677-
self.__updated_at = kwargs.get(&#39;updated_at&#39;, None)
678-
self.__url = kwargs.get(&#39;url&#39;, &#39;&#39;)
679-
self.__parent_id = kwargs.get(&#39;parent_id&#39;, None)
680-
self.__parent_type = kwargs.get(&#39;parent_type&#39;, &#39;&#39;)
681-
self.__default_locale = kwargs.get(&#39;default_locale&#39;, &#39;&#39;)
671+
self.__type: str = kwargs.get(&#39;type&#39;, &#39;article&#39;)
672+
self.__workspace_id: str = kwargs.get(&#39;workspace_id&#39;, &#39;&#39;)
673+
self.__title: str = kwargs.get(&#39;title&#39;, &#39;&#39;)
674+
self.__description: str = kwargs.get(&#39;description&#39;, &#39;&#39;)
675+
self.__body: str = kwargs.get(&#39;body&#39;, &#39;&#39;)
676+
self.__author_id: int = kwargs.get(&#39;author_id&#39;, int())
677+
self.__state: str = kwargs.get(&#39;state&#39;, &#39;&#39;)
678+
self.__created_at: int = kwargs.get(&#39;created_at&#39;, int())
679+
self.__updated_at: int = kwargs.get(&#39;updated_at&#39;, int())
680+
self.__url: str = kwargs.get(&#39;url&#39;, &#39;&#39;)
681+
self.__parent_id: int = kwargs.get(&#39;parent_id&#39;, int())
682+
self.__parent_type: str = kwargs.get(&#39;parent_type&#39;, &#39;&#39;)
683+
self.__default_locale: str = kwargs.get(&#39;default_locale&#39;, &#39;&#39;)
682684
self.__statistics = kwargs.get(&#39;statistics&#39;, None)
683-
self.__id = kwargs.get(&#39;id&#39;, None)
684-
self.__translated_content = kwargs.get(&#39;translated_content&#39;, {})
685+
self.__id: int = kwargs.get(&#39;id&#39;, int())
686+
self.__translated_content: dict = kwargs.get(&#39;translated_content&#39;, {})
685687

686688
# Properties
687689
@property
@@ -1045,7 +1047,9 @@ <h2 id="attributes">Attributes</h2>
10451047
&#34;&#34;&#34;
10461048
data = a_schemas.ArticleSchema().dump(self)
10471049
schema = a_schemas.ArticleSchema().load(data)
1048-
self.api_client.update_by_id(self.id, schema)</code></pre>
1050+
self.api_client.update_by_id(self.id, schema) # type: ignore
1051+
1052+
return self</code></pre>
10491053
</details>
10501054
<h3>Ancestors</h3>
10511055
<ul class="hlist">
@@ -1486,7 +1490,9 @@ <h3>Methods</h3>
14861490
&#34;&#34;&#34;
14871491
data = a_schemas.ArticleSchema().dump(self)
14881492
schema = a_schemas.ArticleSchema().load(data)
1489-
self.api_client.update_by_id(self.id, schema)</code></pre>
1493+
self.api_client.update_by_id(self.id, schema) # type: ignore
1494+
1495+
return self</code></pre>
14901496
</details>
14911497
</dd>
14921498
</dl>

0 commit comments

Comments
 (0)