Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Linkedin API version from 202304 to 202403 #69

Merged
merged 12 commits into from
Apr 15, 2024
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 2.3.0

### Features
- **API Updates**
- Bumped to API version `202304` ([#64](https://github.com/singer-io/tap-linkedin-ads/pull/69))
- Updated API endpoints for the following streams: `campaign_groups`, `campaigns`, `creatives`

- **Pagination Enhancements**
- Implemented cursor-based pagination for the following streams: `accounts`, `campaign_groups`, `campaigns`, `creatives`

- **API Query Param Adjustments**
- Removed unsupported `pivot` and `pivotValue` from `fields` query parameters in Analytics API requests
- Incorporated these values within the tap to ensure consistency with the previous tap version

- **Video Ads Stream**
- Added new fields ([#71](https://github.com/singer-io/tap-linkedin-ads/pull/71))

## 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
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.2.0',
version='2.3.0',
description='Singer.io tap for extracting data from the LinkedIn Marketing Ads API API 2.0',
author='[email protected]',
classifiers=['Programming Language :: Python :: 3 :: Only'],
Expand Down
2 changes: 1 addition & 1 deletion tap_linkedin_ads/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
BASE_URL = 'https://api.linkedin.com/rest'
LINKEDIN_TOKEN_URI = 'https://www.linkedin.com/oauth/v2/accessToken'
INTROSPECTION_URI = 'https://www.linkedin.com/oauth/v2/introspectToken'
LINKEDIN_VERSION = '202304'
LINKEDIN_VERSION = '202403'

# set default timeout of 300 seconds
REQUEST_TIMEOUT = 300
Expand Down
180 changes: 180 additions & 0 deletions tap_linkedin_ads/schemas/video_ads.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,186 @@
"string"
]
},
"lifecycle_state": {
"type": [
"null",
"string"
]
},
"visibility": {
"type": [
"null",
"string"
]
},
"published_at": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"author": {
"type": [
"null",
"string"
]
},
"content_call_to_action_label": {
"type": [
"null",
"string"
]
},
"distribution": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"feed_distribution": {
"type": [
"null",
"string"
]
},
"third_party_distribution_channels": {
"type": [
"null",
"array"
],
"items": {
"type": [
"null",
"string"
]
}
}
}
},
"content": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"media": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"title": {
"type": [
"null",
"string"
]
},
"id": {
"type": [
"null",
"string"
]
}
}
}
}
},
"content_landing_page": {
"type": [
"null",
"string"
]
},
"lifecycle_state_info": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"is_edited_by_author": {
"type": [
"null",
"boolean"
]
}
}
},
"is_reshare_disabled_by_author": {
"type": [
"null",
"boolean"
]
},
"created_at": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"last_modified_at": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"id": {
"type": [
"null",
"string"
]
},
"commentary": {
"type": [
"null",
"string"
]
},
"ad_context": {
"type": [
"null",
"object"
],
"additionalProperties": false,
"properties": {
"dsc_status": {
"type": [
"null",
"string"
]
},
"dsc_name": {
"type": [
"null",
"string"
]
},
"dsc_ad_type": {
"type": [
"null",
"string"
]
},
"is_dsc": {
"type": [
"null",
"boolean"
]
},
"dsc_ad_account": {
"type": [
"null",
"string"
]
}
}
},
"account_id": {
"type": [
"null",
Expand Down
Loading