Skip to content

Commit ec92267

Browse files
committed
Misc
1 parent 9dcffa8 commit ec92267

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

intercom_python_sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'options': ['Option 1', 'Option 2'], # If your attribute has options, define theme (string only).
3737
}
3838
39-
attribute_data = DataAttributeSchema().dump(data)
39+
attribute_data = DataAttributeSchema().dump(data) # You could also do .validate(data) here
4040
new_attribute = intercom.data_attributes.create(new_attribute) # Returns the new DataAttribute object.
4141
```
4242
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
# flake8: noqa
12
"""
23
# Intercom SDK Core
34
45
Contains modules related to core SDK functionality.
56
"""
67

7-
from . import api_base
8+
from . import api_base # noqa
89
from . import configuration
9-
from . import model_base
10+
from . import model_base

intercom_python_sdk/core/api_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(self, config: Configuration, **kwargs):
144144
self.config = config
145145

146146
self.base_url = config.base_url + self.URI
147-
147+
148148
super().__init__(
149149
base_url=self.base_url,
150150
converters=config.converters,

intercom_python_sdk/intercom.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# External
1313
from uplink.auth import BearerToken
1414

15-
# Current package
15+
# Current package
1616
from .apis import tags_to_api_dict
1717
from .core.configuration import Configuration
1818
from .core.api_base import create_api_client
@@ -24,17 +24,19 @@ def __init__(self, api_key: Opt[str] = None, config: Opt[Configuration] = None,
2424
Initializes a new instance of the Intercom class. Requires either an API key or a Configuration object.
2525
2626
Args:
27-
api_key (str): The API key to use for authentication. If not provided, will use the API key from the Configuration object.
28-
config (Configuration): The configuration settings for the API. If not provided, will build one using the provided API key.
29-
debug (dict): Enables debugging features.
27+
api_key (str): The API key to use for authentication.
28+
If not provided, will use the API key from the Configuration object.
29+
config (Configuration): The configuration settings for the API.
30+
If not provided, will build one using the provided API key.
31+
debug (dict): Enables debugging features.
3032
- Default HTTP proxy configuration enabled. Use custom config for more control.
3133
"""
3234
if not api_key and not config:
3335
raise ValueError("Must provide either an API key or a Configuration object.")
34-
36+
3537
if api_key and config: # type: ignore
3638
warn("Both an API key and a Configuration object were provided. Using the Configuration object.")
37-
39+
3840
if not config:
3941
auth = BearerToken(api_key)
4042
if debug:
@@ -46,6 +48,6 @@ def __init__(self, api_key: Opt[str] = None, config: Opt[Configuration] = None,
4648
proxy = None
4749

4850
config = Configuration(auth=auth, proxy=proxy)
49-
51+
5052
for tag, api_class in tags_to_api_dict.items():
5153
setattr(self, tag, create_api_client(api_class, config))

intercom_python_sdk/models/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# flake8: noqa
12
"""
23
# Models Import Interface
34
@@ -28,7 +29,7 @@
2829

2930
from ..apis.data_events.models import (
3031
DataEvent,
31-
DataEventsList
32+
DataEventList
3233
)
3334

3435
from ..apis.data_export.models import DataExportJob

intercom_python_sdk/schemas/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131

3232
from ..apis.data_events.schemas import (
3333
DataEventSchema,
34-
DataEventsListSchema,
34+
DataEventListSchema,
3535
DataEventSummarySchema
36+
)
37+
38+
from ..apis.data_export.schemas import (
39+
DataExportJobSchema,
3640
)

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ bs4
22
requests
33
uplink
44
marshmallow
5-
validator-collection
5+
validator-collection
6+
faker

0 commit comments

Comments
 (0)