Skip to content

Commit 54584dc

Browse files
committed
Updated docs
1 parent e119b0e commit 54584dc

30 files changed

+6464
-63
lines changed

docs/intercom_python_sdk/apis/articles/api.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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 0x105b70950>)</span>
273+
<span>def <span class="ident">create</span></span>(<span>self, data: <uplink.arguments.Body object at 0x7fae1b2c6b20>)</span>
274274
</code></dt>
275275
<dd>
276276
<div class="desc"><p>Create an Article.</p>
@@ -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 0x105b71f50>)</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 0x7fae1b2c6220>)</span>
414414
</code></dt>
415415
<dd>
416416
<div class="desc"><p>Update an Article by ID.</p>

docs/intercom_python_sdk/apis/articles/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
143143
<dd>
144144
<div class="desc"><p>Articles API …</p></div>
145145
</dd>
146+
<dt><code class="name"><a title="intercom_python_sdk.apis.articles.languages" href="languages.html">intercom_python_sdk.apis.articles.languages</a></code></dt>
147+
<dd>
148+
<div class="desc"></div>
149+
</dd>
146150
<dt><code class="name"><a title="intercom_python_sdk.apis.articles.models" href="models.html">intercom_python_sdk.apis.articles.models</a></code></dt>
147151
<dd>
148152
<div class="desc"><p>Articles API Models …</p></div>
@@ -180,6 +184,7 @@ <h1>Index</h1>
180184
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
181185
<ul>
182186
<li><code><a title="intercom_python_sdk.apis.articles.api" href="api.html">intercom_python_sdk.apis.articles.api</a></code></li>
187+
<li><code><a title="intercom_python_sdk.apis.articles.languages" href="languages.html">intercom_python_sdk.apis.articles.languages</a></code></li>
183188
<li><code><a title="intercom_python_sdk.apis.articles.models" href="models.html">intercom_python_sdk.apis.articles.models</a></code></li>
184189
<li><code><a title="intercom_python_sdk.apis.articles.schemas" href="schemas.html">intercom_python_sdk.apis.articles.schemas</a></code></li>
185190
</ul>

docs/intercom_python_sdk/apis/articles/languages.html

Lines changed: 351 additions & 0 deletions
Large diffs are not rendered by default.

docs/intercom_python_sdk/apis/articles/models.html

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,25 @@ <h1 id="articles-api-models">Articles API Models</h1>
6262
# From Current Package
6363
from ...core.model_base import ModelBase
6464

65+
from .languages import ArticleLanguages
66+
6567
# Type Check Imports - TYPE_CHECKING is assumed True by type-checkers but is False at runtime.
6668
# See: https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING
6769
if TYPE_CHECKING:
6870
from .api import ArticlesAPI
6971

7072

