Skip to content

Add adAnalytics example using the finder method#72

Open
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
ZLeventer:feat/ad-analytics-example
Open

Add adAnalytics example using the finder method#72
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
ZLeventer:feat/ad-analytics-example

Conversation

@ZLeventer
Copy link
Copy Markdown

Summary

  • Adds examples/get_ad_analytics.py demonstrating how to query the adAnalytics endpoint using restli_client.finder()
  • Shows three common patterns: account-level analytics by campaign (monthly), daily analytics for specific campaigns, and creative-level breakdown
  • Clarifies that dateRange, accounts/campaigns, and other complex query params should be passed as native Python types (dicts, lists) — the client handles Rest.li encoding automatically
  • Notes that the fields parameter is a comma-delimited string, not a list (per Rest.li spec behavior discussed in Example of how to make a request to the adAnalytics endpoint #32)

Closes #32

Test plan

  • Verify the example follows the same style as existing files in examples/
  • Confirm the finder() call signature matches the RestliClient API
  • Optionally run against a real ad account with a valid access token

…elopers#32)

Addresses a common source of confusion around querying the adAnalytics
endpoint. Shows three usage patterns: account-level analytics by
campaign, daily analytics for specific campaigns, and creative-level
breakdown. Demonstrates passing dateRange dicts, URN lists, and the
fields parameter as native Python types.

Closes linkedin-developers#32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example of how to make a request to the adAnalytics endpoint

1 participant