Skip to content

Commit

Permalink
fixes pagination implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vi6hal committed Apr 18, 2024
1 parent bbab5c7 commit ebc6ae7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.3.1
* Fixes url encoding issue with `video_ads` stream pagination

## 2.3.0

### Features
Expand Down Expand Up @@ -49,7 +52,7 @@

## 1.2.5
* Auto access-token refresh [#41](https://github.com/singer-io/tap-linkedin-ads/pull/41)

## 1.2.4
* Add Request Timeout [#36](https://github.com/singer-io/tap-linkedin-ads/pull/36)
* Handling 4xx responses for adCampaignGroup [#28](https://github.com/singer-io/tap-linkedin-ads/pull/28)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup, find_packages

setup(name='tap-linkedin-ads',
version='2.3.0',
version='2.3.1',
description='Singer.io tap for extracting data from the LinkedIn Marketing Ads API API 2.0',
author='jeff.huth@bytecode.io',
classifiers=['Programming Language :: Python :: 3 :: Only'],
Expand Down
5 changes: 3 additions & 2 deletions tap_linkedin_ads/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_next_url(stream_name, next_url, data):
if href:
# url must be kept encoded for the creatives endpoint.
# Ref - https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives?view=li-lms-2023-01&tabs=http#sample-request-3
if "rest/creatives" in href:
if "rest/creatives" in href or "rest/posts" in href:
return 'https://api.linkedin.com{}'.format(href)
# Prepare next page URL
next_url = 'https://api.linkedin.com{}'.format(urllib.parse.unquote(href))
Expand Down Expand Up @@ -617,7 +617,8 @@ class VideoAds(LinkedInAds):
parent = "accounts"
params = {
"q": "dscAdAccount",
"dscAdTypes": "List(VIDEO)"
"dscAdTypes": "List(VIDEO)",
"count":100
}
headers = {'X-Restli-Protocol-Version': "2.0.0"}

Expand Down

0 comments on commit ebc6ae7

Please sign in to comment.