Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sgandhi1311 committed Apr 15, 2024
1 parent 9885719 commit ba25b15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

- **Video Ads Stream**
- Added new fields ([#71](https://github.com/singer-io/tap-linkedin-ads/pull/71))
- Requires scope - `r_organization_social` to sync the records.

## 2.2.0
* Bump to API version `202304`
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ This tap:
- Transformations: Fields camelCase to snake_case. URNs to ids. Unix epoch millisecond integers to date-times. Audit date-times created_at and last_modified_at de-nested. String to decimal for total_budget field.
- Children: video_ads

[**video_ads**](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/advertising-targeting/create-and-manage-video#finders)
- Endpoint: https://api.linkedin.com/rest/adDirectSponsoredContents
[**video_ads**](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api?view=li-lms-2024-03&tabs=curl#find-posts-by-account)
- Endpoint: https://api.linkedin.com/rest/posts
- Primary key field: content_reference
- Foreign keys: account_id (accounts), owner_organization_id (organizations)
- Required scope - `r_organization_social`
- Replication strategy: Incremental (query all, filter results)
- Filter: account (from parent account) and owner (from parent account) (see NOTE below)
- Bookmark: last_modified_time (date-time)
Expand Down
4 changes: 2 additions & 2 deletions tap_linkedin_ads/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def merge_responses(pivot, data):
for element in page:
temp_start = element['dateRange']['start']
temp_pivotValue = element['pivotValues'][0]
# adding pivot and pivot_value to make it compatible with the previous tap version 2.2.0
# adding pivot and pivot_value to make it compatible with the previous tap version
element['pivot'] = pivot
element["pivot_value"] = temp_pivotValue
string_start = '{}-{}-{}'.format(temp_start['year'], temp_start['month'], temp_start['day'])
Expand Down Expand Up @@ -626,7 +626,7 @@ def sync_endpoint(self, *args, **kwargs):
return super().sync_endpoint(*args, **kwargs)
except Exception as error:
if "Not enough permissions to access: partnerApiPostsExternal" in str(error):
LOGGER.info("Access to the video-ads API is denied due to insufficient permissions. Please reauthenticate or verify the required permissions.")
LOGGER.warning("Access to the video-ads API is denied due to insufficient permissions. Please reauthenticate or verify the required permissions.")
LOGGER.error(error)
# total record count (zero), initial bookmark returned to supress this failure
return 0, self.get_bookmark(kwargs.get("state"), kwargs.get("start_date"))
Expand Down

0 comments on commit ba25b15

Please sign in to comment.