73+
class ArticleTranslation(ModelBase):
74+
type: str
75+
76+
def __init__(self, *args, **kwargs):
77+
self.type = kwargs.get(&#39;type&#39;, &#39;article_translated_content&#39;)
78+
79+
for language in ArticleLanguages:
80+
locale_code = language.value
81+
setattr(self, locale_code, kwargs.get(locale_code, None))
82+
83+
7184
class ArticleStatistics(ModelBase):
7285
&#34;&#34;&#34;
7386
This model represents the statistics of an Article on Intercom.
@@ -464,7 +477,7 @@ <h1 id="articles-api-models">Articles API Models</h1>
464477

465478
# Methods
466479

467-
def update(self):
480+
def update(self) -&gt; &#39;Article&#39;:
468481
&#34;&#34;&#34;
469482
Update the Article.
470483
&#34;&#34;&#34;
@@ -1039,7 +1052,7 @@ <h2 id="attributes">Attributes</h2>
10391052

10401053
# Methods
10411054

1042-
def update(self):
1055+
def update(self) -&gt; &#39;Article&#39;:
10431056
&#34;&#34;&#34;
10441057
Update the Article.
10451058
&#34;&#34;&#34;
@@ -1472,15 +1485,15 @@ <h2 id="returns">Returns</h2>
14721485
<h3>Methods</h3>
14731486
<dl>
14741487
<dt id="intercom_python_sdk.apis.articles.models.Article.update"><code class="name flex">
1475-
<span>def <span class="ident">update</span></span>(<span>self)</span>
1488+
<span>def <span class="ident">update</span></span>(<span>self)> <a title="intercom_python_sdk.apis.articles.models.Article" href="#intercom_python_sdk.apis.articles.models.Article">Article</a></span>
14761489
</code></dt>
14771490
<dd>
14781491
<div class="desc"><p>Update the Article.</p></div>
14791492
<details class="source">
14801493
<summary>
14811494
<span>Expand source code</span>
14821495
</summary>
1483-
<pre><code class="python">def update(self):
1496+
<pre><code class="python">def update(self) -&gt; &#39;Article&#39;:
14841497
&#34;&#34;&#34;
14851498
Update the Article.
14861499
&#34;&#34;&#34;
@@ -1911,6 +1924,43 @@ <h3>Class variables</h3>
19111924
</dd>
19121925
</dl>
19131926
</dd>
1927+
<dt id="intercom_python_sdk.apis.articles.models.ArticleTranslation"><code class="flex name class">
1928+
<span>class <span class="ident">ArticleTranslation</span></span>
1929+
<span>(</span><span>*args, **kwargs)</span>
1930+
</code></dt>
1931+
<dd>
1932+
<div class="desc"><p>Base model for all API models.</p>
1933+
<h2 id="raises">Raises</h2>
1934+
<dl>
1935+
<dt><code>NotImplementedError</code></dt>
1936+
<dd>When setting a property with no setter.</dd>
1937+
</dl></div>
1938+
<details class="source">
1939+
<summary>
1940+
<span>Expand source code</span>
1941+
</summary>
1942+
<pre><code class="python">class ArticleTranslation(ModelBase):
1943+
type: str
1944+
1945+
def __init__(self, *args, **kwargs):
1946+
self.type = kwargs.get(&#39;type&#39;, &#39;article_translated_content&#39;)
1947+
1948+
for language in ArticleLanguages:
1949+
locale_code = language.value
1950+
setattr(self, locale_code, kwargs.get(locale_code, None))</code></pre>
1951+
</details>
1952+
<h3>Ancestors</h3>
1953+
<ul class="hlist">
1954+
<li><a title="intercom_python_sdk.core.model_base.ModelBase" href="../../core/model_base.html#intercom_python_sdk.core.model_base.ModelBase">ModelBase</a></li>
1955+
</ul>
1956+
<h3>Class variables</h3>
1957+
<dl>
1958+
<dt id="intercom_python_sdk.apis.articles.models.ArticleTranslation.type"><code class="name">var <span class="ident">type</span> : str</code></dt>
1959+
<dd>
1960+
<div class="desc"></div>
1961+
</dd>
1962+
</dl>
1963+
</dd>
19141964
</dl>
19151965
</section>
19161966
</article>
@@ -1976,6 +2026,12 @@ <h4><code><a title="intercom_python_sdk.apis.articles.models.ArticleStatistics"
19762026
<li><code><a title="intercom_python_sdk.apis.articles.models.ArticleStatistics.views" href="#intercom_python_sdk.apis.articles.models.ArticleStatistics.views">views</a></code></li>
19772027
</ul>
19782028
</li>
2029+
<li>
2030+
<h4><code><a title="intercom_python_sdk.apis.articles.models.ArticleTranslation" href="#intercom_python_sdk.apis.articles.models.ArticleTranslation">ArticleTranslation</a></code></h4>
2031+
<ul class="">
2032+
<li><code><a title="intercom_python_sdk.apis.articles.models.ArticleTranslation.type" href="#intercom_python_sdk.apis.articles.models.ArticleTranslation.type">type</a></code></li>
2033+
</ul>
2034+
</li>
19792035
</ul>
19802036
</li>
19812037
</ul>

docs/intercom_python_sdk/apis/articles/schemas.html

Lines changed: 129 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ <h1 id="articles-api-schemas">Articles API Schemas</h1>
4848
- [1] https://developers.intercom.com/intercom-api-reference/reference/the-article-model
4949
&#34;&#34;&#34;
5050

51+
# Built-in
52+
from enum import Enum
53+
5154
# External
5255
import marshmallow
5356
from marshmallow import fields
5457

5558
# From Current API
5659
from . import models as a_models
60+
from .languages import ArticleLanguages
5761

5862
# From Current Package
5963
from ...core.schema_base import SchemaBase
@@ -102,34 +106,52 @@ <h1 id="articles-api-schemas">Articles API Schemas</h1>
102106
default_locale (str): The default locale of the Article.
103107
statistics (dict): The statistics of the Article.
104108
&#34;&#34;&#34;
105-
id = fields.Int(required=True)
106-
type = fields.Str(allow_none=True)
107-
workspace_id = fields.Str(allow_none=True)
109+
id = fields.Int(required=False)
110+
type = fields.Str(allow_none=True, required=False)
111+
workspace_id = fields.Str(allow_none=True, required=False)
108112
title = fields.Str(required=True)
109-
description = fields.Str(allow_none=True)
110-
body = fields.Str(required=True)
111-
author_id = fields.Int(required=True)
112-
state = fields.Str(allow_none=True)
113-
created_at = fields.Int(allow_none=True)
114-
updated_at = fields.Int(allow_none=True)
115-
url = fields.Str(allow_none=True)
116-
default_locale = fields.Str(allow_none=True)
117-
translated_content = fields.Dict(values=fields.Str(), default=&#39;&#39;, allow_none=True)
118-
statistics = fields.Nested(ArticleStatisticsSchema, allow_none=True)
119-
120-
parent_id = fields.Int(allow_none=True)
121-
parent_type = fields.Str(allow_none=True)
113+
description = fields.Str(allow_none=True, required=False)
114+
body = fields.Str(required=False)
115+
author_id = fields.Int(required=False)
116+
state = fields.Str(allow_none=True, required=False)
117+
created_at = fields.Int(allow_none=True, required=False)
118+
updated_at = fields.Int(allow_none=True, required=False)
119+
url = fields.Str(allow_none=True, required=False)
120+
default_locale = fields.Str(allow_none=True, required=False)
121+
translated_content = fields.Raw(allow_none=True, required=False)
122+
statistics = fields.Nested(ArticleStatisticsSchema, allow_none=True, required=False)
123+
124+
parent_id = fields.Int(allow_none=True, required=False)
125+
parent_type = fields.Str(allow_none=True, required=False)
122126

123127
@marshmallow.post_load
124128
def make_article(self, data, **kwargs):
125129
return a_models.Article(**data)
126130

127131

132+
class ArticleTranslationSchema(SchemaBase):
133+
&#34;&#34;&#34;
134+
This schema represents the translation of an Article on Intercom.
135+
&#34;&#34;&#34;
136+
type = fields.Str(default=&#34;article_translated_content&#34;)
137+
138+
def __init__(self, **kwargs):
139+
super().__init__(**kwargs)
140+
for language in ArticleLanguages:
141+
locale_code = language.value
142+
self.fields[locale_code] = fields.Str(allow_none=True, required=False)
143+
144+
@marshmallow.post_load
145+
def make_article_translation(self, data, **kwargs):
146+
return a_models.ArticleTranslation(**data)
147+
148+
149+
128150
class ArticlePagesSchema(SchemaBase):
129151
&#34;&#34;&#34; Paging information for a list of Articles on Intercom. &#34;&#34;&#34;
130152
type = fields.Str(default=&#39;pages&#39;)
131153
page = fields.Int()
132-
next = fields.Url(allow_none=True)
154+
next = fields.Url(allow_none=True, required=False)
133155
per_page = fields.Int(default=50)
134156
total_pages = fields.Int()
135157

@@ -249,7 +271,7 @@ <h3>Inherited members</h3>
249271
&#34;&#34;&#34; Paging information for a list of Articles on Intercom. &#34;&#34;&#34;
250272
type = fields.Str(default=&#39;pages&#39;)
251273
page = fields.Int()
252-
next = fields.Url(allow_none=True)
274+
next = fields.Url(allow_none=True, required=False)
253275
per_page = fields.Int(default=50)
254276
total_pages = fields.Int()</code></pre>
255277
</details>
@@ -344,23 +366,23 @@ <h2 id="attributes">Attributes</h2>
344366
default_locale (str): The default locale of the Article.
345367
statistics (dict): The statistics of the Article.
346368
&#34;&#34;&#34;
347-
id = fields.Int(required=True)
348-
type = fields.Str(allow_none=True)
349-
workspace_id = fields.Str(allow_none=True)
369+
id = fields.Int(required=False)
370+
type = fields.Str(allow_none=True, required=False)
371+
workspace_id = fields.Str(allow_none=True, required=False)
350372
title = fields.Str(required=True)
351-
description = fields.Str(allow_none=True)
352-
body = fields.Str(required=True)
353-
author_id = fields.Int(required=True)
354-
state = fields.Str(allow_none=True)
355-
created_at = fields.Int(allow_none=True)
356-
updated_at = fields.Int(allow_none=True)
357-
url = fields.Str(allow_none=True)
358-
default_locale = fields.Str(allow_none=True)
359-
translated_content = fields.Dict(values=fields.Str(), default=&#39;&#39;, allow_none=True)
360-
statistics = fields.Nested(ArticleStatisticsSchema, allow_none=True)
361-
362-
parent_id = fields.Int(allow_none=True)
363-
parent_type = fields.Str(allow_none=True)
373+
description = fields.Str(allow_none=True, required=False)
374+
body = fields.Str(required=False)
375+
author_id = fields.Int(required=False)
376+
state = fields.Str(allow_none=True, required=False)
377+
created_at = fields.Int(allow_none=True, required=False)
378+
updated_at = fields.Int(allow_none=True, required=False)
379+
url = fields.Str(allow_none=True, required=False)
380+
default_locale = fields.Str(allow_none=True, required=False)
381+
translated_content = fields.Raw(allow_none=True, required=False)
382+
statistics = fields.Nested(ArticleStatisticsSchema, allow_none=True, required=False)
383+
384+
parent_id = fields.Int(allow_none=True, required=False)
385+
parent_type = fields.Str(allow_none=True, required=False)
364386

365387
@marshmallow.post_load
366388
def make_article(self, data, **kwargs):
@@ -473,6 +495,72 @@ <h3>Inherited members</h3>
473495
</li>
474496
</ul>
475497
</dd>
498+
<dt id="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema"><code class="flex name class">
499+
<span>class <span class="ident">ArticleTranslationSchema</span></span>
500+
<span>(</span><span>**kwargs)</span>
501+
</code></dt>
502+
<dd>
503+
<div class="desc"><p>This schema represents the translation of an Article on Intercom.</p></div>
504+
<details class="source">
505+
<summary>
506+
<span>Expand source code</span>
507+
</summary>
508+
<pre><code class="python">class ArticleTranslationSchema(SchemaBase):
509+
&#34;&#34;&#34;
510+
This schema represents the translation of an Article on Intercom.
511+
&#34;&#34;&#34;
512+
type = fields.Str(default=&#34;article_translated_content&#34;)
513+
514+
def __init__(self, **kwargs):
515+
super().__init__(**kwargs)
516+
for language in ArticleLanguages:
517+
locale_code = language.value
518+
self.fields[locale_code] = fields.Str(allow_none=True, required=False)
519+
520+
@marshmallow.post_load
521+
def make_article_translation(self, data, **kwargs):
522+
return a_models.ArticleTranslation(**data)</code></pre>
523+
</details>
524+
<h3>Ancestors</h3>
525+
<ul class="hlist">
526+
<li><a title="intercom_python_sdk.core.schema_base.SchemaBase" href="../../core/schema_base.html#intercom_python_sdk.core.schema_base.SchemaBase">SchemaBase</a></li>
527+
<li>marshmallow.schema.Schema</li>
528+
<li>marshmallow.base.SchemaABC</li>
529+
<li>abc.ABC</li>
530+
</ul>
531+
<h3>Class variables</h3>
532+
<dl>
533+
<dt id="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.opts"><code class="name">var <span class="ident">opts</span></code></dt>
534+
<dd>
535+
<div class="desc"></div>
536+
</dd>
537+
</dl>
538+
<h3>Methods</h3>
539+
<dl>
540+
<dt id="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.make_article_translation"><code class="name flex">
541+
<span>def <span class="ident">make_article_translation</span></span>(<span>self, data, **kwargs)</span>
542+
</code></dt>
543+
<dd>
544+
<div class="desc"></div>
545+
<details class="source">
546+
<summary>
547+
<span>Expand source code</span>
548+
</summary>
549+
<pre><code class="python">@marshmallow.post_load
550+
def make_article_translation(self, data, **kwargs):
551+
return a_models.ArticleTranslation(**data)</code></pre>
552+
</details>
553+
</dd>
554+
</dl>
555+
<h3>Inherited members</h3>
556+
<ul class="hlist">
557+
<li><code><b><a title="intercom_python_sdk.core.schema_base.SchemaBase" href="../../core/schema_base.html#intercom_python_sdk.core.schema_base.SchemaBase">SchemaBase</a></b></code>:
558+
<ul class="hlist">
559+
<li><code><a title="intercom_python_sdk.core.schema_base.SchemaBase.Meta" href="../../core/schema_base.html#intercom_python_sdk.core.schema_base.SchemaBase.Meta">Meta</a></code></li>
560+
</ul>
561+
</li>
562+
</ul>
563+
</dd>
476564
</dl>
477565
</section>
478566
</article>
@@ -517,6 +605,13 @@ <h4><code><a title="intercom_python_sdk.apis.articles.schemas.ArticleStatisticsS
517605
<li><code><a title="intercom_python_sdk.apis.articles.schemas.ArticleStatisticsSchema.opts" href="#intercom_python_sdk.apis.articles.schemas.ArticleStatisticsSchema.opts">opts</a></code></li>
518606
</ul>
519607
</li>
608+
<li>
609+
<h4><code><a title="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema" href="#intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema">ArticleTranslationSchema</a></code></h4>
610+
<ul class="">
611+
<li><code><a title="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.make_article_translation" href="#intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.make_article_translation">make_article_translation</a></code></li>
612+
<li><code><a title="intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.opts" href="#intercom_python_sdk.apis.articles.schemas.ArticleTranslationSchema.opts">opts</a></code></li>
613+
</ul>
614+
</li>
520615
</ul>
521616
</li>
522617
</ul>

0 commit comments

Comments
 (0)