Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 98430f6

Browse files
committed
Add new models: AccountManager, Banned, CampaignDebugReason, PlacementType, Visibility
1 parent cc1cfc8 commit 98430f6

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
----------------
33

44
- :meth:`atomx.Atomx.report` takes ``name`` parameter to name reports
5+
- Add new models:
6+
- :class:`atomx.models.AccountManager` (alias for `User`)
7+
- :class:`atomx.models.Banned` (alias for `Reason`)
8+
- :class:`atomx.models.PlacementType`
9+
- :class:`atomx.models.CampaignDebugReason`
10+
- :class:`atomx.models.Visibility`
511

612

713
1.4

atomx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def get(self, resource, *args, **kwargs):
365365
del r_json[model_name]
366366
self.last_response = r_json
367367
model = get_model_name(model_name)
368-
if model:
368+
if model and res:
369369
if isinstance(res, list):
370370
return [getattr(models, model)(self, **m) for m in res]
371371
return getattr(models, model)(self, **res)

atomx/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
NoPandasInstalledError,
1717
)
1818

19-
__all__ = ['Advertiser', 'Bidder', 'Browser', 'Campaign', 'Category', 'ConnectionType',
20-
'ConversionPixel', 'Country', 'Creative', 'Datacenter', 'DeviceType',
21-
'Domain', 'Fallback', 'Isp', 'Languages', 'Network', 'OperatingSystem',
22-
'Placement', 'Profile', 'Publisher', 'Reason', 'Segment', 'SellerProfile',
23-
'Site', 'Size', 'User']
19+
__all__ = ['AccountManager', 'Advertiser', 'Banned', 'Bidder', 'Browser', 'CampaignDebugReason',
20+
'Campaign', 'Category', 'ConnectionType', 'ConversionPixel', 'Country', 'Creative',
21+
'Datacenter', 'DeviceType', 'Domain', 'Fallback', 'Isp', 'Languages', 'Network',
22+
'OperatingSystem', 'Placement', 'PlacementType', 'Profile', 'Publisher', 'Reason',
23+
'Segment', 'SellerProfile', 'Site', 'Size', 'User', 'Visibility']
2424

2525

2626
class AtomxModel(object):

0 commit comments

Comments
 (0)