zernio-sdk 0.0.656 → 0.0.658

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ea4207c253c9eaf37967d7377b3ee1bf5cac3399e5f34eb0ef1e56a69cc44c4
4
- data.tar.gz: 9f50b4a2d98cedeb9d98983dc7fb77f507a5a91a662bb7e5f23e12dc786fb944
3
+ metadata.gz: d533a7a58f2fc7efbc1edd8f94128b1bc177ca894e80daeac04de6306a075f5b
4
+ data.tar.gz: 734aae21ff31f8c44914b6d48d29c10141d927ab127d1f218bedf2accb1c115c
5
5
  SHA512:
6
- metadata.gz: ca86f855f25f1da6a2e83085ca0809b35e4e4b4d4788d25180e111bd57b12c689e5155fd707e171ed5077e49bc4e59c175cb0e050bbf7f1926905043a6c399ca
7
- data.tar.gz: 151f9f108632025cf7429227267f2bbbaa7799712e1c32de03840c130aac49d317512b0ab2ac21ab175c123b3ca68c0ff85089467aea235852f2b020975978ca
6
+ metadata.gz: c151a8d6cdb58531616385efa31a954d8ab3ea01c284f47b522ac02f4f2393eb2c4470dcc7e245eed341fc76de7d07bff9279af0a447300e49705e3d402a407e
7
+ data.tar.gz: 5cef688ca226df88f1da79ab32e2daf30922ca2955cca546a0a8e6ced063f2a3d1788fc4ddc2d4edd8bc9a5485c66648eec133776c36c83170dca2c9fa95d8c8
data/README.md CHANGED
@@ -465,6 +465,7 @@ Class | Method | HTTP request | Description
465
465
  *Zernio::TrackingTagsApi* | [**update_tracking_tag**](docs/TrackingTagsApi.md#update_tracking_tag) | **PATCH** /v1/accounts/{accountId}/tracking-tags/{tagId} | Update a tracking tag
466
466
  *Zernio::TwitterEngagementApi* | [**bookmark_post**](docs/TwitterEngagementApi.md#bookmark_post) | **POST** /v1/twitter/bookmark | Bookmark a tweet
467
467
  *Zernio::TwitterEngagementApi* | [**follow_user**](docs/TwitterEngagementApi.md#follow_user) | **POST** /v1/twitter/follow | Follow a user
468
+ *Zernio::TwitterEngagementApi* | [**get_tweet**](docs/TwitterEngagementApi.md#get_tweet) | **GET** /v1/twitter/tweet | Look up a tweet
468
469
  *Zernio::TwitterEngagementApi* | [**remove_bookmark**](docs/TwitterEngagementApi.md#remove_bookmark) | **DELETE** /v1/twitter/bookmark | Remove bookmark
469
470
  *Zernio::TwitterEngagementApi* | [**retweet_post**](docs/TwitterEngagementApi.md#retweet_post) | **POST** /v1/twitter/retweet | Retweet a post
470
471
  *Zernio::TwitterEngagementApi* | [**search_tweets**](docs/TwitterEngagementApi.md#search_tweets) | **GET** /v1/twitter/search | Search recent tweets
@@ -1256,6 +1257,8 @@ Class | Method | HTTP request | Description
1256
1257
  - [Zernio::GetTrackingTag200Response](docs/GetTrackingTag200Response.md)
1257
1258
  - [Zernio::GetTrackingTagStats200Response](docs/GetTrackingTagStats200Response.md)
1258
1259
  - [Zernio::GetTrackingTagStats200ResponseStats](docs/GetTrackingTagStats200ResponseStats.md)
1260
+ - [Zernio::GetTweet200Response](docs/GetTweet200Response.md)
1261
+ - [Zernio::GetTweet200ResponseTweet](docs/GetTweet200ResponseTweet.md)
1259
1262
  - [Zernio::GetUsage200Response](docs/GetUsage200Response.md)
1260
1263
  - [Zernio::GetUser200Response](docs/GetUser200Response.md)
1261
1264
  - [Zernio::GetUser200ResponseUser](docs/GetUser200ResponseUser.md)
@@ -855,7 +855,7 @@ opts = {
855
855
  from_date: Date.parse('2013-10-20'), # Date | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
856
856
  to_date: Date.parse('2013-10-20'), # Date | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
857
857
  sort: 'newest', # String | Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end.
858
- time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
858
+ time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
859
859
  daily_level: 'campaign' # String | Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset.
860
860
  }
861
861
 
@@ -903,7 +903,7 @@ end
903
903
  | **from_date** | **Date** | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago. | [optional] |
904
904
  | **to_date** | **Date** | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range. | [optional] |
905
905
  | **sort** | **String** | Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. | [optional][default to 'newest'] |
906
- | **time_increment** | **Integer** | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it. | [optional] |
906
+ | **time_increment** | **Integer** | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it. | [optional] |
907
907
  | **daily_level** | **String** | Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. | [optional][default to 'campaign'] |
908
908
 
909
909
  ### Return type
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
data/docs/AdMetrics.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
data/docs/DiscordApi.md CHANGED
@@ -764,7 +764,7 @@ end
764
764
 
765
765
  Get a Discord guild member
766
766
 
767
- Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
767
+ Fetch a single guild member by Discord user id. Cheaper than paginating the full member listing when you already know who you are looking for.
768
768
 
769
769
  ### Examples
770
770
 
@@ -977,7 +977,7 @@ end
977
977
 
978
978
  List Discord guild members
979
979
 
980
- Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. \"add role to all members joined in the last 7 days\") on the actual platform shape. **Important:** this endpoint requires the privileged \"Server Members Intent\" on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns **403**. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
980
+ Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. \"add role to all members joined in the last 7 days\") on the actual platform shape. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
981
981
 
982
982
  ### Examples
983
983
 
@@ -1419,7 +1419,7 @@ end
1419
1419
 
1420
1420
  Search Discord guild members
1421
1421
 
1422
- Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
1422
+ Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Cheaper than paginating the full member listing when you already know who you are looking for.
1423
1423
 
1424
1424
  ### Examples
1425
1425
 
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
@@ -0,0 +1,20 @@
1
+ # Zernio::GetTweet200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | [optional] |
8
+ | **tweet** | [**GetTweet200ResponseTweet**](GetTweet200ResponseTweet.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::GetTweet200Response.new(
16
+ status: success,
17
+ tweet: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,40 @@
1
+ # Zernio::GetTweet200ResponseTweet
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **text** | **String** | | [optional] |
9
+ | **created** | **Time** | | [optional] |
10
+ | **conversation_id** | **String** | | [optional] |
11
+ | **in_reply_to_tweet_id** | **String** | Parent tweet ID when the tweet is itself a reply | [optional] |
12
+ | **lang** | **String** | | [optional] |
13
+ | **author** | [**SearchTweets200ResponseTweetsInnerAuthor**](SearchTweets200ResponseTweetsInnerAuthor.md) | | [optional] |
14
+ | **like_count** | **Integer** | | [optional] |
15
+ | **reply_count** | **Integer** | | [optional] |
16
+ | **retweet_count** | **Integer** | | [optional] |
17
+ | **quote_count** | **Integer** | | [optional] |
18
+ | **platform** | **String** | | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'zernio-sdk'
24
+
25
+ instance = Zernio::GetTweet200ResponseTweet.new(
26
+ id: null,
27
+ text: null,
28
+ created: null,
29
+ conversation_id: null,
30
+ in_reply_to_tweet_id: null,
31
+ lang: null,
32
+ author: null,
33
+ like_count: null,
34
+ reply_count: null,
35
+ retweet_count: null,
36
+ quote_count: null,
37
+ platform: twitter
38
+ )
39
+ ```
40
+
@@ -6,6 +6,7 @@ All URIs are relative to *https://zernio.com/api*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**bookmark_post**](TwitterEngagementApi.md#bookmark_post) | **POST** /v1/twitter/bookmark | Bookmark a tweet |
8
8
  | [**follow_user**](TwitterEngagementApi.md#follow_user) | **POST** /v1/twitter/follow | Follow a user |
9
+ | [**get_tweet**](TwitterEngagementApi.md#get_tweet) | **GET** /v1/twitter/tweet | Look up a tweet |
9
10
  | [**remove_bookmark**](TwitterEngagementApi.md#remove_bookmark) | **DELETE** /v1/twitter/bookmark | Remove bookmark |
10
11
  | [**retweet_post**](TwitterEngagementApi.md#retweet_post) | **POST** /v1/twitter/retweet | Retweet a post |
11
12
  | [**search_tweets**](TwitterEngagementApi.md#search_tweets) | **GET** /v1/twitter/search | Search recent tweets |
@@ -151,6 +152,77 @@ end
151
152
  - **Accept**: application/json
152
153
 
153
154
 
155
+ ## get_tweet
156
+
157
+ > <GetTweet200Response> get_tweet(account_id, id)
158
+
159
+ Look up a tweet
160
+
161
+ Resolve a single tweet by ID or URL into its text, author and public metrics. Use this to render a post you are referencing, e.g. the tweet quoted by a quote-style post. Unlike `/v1/twitter/search` this is not limited to the last 7 days and works for any tweet visible to the connected account. Billed as an X posts read ($0.005). Repeat lookups of the same tweet within the same UTC day are charged once.
162
+
163
+ ### Examples
164
+
165
+ ```ruby
166
+ require 'time'
167
+ require 'zernio-sdk'
168
+ # setup authorization
169
+ Zernio.configure do |config|
170
+ # Configure Bearer authorization (JWT): bearerAuth
171
+ config.access_token = 'YOUR_BEARER_TOKEN'
172
+ end
173
+
174
+ api_instance = Zernio::TwitterEngagementApi.new
175
+ account_id = 'account_id_example' # String | The social account ID whose X token is used for the lookup
176
+ id = 'id_example' # String | Numeric tweet ID or a tweet URL (e.g. https://x.com/user/status/123...)
177
+
178
+ begin
179
+ # Look up a tweet
180
+ result = api_instance.get_tweet(account_id, id)
181
+ p result
182
+ rescue Zernio::ApiError => e
183
+ puts "Error when calling TwitterEngagementApi->get_tweet: #{e}"
184
+ end
185
+ ```
186
+
187
+ #### Using the get_tweet_with_http_info variant
188
+
189
+ This returns an Array which contains the response data, status code and headers.
190
+
191
+ > <Array(<GetTweet200Response>, Integer, Hash)> get_tweet_with_http_info(account_id, id)
192
+
193
+ ```ruby
194
+ begin
195
+ # Look up a tweet
196
+ data, status_code, headers = api_instance.get_tweet_with_http_info(account_id, id)
197
+ p status_code # => 2xx
198
+ p headers # => { ... }
199
+ p data # => <GetTweet200Response>
200
+ rescue Zernio::ApiError => e
201
+ puts "Error when calling TwitterEngagementApi->get_tweet_with_http_info: #{e}"
202
+ end
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+ | Name | Type | Description | Notes |
208
+ | ---- | ---- | ----------- | ----- |
209
+ | **account_id** | **String** | The social account ID whose X token is used for the lookup | |
210
+ | **id** | **String** | Numeric tweet ID or a tweet URL (e.g. https://x.com/user/status/123...) | |
211
+
212
+ ### Return type
213
+
214
+ [**GetTweet200Response**](GetTweet200Response.md)
215
+
216
+ ### Authorization
217
+
218
+ [bearerAuth](../README.md#bearerAuth)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: application/json
224
+
225
+
154
226
  ## remove_bookmark
155
227
 
156
228
  > <RemoveBookmark200Response> remove_bookmark(account_id, tweet_id)
@@ -833,7 +833,7 @@ module Zernio
833
833
  # @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
834
834
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
835
835
  # @option opts [String] :sort Campaign-level sort order. &#x60;newest&#x60; (default) / &#x60;oldest&#x60; order by the campaign&#39;s newest-ad createdAt. &#x60;spend_desc&#x60; / &#x60;spend_asc&#x60; order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
836
- # @option opts [Integer] :time_increment Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except Meta &#x60;reach&#x60;: the range total is Meta&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it.
836
+ # @option opts [Integer] :time_increment Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except &#x60;reach&#x60; on Meta and TikTok: the range total is the platform&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it.
837
837
  # @option opts [String] :daily_level Which tree levels get the &#x60;daily[]&#x60; series when &#x60;timeIncrement&#x3D;1&#x60;. &#x60;campaign&#x60; (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. &#x60;adset&#x60; adds it on ad sets too; &#x60;ad&#x60; adds it on every ad in &#x60;ads[]&#x60; as well (heaviest — a long range × up to 100 ads per ad set). Scope with &#x60;campaignId&#x60; to keep &#x60;ad&#x60;-level responses small. Ignored when &#x60;timeIncrement&#x60; is unset. (default to 'campaign')
838
838
  # @return [GetAdTree200Response]
839
839
  def get_ad_tree(opts = {})
@@ -857,7 +857,7 @@ module Zernio
857
857
  # @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
858
858
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
859
859
  # @option opts [String] :sort Campaign-level sort order. &#x60;newest&#x60; (default) / &#x60;oldest&#x60; order by the campaign&#39;s newest-ad createdAt. &#x60;spend_desc&#x60; / &#x60;spend_asc&#x60; order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
860
- # @option opts [Integer] :time_increment Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except Meta &#x60;reach&#x60;: the range total is Meta&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it.
860
+ # @option opts [Integer] :time_increment Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except &#x60;reach&#x60; on Meta and TikTok: the range total is the platform&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it.
861
861
  # @option opts [String] :daily_level Which tree levels get the &#x60;daily[]&#x60; series when &#x60;timeIncrement&#x3D;1&#x60;. &#x60;campaign&#x60; (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. &#x60;adset&#x60; adds it on ad sets too; &#x60;ad&#x60; adds it on every ad in &#x60;ads[]&#x60; as well (heaviest — a long range × up to 100 ads per ad set). Scope with &#x60;campaignId&#x60; to keep &#x60;ad&#x60;-level responses small. Ignored when &#x60;timeIncrement&#x60; is unset. (default to 'campaign')
862
862
  # @return [Array<(GetAdTree200Response, Integer, Hash)>] GetAdTree200Response data, response status code and response headers
863
863
  def get_ad_tree_with_http_info(opts = {})
@@ -792,7 +792,7 @@ module Zernio
792
792
  end
793
793
 
794
794
  # Get a Discord guild member
795
- # Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
795
+ # Fetch a single guild member by Discord user id. Cheaper than paginating the full member listing when you already know who you are looking for.
796
796
  # @param guild_id [String]
797
797
  # @param user_id [String] Discord user snowflake.
798
798
  # @param account_id [String]
@@ -804,7 +804,7 @@ module Zernio
804
804
  end
805
805
 
806
806
  # Get a Discord guild member
807
- # Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
807
+ # Fetch a single guild member by Discord user id. Cheaper than paginating the full member listing when you already know who you are looking for.
808
808
  # @param guild_id [String]
809
809
  # @param user_id [String] Discord user snowflake.
810
810
  # @param account_id [String]
@@ -1005,7 +1005,7 @@ module Zernio
1005
1005
  end
1006
1006
 
1007
1007
  # List Discord guild members
1008
- # Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. \"add role to all members joined in the last 7 days\") on the actual platform shape. **Important:** this endpoint requires the privileged \"Server Members Intent\" on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns **403**. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
1008
+ # Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. \"add role to all members joined in the last 7 days\") on the actual platform shape. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
1009
1009
  # @param guild_id [String]
1010
1010
  # @param account_id [String]
1011
1011
  # @param [Hash] opts the optional parameters
@@ -1018,7 +1018,7 @@ module Zernio
1018
1018
  end
1019
1019
 
1020
1020
  # List Discord guild members
1021
- # Cursor-paginated list of guild members. Returns Discord&#39;s raw member objects so callers can build community-ops automation (e.g. \&quot;add role to all members joined in the last 7 days\&quot;) on the actual platform shape. **Important:** this endpoint requires the privileged \&quot;Server Members Intent\&quot; on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns **403**. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass &#x60;after&#x60; &#x3D; the last &#x60;user.id&#x60; from the previous page. Omit on the first call. Response includes a &#x60;nextCursor&#x60; and &#x60;hasMore&#x60; flag so callers don&#39;t need to know Discord&#39;s pagination shape.
1021
+ # Cursor-paginated list of guild members. Returns Discord&#39;s raw member objects so callers can build community-ops automation (e.g. \&quot;add role to all members joined in the last 7 days\&quot;) on the actual platform shape. Pagination: pass &#x60;after&#x60; &#x3D; the last &#x60;user.id&#x60; from the previous page. Omit on the first call. Response includes a &#x60;nextCursor&#x60; and &#x60;hasMore&#x60; flag so callers don&#39;t need to know Discord&#39;s pagination shape.
1022
1022
  # @param guild_id [String]
1023
1023
  # @param account_id [String]
1024
1024
  # @param [Hash] opts the optional parameters
@@ -1460,7 +1460,7 @@ module Zernio
1460
1460
  end
1461
1461
 
1462
1462
  # Search Discord guild members
1463
- # Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
1463
+ # Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Cheaper than paginating the full member listing when you already know who you are looking for.
1464
1464
  # @param guild_id [String]
1465
1465
  # @param account_id [String]
1466
1466
  # @param query [String] Username or nickname prefix to match.
@@ -1473,7 +1473,7 @@ module Zernio
1473
1473
  end
1474
1474
 
1475
1475
  # Search Discord guild members
1476
- # Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
1476
+ # Search guild members whose username or nickname **starts with** the query (Discord matches prefixes only, not substrings). Cheaper than paginating the full member listing when you already know who you are looking for.
1477
1477
  # @param guild_id [String]
1478
1478
  # @param account_id [String]
1479
1479
  # @param query [String] Username or nickname prefix to match.
@@ -155,6 +155,77 @@ module Zernio
155
155
  return data, status_code, headers
156
156
  end
157
157
 
158
+ # Look up a tweet
159
+ # Resolve a single tweet by ID or URL into its text, author and public metrics. Use this to render a post you are referencing, e.g. the tweet quoted by a quote-style post. Unlike `/v1/twitter/search` this is not limited to the last 7 days and works for any tweet visible to the connected account. Billed as an X posts read ($0.005). Repeat lookups of the same tweet within the same UTC day are charged once.
160
+ # @param account_id [String] The social account ID whose X token is used for the lookup
161
+ # @param id [String] Numeric tweet ID or a tweet URL (e.g. https://x.com/user/status/123...)
162
+ # @param [Hash] opts the optional parameters
163
+ # @return [GetTweet200Response]
164
+ def get_tweet(account_id, id, opts = {})
165
+ data, _status_code, _headers = get_tweet_with_http_info(account_id, id, opts)
166
+ data
167
+ end
168
+
169
+ # Look up a tweet
170
+ # Resolve a single tweet by ID or URL into its text, author and public metrics. Use this to render a post you are referencing, e.g. the tweet quoted by a quote-style post. Unlike &#x60;/v1/twitter/search&#x60; this is not limited to the last 7 days and works for any tweet visible to the connected account. Billed as an X posts read ($0.005). Repeat lookups of the same tweet within the same UTC day are charged once.
171
+ # @param account_id [String] The social account ID whose X token is used for the lookup
172
+ # @param id [String] Numeric tweet ID or a tweet URL (e.g. https://x.com/user/status/123...)
173
+ # @param [Hash] opts the optional parameters
174
+ # @return [Array<(GetTweet200Response, Integer, Hash)>] GetTweet200Response data, response status code and response headers
175
+ def get_tweet_with_http_info(account_id, id, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: TwitterEngagementApi.get_tweet ...'
178
+ end
179
+ # verify the required parameter 'account_id' is set
180
+ if @api_client.config.client_side_validation && account_id.nil?
181
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TwitterEngagementApi.get_tweet"
182
+ end
183
+ # verify the required parameter 'id' is set
184
+ if @api_client.config.client_side_validation && id.nil?
185
+ fail ArgumentError, "Missing the required parameter 'id' when calling TwitterEngagementApi.get_tweet"
186
+ end
187
+ # resource path
188
+ local_var_path = '/v1/twitter/tweet'
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+ query_params[:'accountId'] = account_id
193
+ query_params[:'id'] = id
194
+
195
+ # header parameters
196
+ header_params = opts[:header_params] || {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
199
+
200
+ # form parameters
201
+ form_params = opts[:form_params] || {}
202
+
203
+ # http body (model)
204
+ post_body = opts[:debug_body]
205
+
206
+ # return_type
207
+ return_type = opts[:debug_return_type] || 'GetTweet200Response'
208
+
209
+ # auth_names
210
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
211
+
212
+ new_options = opts.merge(
213
+ :operation => :"TwitterEngagementApi.get_tweet",
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => return_type
220
+ )
221
+
222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: TwitterEngagementApi#get_tweet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
158
229
  # Remove bookmark
159
230
  # Remove a bookmark from a tweet.
160
231
  # @param account_id [String]
@@ -14,13 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # One day of metrics. Same fields as `AdMetrics` plus the `date` they apply to. Returned inside a node's `daily[]` when `GET /v1/ads/tree` is called with `timeIncrement=1`. Rate metrics (ctr/cpc/cpm/costPerConversion/ roas/videoAvgTimeWatchedActions) are recomputed per day from that day's sums, so summing the additive fields across a node's `daily[]` reproduces its aggregated `metrics` total. `reach` is the exception: on Meta the aggregated total is de-duplicated across the range, so daily reach does not sum to it. Do NOT sum or plain-average `videoAvgTimeWatchedActions` across days: the range value is the play-weighted average of the daily values.
17
+ # One day of metrics. Same fields as `AdMetrics` plus the `date` they apply to. Returned inside a node's `daily[]` when `GET /v1/ads/tree` is called with `timeIncrement=1`. Rate metrics (ctr/cpc/cpm/costPerConversion/ roas/videoAvgTimeWatchedActions) are recomputed per day from that day's sums, so summing the additive fields across a node's `daily[]` reproduces its aggregated `metrics` total. `reach` is the exception: on Meta and TikTok the aggregated total is de-duplicated across the range, so daily reach does not sum to it. Do NOT sum or plain-average `videoAvgTimeWatchedActions` across days: the range value is the play-weighted average of the daily values.
18
18
  class AdDailyMetrics < ApiModelBase
19
19
  attr_accessor :spend
20
20
 
21
21
  attr_accessor :impressions
22
22
 
23
- # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
23
+ # Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok.
24
24
  attr_accessor :reach
25
25
 
26
26
  attr_accessor :clicks
@@ -19,7 +19,7 @@ module Zernio
19
19
 
20
20
  attr_accessor :impressions
21
21
 
22
- # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
22
+ # Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok.
23
23
  attr_accessor :reach
24
24
 
25
25
  attr_accessor :clicks
@@ -19,7 +19,7 @@ module Zernio
19
19
 
20
20
  attr_accessor :impressions
21
21
 
22
- # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
22
+ # Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok.
23
23
  attr_accessor :reach
24
24
 
25
25
  attr_accessor :clicks
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetTweet200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :tweet
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'status' => :'status',
26
+ :'tweet' => :'tweet'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'status' => :'String',
44
+ :'tweet' => :'GetTweet200ResponseTweet'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetTweet200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetTweet200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'status')
71
+ self.status = attributes[:'status']
72
+ end
73
+
74
+ if attributes.key?(:'tweet')
75
+ self.tweet = attributes[:'tweet']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ status == o.status &&
100
+ tweet == o.tweet
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [status, tweet].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end