|
17 | 17 | NoPandasInstalledError, |
18 | 18 | ) |
19 | 19 |
|
20 | | -__all__ = ['AccountManager', 'Advertiser', 'Bidder', 'Browser', 'CampaignDebugReason', |
21 | | - 'Campaign', 'Category', 'ConnectionType', 'ConversionPixel', 'Country', 'Creative', |
| 20 | +__all__ = ['AccountManager', 'Advertiser', 'Bidder', 'Browser', |
| 21 | + 'CampaignDebugReason', 'Campaign', 'Category', 'ConnectionType', |
| 22 | + 'ConversionPixel', 'Country', 'Creative', 'CreativeAttribute', |
22 | 23 | 'Datacenter', 'DeviceType', 'Domain', 'Fallback', 'Isp', 'Languages', 'Network', |
23 | 24 | 'OperatingSystem', 'Placement', 'PlacementType', 'Profile', 'Publisher', 'Reason', |
24 | 25 | 'Segment', 'SellerProfile', 'Site', 'Size', 'User', 'Visibility'] |
@@ -66,8 +67,7 @@ def __getattr__(self, item): |
66 | 67 | # try to load model attribute from server if possible |
67 | 68 | if not item.startswith('_') and item not in self._attributes and self.session: |
68 | 69 | try: |
69 | | - v = self.session.get(self.__class__.__name__ + '/' + |
70 | | - str(self.id) + '/' + str(item)) |
| 70 | + v = self.session.get(self.__class__._resource_name, self.id, item) |
71 | 71 | self._attributes[item] = v |
72 | 72 | except APIError as e: |
73 | 73 | raise AttributeError(e) |
|
0 commit comments