late-sdk 0.0.710 → 0.0.711
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 +4 -4
- data/README.md +6 -0
- data/docs/GetInstagramAudio200Response.md +18 -0
- data/docs/InstagramApi.md +148 -0
- data/docs/InstagramAudioAsset.md +38 -0
- data/docs/InstagramPlatformData.md +3 -1
- data/docs/InstagramPlatformDataAudioConfiguration.md +22 -0
- data/docs/SearchInstagramAudio200Response.md +18 -0
- data/lib/zernio-sdk/api/instagram_api.rb +160 -0
- data/lib/zernio-sdk/models/get_instagram_audio200_response.rb +147 -0
- data/lib/zernio-sdk/models/instagram_audio_asset.rb +293 -0
- data/lib/zernio-sdk/models/instagram_platform_data.rb +11 -2
- data/lib/zernio-sdk/models/instagram_platform_data_audio_configuration.rb +242 -0
- data/lib/zernio-sdk/models/search_instagram_audio200_response.rb +149 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +131 -1
- data/spec/api/instagram_api_spec.rb +27 -0
- data/spec/models/get_instagram_audio200_response_spec.rb +36 -0
- data/spec/models/instagram_audio_asset_spec.rb +100 -0
- data/spec/models/instagram_platform_data_audio_configuration_spec.rb +48 -0
- data/spec/models/instagram_platform_data_spec.rb +6 -0
- data/spec/models/search_instagram_audio200_response_spec.rb +36 -0
- data/zernio-sdk-0.0.711.gem +0 -0
- metadata +18 -2
- data/zernio-sdk-0.0.710.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56ae3bd8ba940b4cc2c13e628030af1c05219411a5442ad054ad162efd5df820
|
|
4
|
+
data.tar.gz: bb08eec50b5e4eeb46ac5167e7cf01690a417b8fde0d1f7fe7f166259455522d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d35aa3c5868e43010e6a3442a6f69e0606c636d6268c22f28cb3ff3889dc4cfb451e8d5e34690b5212856ad18ed4a47c992058168aa0045e4cb1ad9505e7237a
|
|
7
|
+
data.tar.gz: a28aa965f5dee8dabd0a2160da7a88d04b4b887652da0eac4bf5da2a93b5ba54b685dd5095ef492d4343cfb6d85492f0ac2f30f41e37072b17b181956400ab09
|
data/README.md
CHANGED
|
@@ -348,9 +348,11 @@ Class | Method | HTTP request | Description
|
|
|
348
348
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_top_accounts**](docs/InboxAnalyticsApi.md#get_inbox_top_accounts) | **GET** /v1/analytics/inbox/top-accounts | Get top accounts by inbox volume
|
|
349
349
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_volume**](docs/InboxAnalyticsApi.md#get_inbox_volume) | **GET** /v1/analytics/inbox/volume | Get inbox messaging volume
|
|
350
350
|
*Zernio::InboxAnalyticsApi* | [**list_inbox_conversation_analytics**](docs/InboxAnalyticsApi.md#list_inbox_conversation_analytics) | **GET** /v1/analytics/inbox/conversations | List conversation analytics
|
|
351
|
+
*Zernio::InstagramApi* | [**get_instagram_audio**](docs/InstagramApi.md#get_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio/{audioId} | Get Instagram audio metadata
|
|
351
352
|
*Zernio::InstagramApi* | [**get_instagram_publishing_limit**](docs/InstagramApi.md#get_instagram_publishing_limit) | **GET** /v1/accounts/{accountId}/instagram/publishing-limit | Get Instagram publishing limit
|
|
352
353
|
*Zernio::InstagramApi* | [**get_instagram_story_insights**](docs/InstagramApi.md#get_instagram_story_insights) | **GET** /v1/accounts/{accountId}/instagram/stories/{storyId}/insights | Get Instagram story insights
|
|
353
354
|
*Zernio::InstagramApi* | [**list_instagram_stories**](docs/InstagramApi.md#list_instagram_stories) | **GET** /v1/accounts/{accountId}/instagram/stories | List active Instagram stories
|
|
355
|
+
*Zernio::InstagramApi* | [**search_instagram_audio**](docs/InstagramApi.md#search_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio | Search Instagram audio
|
|
354
356
|
*Zernio::InvitesApi* | [**create_invite_token**](docs/InvitesApi.md#create_invite_token) | **POST** /v1/invite/tokens | Create invite token
|
|
355
357
|
*Zernio::LeadGenApi* | [**archive_lead_form**](docs/LeadGenApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form
|
|
356
358
|
*Zernio::LeadGenApi* | [**create_lead_form**](docs/LeadGenApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form
|
|
@@ -1209,6 +1211,7 @@ Class | Method | HTTP request | Description
|
|
|
1209
1211
|
- [Zernio::GetInboxVolume200ResponseTimeseriesInner](docs/GetInboxVolume200ResponseTimeseriesInner.md)
|
|
1210
1212
|
- [Zernio::GetInboxVolume400Response](docs/GetInboxVolume400Response.md)
|
|
1211
1213
|
- [Zernio::GetInstagramAccountInsights404Response](docs/GetInstagramAccountInsights404Response.md)
|
|
1214
|
+
- [Zernio::GetInstagramAudio200Response](docs/GetInstagramAudio200Response.md)
|
|
1212
1215
|
- [Zernio::GetInstagramFollowStatus200Response](docs/GetInstagramFollowStatus200Response.md)
|
|
1213
1216
|
- [Zernio::GetInstagramPublishingLimit200Response](docs/GetInstagramPublishingLimit200Response.md)
|
|
1214
1217
|
- [Zernio::GetInstagramStoryInsights200Response](docs/GetInstagramStoryInsights200Response.md)
|
|
@@ -1399,9 +1402,11 @@ Class | Method | HTTP request | Description
|
|
|
1399
1402
|
- [Zernio::InstagramAccountInsightsResponseMetricsValueBreakdownsInner](docs/InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md)
|
|
1400
1403
|
- [Zernio::InstagramAccountInsightsResponseMetricsValueValuesInner](docs/InstagramAccountInsightsResponseMetricsValueValuesInner.md)
|
|
1401
1404
|
- [Zernio::InstagramAccountInsightsResponseUnavailableMetricsInner](docs/InstagramAccountInsightsResponseUnavailableMetricsInner.md)
|
|
1405
|
+
- [Zernio::InstagramAudioAsset](docs/InstagramAudioAsset.md)
|
|
1402
1406
|
- [Zernio::InstagramDemographicsResponse](docs/InstagramDemographicsResponse.md)
|
|
1403
1407
|
- [Zernio::InstagramDemographicsResponseDemographicsValueInner](docs/InstagramDemographicsResponseDemographicsValueInner.md)
|
|
1404
1408
|
- [Zernio::InstagramPlatformData](docs/InstagramPlatformData.md)
|
|
1409
|
+
- [Zernio::InstagramPlatformDataAudioConfiguration](docs/InstagramPlatformDataAudioConfiguration.md)
|
|
1405
1410
|
- [Zernio::InstagramPlatformDataTrialParams](docs/InstagramPlatformDataTrialParams.md)
|
|
1406
1411
|
- [Zernio::InstagramPlatformDataUserTagsInner](docs/InstagramPlatformDataUserTagsInner.md)
|
|
1407
1412
|
- [Zernio::LikeInboxComment200Response](docs/LikeInboxComment200Response.md)
|
|
@@ -1756,6 +1761,7 @@ Class | Method | HTTP request | Description
|
|
|
1756
1761
|
- [Zernio::SearchInboxConversations200ResponseMeta](docs/SearchInboxConversations200ResponseMeta.md)
|
|
1757
1762
|
- [Zernio::SearchInboxConversations200ResponseMetaAccountsSkippedInner](docs/SearchInboxConversations200ResponseMetaAccountsSkippedInner.md)
|
|
1758
1763
|
- [Zernio::SearchInboxConversations200ResponseMetaFailedAccountsInner](docs/SearchInboxConversations200ResponseMetaFailedAccountsInner.md)
|
|
1764
|
+
- [Zernio::SearchInstagramAudio200Response](docs/SearchInstagramAudio200Response.md)
|
|
1759
1765
|
- [Zernio::SearchReddit200Response](docs/SearchReddit200Response.md)
|
|
1760
1766
|
- [Zernio::SearchTweets200Response](docs/SearchTweets200Response.md)
|
|
1761
1767
|
- [Zernio::SearchTweets200ResponseMeta](docs/SearchTweets200ResponseMeta.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::GetInstagramAudio200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio** | [**InstagramAudioAsset**](InstagramAudioAsset.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::GetInstagramAudio200Response.new(
|
|
15
|
+
audio: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/InstagramApi.md
CHANGED
|
@@ -4,9 +4,82 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_instagram_audio**](InstagramApi.md#get_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio/{audioId} | Get Instagram audio metadata |
|
|
7
8
|
| [**get_instagram_publishing_limit**](InstagramApi.md#get_instagram_publishing_limit) | **GET** /v1/accounts/{accountId}/instagram/publishing-limit | Get Instagram publishing limit |
|
|
8
9
|
| [**get_instagram_story_insights**](InstagramApi.md#get_instagram_story_insights) | **GET** /v1/accounts/{accountId}/instagram/stories/{storyId}/insights | Get Instagram story insights |
|
|
9
10
|
| [**list_instagram_stories**](InstagramApi.md#list_instagram_stories) | **GET** /v1/accounts/{accountId}/instagram/stories | List active Instagram stories |
|
|
11
|
+
| [**search_instagram_audio**](InstagramApi.md#search_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio | Search Instagram audio |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## get_instagram_audio
|
|
15
|
+
|
|
16
|
+
> <GetInstagramAudio200Response> get_instagram_audio(account_id, audio_id)
|
|
17
|
+
|
|
18
|
+
Get Instagram audio metadata
|
|
19
|
+
|
|
20
|
+
Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'zernio-sdk'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Zernio.configure do |config|
|
|
29
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
30
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = Zernio::InstagramApi.new
|
|
34
|
+
account_id = 'account_id_example' # String | The ID of the Instagram account
|
|
35
|
+
audio_id = 'audio_id_example' # String | Instagram audio asset ID
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
# Get Instagram audio metadata
|
|
39
|
+
result = api_instance.get_instagram_audio(account_id, audio_id)
|
|
40
|
+
p result
|
|
41
|
+
rescue Zernio::ApiError => e
|
|
42
|
+
puts "Error when calling InstagramApi->get_instagram_audio: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Using the get_instagram_audio_with_http_info variant
|
|
47
|
+
|
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
|
49
|
+
|
|
50
|
+
> <Array(<GetInstagramAudio200Response>, Integer, Hash)> get_instagram_audio_with_http_info(account_id, audio_id)
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
begin
|
|
54
|
+
# Get Instagram audio metadata
|
|
55
|
+
data, status_code, headers = api_instance.get_instagram_audio_with_http_info(account_id, audio_id)
|
|
56
|
+
p status_code # => 2xx
|
|
57
|
+
p headers # => { ... }
|
|
58
|
+
p data # => <GetInstagramAudio200Response>
|
|
59
|
+
rescue Zernio::ApiError => e
|
|
60
|
+
puts "Error when calling InstagramApi->get_instagram_audio_with_http_info: #{e}"
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description | Notes |
|
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
|
68
|
+
| **account_id** | **String** | The ID of the Instagram account | |
|
|
69
|
+
| **audio_id** | **String** | Instagram audio asset ID | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**GetInstagramAudio200Response**](GetInstagramAudio200Response.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
10
83
|
|
|
11
84
|
|
|
12
85
|
## get_instagram_publishing_limit
|
|
@@ -217,3 +290,78 @@ end
|
|
|
217
290
|
- **Content-Type**: Not defined
|
|
218
291
|
- **Accept**: application/json
|
|
219
292
|
|
|
293
|
+
|
|
294
|
+
## search_instagram_audio
|
|
295
|
+
|
|
296
|
+
> <SearchInstagramAudio200Response> search_instagram_audio(account_id, audio_type, opts)
|
|
297
|
+
|
|
298
|
+
Search Instagram audio
|
|
299
|
+
|
|
300
|
+
Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
301
|
+
|
|
302
|
+
### Examples
|
|
303
|
+
|
|
304
|
+
```ruby
|
|
305
|
+
require 'time'
|
|
306
|
+
require 'zernio-sdk'
|
|
307
|
+
# setup authorization
|
|
308
|
+
Zernio.configure do |config|
|
|
309
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
310
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
api_instance = Zernio::InstagramApi.new
|
|
314
|
+
account_id = 'account_id_example' # String | The ID of the Instagram account
|
|
315
|
+
audio_type = 'music' # String | Catalog to search: licensed music or original sounds from Reels.
|
|
316
|
+
opts = {
|
|
317
|
+
q: 'q_example' # String | Search keywords. Omit to get the current trending list.
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
begin
|
|
321
|
+
# Search Instagram audio
|
|
322
|
+
result = api_instance.search_instagram_audio(account_id, audio_type, opts)
|
|
323
|
+
p result
|
|
324
|
+
rescue Zernio::ApiError => e
|
|
325
|
+
puts "Error when calling InstagramApi->search_instagram_audio: #{e}"
|
|
326
|
+
end
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
#### Using the search_instagram_audio_with_http_info variant
|
|
330
|
+
|
|
331
|
+
This returns an Array which contains the response data, status code and headers.
|
|
332
|
+
|
|
333
|
+
> <Array(<SearchInstagramAudio200Response>, Integer, Hash)> search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
334
|
+
|
|
335
|
+
```ruby
|
|
336
|
+
begin
|
|
337
|
+
# Search Instagram audio
|
|
338
|
+
data, status_code, headers = api_instance.search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
339
|
+
p status_code # => 2xx
|
|
340
|
+
p headers # => { ... }
|
|
341
|
+
p data # => <SearchInstagramAudio200Response>
|
|
342
|
+
rescue Zernio::ApiError => e
|
|
343
|
+
puts "Error when calling InstagramApi->search_instagram_audio_with_http_info: #{e}"
|
|
344
|
+
end
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Parameters
|
|
348
|
+
|
|
349
|
+
| Name | Type | Description | Notes |
|
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
|
351
|
+
| **account_id** | **String** | The ID of the Instagram account | |
|
|
352
|
+
| **audio_type** | **String** | Catalog to search: licensed music or original sounds from Reels. | |
|
|
353
|
+
| **q** | **String** | Search keywords. Omit to get the current trending list. | [optional] |
|
|
354
|
+
|
|
355
|
+
### Return type
|
|
356
|
+
|
|
357
|
+
[**SearchInstagramAudio200Response**](SearchInstagramAudio200Response.md)
|
|
358
|
+
|
|
359
|
+
### Authorization
|
|
360
|
+
|
|
361
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
362
|
+
|
|
363
|
+
### HTTP request headers
|
|
364
|
+
|
|
365
|
+
- **Content-Type**: Not defined
|
|
366
|
+
- **Accept**: application/json
|
|
367
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Zernio::InstagramAudioAsset
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio_id** | **String** | Audio asset ID. Pass it as platformSpecificData.audioConfiguration.audioId when creating a Reel. | [optional] |
|
|
8
|
+
| **title** | **String** | Track or sound title. | [optional] |
|
|
9
|
+
| **audio_type** | **String** | Catalog type of the asset. | [optional] |
|
|
10
|
+
| **duration_in_ms** | **Integer** | Asset duration in milliseconds. | [optional] |
|
|
11
|
+
| **display_artist** | **String** | Artist name (licensed music only). | [optional] |
|
|
12
|
+
| **cover_artwork_thumbnail_url** | **String** | Cover artwork thumbnail (licensed music only). | [optional] |
|
|
13
|
+
| **download_url** | **String** | Temporary preview URL. Meta expires it after roughly 1.5 days; re-fetch the asset to refresh it. | [optional] |
|
|
14
|
+
| **ig_username** | **String** | Creator username (original sounds only). | [optional] |
|
|
15
|
+
| **profile_picture_url** | **String** | Creator profile picture (original sounds only). | [optional] |
|
|
16
|
+
| **is_ads_eligible** | **Boolean** | Whether the asset is eligible for ads use. | [optional] |
|
|
17
|
+
| **on_platform_audio_preview_link** | **String** | Instagram web link to preview the audio. | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'zernio-sdk'
|
|
23
|
+
|
|
24
|
+
instance = Zernio::InstagramAudioAsset.new(
|
|
25
|
+
audio_id: 482851939985510,
|
|
26
|
+
title: null,
|
|
27
|
+
audio_type: null,
|
|
28
|
+
duration_in_ms: null,
|
|
29
|
+
display_artist: null,
|
|
30
|
+
cover_artwork_thumbnail_url: null,
|
|
31
|
+
download_url: null,
|
|
32
|
+
ig_username: null,
|
|
33
|
+
profile_picture_url: null,
|
|
34
|
+
is_ads_eligible: null,
|
|
35
|
+
on_platform_audio_preview_link: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
| **first_comment** | **String** | Optional first comment to add after the post is created (not applied to Stories) | [optional] |
|
|
11
11
|
| **trial_params** | [**InstagramPlatformDataTrialParams**](InstagramPlatformDataTrialParams.md) | | [optional] |
|
|
12
12
|
| **user_tags** | [**Array<InstagramPlatformDataUserTagsInner>**](InstagramPlatformDataUserTagsInner.md) | Tag Instagram users by username. The tag shape depends on the media: photos require x/y coordinates, Reels and videos take username only (coordinates are ignored), stories accept optional coordinates. For carousels, use mediaIndex to target specific slides (defaults to 0); video slides take username-only tags. Photo tags without valid coordinates are skipped. | [optional] |
|
|
13
|
-
| **audio_name** | **String** | Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once. | [optional] |
|
|
13
|
+
| **audio_name** | **String** | Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once. Unrelated to audioConfiguration, which attaches a catalog track. | [optional] |
|
|
14
|
+
| **audio_configuration** | [**InstagramPlatformDataAudioConfiguration**](InstagramPlatformDataAudioConfiguration.md) | | [optional] |
|
|
14
15
|
| **thumb_offset** | **Integer** | Millisecond offset from video start for the Reel cover frame. Ignored when instagramThumbnail or reelCover is provided. Defaults to 0. | [optional] |
|
|
15
16
|
| **instagram_thumbnail** | **String** | Custom cover image URL for Instagram Reels (JPG or PNG, publicly accessible). Overrides thumbOffset when provided. Also accepted as reelCover (alias). | [optional] |
|
|
16
17
|
| **reel_cover** | **String** | Alias for instagramThumbnail. If both are provided, instagramThumbnail takes priority. | [optional] |
|
|
@@ -29,6 +30,7 @@ instance = Zernio::InstagramPlatformData.new(
|
|
|
29
30
|
trial_params: null,
|
|
30
31
|
user_tags: null,
|
|
31
32
|
audio_name: My Podcast Intro,
|
|
33
|
+
audio_configuration: null,
|
|
32
34
|
thumb_offset: 5000,
|
|
33
35
|
instagram_thumbnail: null,
|
|
34
36
|
reel_cover: null,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::InstagramPlatformDataAudioConfiguration
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio_id** | **String** | Audio asset ID from the audio search endpoint. | |
|
|
8
|
+
| **audio_volume** | **Integer** | Volume of the attached audio track, 0-100. Defaults to 100. | [optional] |
|
|
9
|
+
| **video_volume** | **Integer** | Volume of the video's own sound, 0-100. Defaults to 100. Set 0 to mute the original video audio. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::InstagramPlatformDataAudioConfiguration.new(
|
|
17
|
+
audio_id: 482851939985510,
|
|
18
|
+
audio_volume: 80,
|
|
19
|
+
video_volume: 100
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::SearchInstagramAudio200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio** | [**Array<InstagramAudioAsset>**](InstagramAudioAsset.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::SearchInstagramAudio200Response.new(
|
|
15
|
+
audio: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -19,6 +19,80 @@ module Zernio
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Get Instagram audio metadata
|
|
23
|
+
# Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
24
|
+
# @param account_id [String] The ID of the Instagram account
|
|
25
|
+
# @param audio_id [String] Instagram audio asset ID
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [GetInstagramAudio200Response]
|
|
28
|
+
def get_instagram_audio(account_id, audio_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = get_instagram_audio_with_http_info(account_id, audio_id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get Instagram audio metadata
|
|
34
|
+
# Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
35
|
+
# @param account_id [String] The ID of the Instagram account
|
|
36
|
+
# @param audio_id [String] Instagram audio asset ID
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(GetInstagramAudio200Response, Integer, Hash)>] GetInstagramAudio200Response data, response status code and response headers
|
|
39
|
+
def get_instagram_audio_with_http_info(account_id, audio_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.get_instagram_audio ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'account_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling InstagramApi.get_instagram_audio"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'audio_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && audio_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'audio_id' when calling InstagramApi.get_instagram_audio"
|
|
50
|
+
end
|
|
51
|
+
pattern = Regexp.new(/^\d{1,30}$/)
|
|
52
|
+
if @api_client.config.client_side_validation && audio_id !~ pattern
|
|
53
|
+
fail ArgumentError, "invalid value for 'audio_id' when calling InstagramApi.get_instagram_audio, must conform to the pattern #{pattern}."
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/v1/accounts/{accountId}/instagram/audio/{audioId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'audioId' + '}', CGI.escape(audio_id.to_s))
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'GetInstagramAudio200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"InstagramApi.get_instagram_audio",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: InstagramApi#get_instagram_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
22
96
|
# Get Instagram publishing limit
|
|
23
97
|
# Returns the account's remaining content-publishing quota for Instagram's rolling 24-hour window, so you can pace publishing and warn before the cap is reached. `quotaUsage` counts containers published since the start of the window. Always compare against the returned `quotaTotal` rather than hardcoding a number: Meta's prose documentation and the live API disagree on the value, and the live value is authoritative.
|
|
24
98
|
# @param account_id [String] The ID of the Instagram account
|
|
@@ -213,5 +287,91 @@ module Zernio
|
|
|
213
287
|
end
|
|
214
288
|
return data, status_code, headers
|
|
215
289
|
end
|
|
290
|
+
|
|
291
|
+
# Search Instagram audio
|
|
292
|
+
# Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
293
|
+
# @param account_id [String] The ID of the Instagram account
|
|
294
|
+
# @param audio_type [String] Catalog to search: licensed music or original sounds from Reels.
|
|
295
|
+
# @param [Hash] opts the optional parameters
|
|
296
|
+
# @option opts [String] :q Search keywords. Omit to get the current trending list.
|
|
297
|
+
# @return [SearchInstagramAudio200Response]
|
|
298
|
+
def search_instagram_audio(account_id, audio_type, opts = {})
|
|
299
|
+
data, _status_code, _headers = search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
300
|
+
data
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Search Instagram audio
|
|
304
|
+
# Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
305
|
+
# @param account_id [String] The ID of the Instagram account
|
|
306
|
+
# @param audio_type [String] Catalog to search: licensed music or original sounds from Reels.
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @option opts [String] :q Search keywords. Omit to get the current trending list.
|
|
309
|
+
# @return [Array<(SearchInstagramAudio200Response, Integer, Hash)>] SearchInstagramAudio200Response data, response status code and response headers
|
|
310
|
+
def search_instagram_audio_with_http_info(account_id, audio_type, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.search_instagram_audio ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'account_id' is set
|
|
315
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling InstagramApi.search_instagram_audio"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'audio_type' is set
|
|
319
|
+
if @api_client.config.client_side_validation && audio_type.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'audio_type' when calling InstagramApi.search_instagram_audio"
|
|
321
|
+
end
|
|
322
|
+
# verify enum value
|
|
323
|
+
allowable_values = ["music", "original_sound"]
|
|
324
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(audio_type)
|
|
325
|
+
fail ArgumentError, "invalid value for \"audio_type\", must be one of #{allowable_values}"
|
|
326
|
+
end
|
|
327
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 200
|
|
328
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling InstagramApi.search_instagram_audio, the character length must be smaller than or equal to 200.'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length < 1
|
|
332
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling InstagramApi.search_instagram_audio, the character length must be greater than or equal to 1.'
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/v1/accounts/{accountId}/instagram/audio'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
query_params[:'audioType'] = audio_type
|
|
341
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
342
|
+
|
|
343
|
+
# header parameters
|
|
344
|
+
header_params = opts[:header_params] || {}
|
|
345
|
+
# HTTP header 'Accept' (if needed)
|
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
347
|
+
|
|
348
|
+
# form parameters
|
|
349
|
+
form_params = opts[:form_params] || {}
|
|
350
|
+
|
|
351
|
+
# http body (model)
|
|
352
|
+
post_body = opts[:debug_body]
|
|
353
|
+
|
|
354
|
+
# return_type
|
|
355
|
+
return_type = opts[:debug_return_type] || 'SearchInstagramAudio200Response'
|
|
356
|
+
|
|
357
|
+
# auth_names
|
|
358
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
359
|
+
|
|
360
|
+
new_options = opts.merge(
|
|
361
|
+
:operation => :"InstagramApi.search_instagram_audio",
|
|
362
|
+
:header_params => header_params,
|
|
363
|
+
:query_params => query_params,
|
|
364
|
+
:form_params => form_params,
|
|
365
|
+
:body => post_body,
|
|
366
|
+
:auth_names => auth_names,
|
|
367
|
+
:return_type => return_type
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
371
|
+
if @api_client.config.debugging
|
|
372
|
+
@api_client.config.logger.debug "API called: InstagramApi#search_instagram_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
373
|
+
end
|
|
374
|
+
return data, status_code, headers
|
|
375
|
+
end
|
|
216
376
|
end
|
|
217
377
|
end
|
|
@@ -0,0 +1,147 @@
|
|
|
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 GetInstagramAudio200Response < ApiModelBase
|
|
18
|
+
attr_accessor :audio
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'audio' => :'audio'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'audio' => :'InstagramAudioAsset'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetInstagramAudio200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetInstagramAudio200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'audio')
|
|
67
|
+
self.audio = attributes[:'audio']
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
+
# @return Array for valid properties with the reasons
|
|
73
|
+
def list_invalid_properties
|
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
+
invalid_properties = Array.new
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
audio == o.audio
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def eql?(o)
|
|
97
|
+
self == o
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Integer] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[audio].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def self.build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
transformed_hash = {}
|
|
113
|
+
openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
+
transformed_hash["#{key}"] = nil
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
new(transformed_hash)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns the object in the form of hash
|
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|