Skip to content

Commit bd3c288

Browse files
committed
Updated articles api
1 parent 60f0753 commit bd3c288

File tree

4 files changed

+0
-34
lines changed

4 files changed

+0
-34
lines changed

intercom_python_sdk/apis/articles/models.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@
3434
from .api import ArticlesAPI
3535

3636

37-
class ArticleTranslation(ModelBase):
38-
type: str
39-
40-
def __init__(self, *args, **kwargs):
41-
self.type = kwargs.get('type', 'article_translated_content')
42-
43-
for language in ArticleLanguages:
44-
locale_code = language.value
45-
setattr(self, locale_code, kwargs.get(locale_code, None))
46-
47-
4837
class ArticleStatistics(ModelBase):
4938
"""
5039
This model represents the statistics of an Article on Intercom.

intercom_python_sdk/apis/articles/schemas.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,6 @@ def make_article(self, data, **kwargs):
9292
return a_models.Article(**data)
9393

9494

95-
class ArticleTranslationSchema(SchemaBase):
96-
"""
97-
This schema represents the translation of an Article on Intercom.
98-
"""
99-
type = fields.Str(default="article_translated_content")
100-
101-
def __init__(self, **kwargs):
102-
super().__init__(**kwargs)
103-
for language in ArticleLanguages:
104-
locale_code = language.value
105-
self.fields[locale_code] = fields.Str(allow_none=True, required=False)
106-
107-
@marshmallow.post_load
108-
def make_article_translation(self, data, **kwargs):
109-
return a_models.ArticleTranslation(**data)
110-
111-
112-
11395
class ArticlePagesSchema(SchemaBase):
11496
""" Paging information for a list of Articles on Intercom. """
11597
type = fields.Str(default='pages')

intercom_python_sdk/schemas/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
ArticleSchema,
2323
ArticleListSchema,
2424
ArticleStatisticsSchema,
25-
ArticleTranslationSchema
2625
)
2726

2827
from ..apis.data_attributes.schemas import (

intercom_setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)