scrapebadger 0.1.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,1555 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ScrapeBadger API
|
|
3
|
+
|
|
4
|
+
#Unified credit-based scraping API. https://docs.scrapebadger.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ScrapeBadger
|
|
16
|
+
class InstagramApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# About this account
|
|
23
|
+
# Country, join date and former usernames.
|
|
24
|
+
# @param username [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Object]
|
|
27
|
+
def instagram_about_this_account(username, opts = {})
|
|
28
|
+
data, _status_code, _headers = instagram_about_this_account_with_http_info(username, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# About this account
|
|
33
|
+
# Country, join date and former usernames.
|
|
34
|
+
# @param username [String]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
37
|
+
def instagram_about_this_account_with_http_info(username, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_about_this_account ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'username' is set
|
|
42
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_about_this_account"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v1/instagram/users/{username}/about'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"InstagramApi.instagram_about_this_account",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_about_this_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Blended top search
|
|
86
|
+
# @param query [String]
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [Object]
|
|
89
|
+
def instagram_blended_top_search(query, opts = {})
|
|
90
|
+
data, _status_code, _headers = instagram_blended_top_search_with_http_info(query, opts)
|
|
91
|
+
data
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Blended top search
|
|
95
|
+
# @param query [String]
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
98
|
+
def instagram_blended_top_search_with_http_info(query, opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_blended_top_search ...'
|
|
101
|
+
end
|
|
102
|
+
# verify the required parameter 'query' is set
|
|
103
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling InstagramApi.instagram_blended_top_search"
|
|
105
|
+
end
|
|
106
|
+
if @api_client.config.client_side_validation && query.to_s.length < 1
|
|
107
|
+
fail ArgumentError, 'invalid value for "query" when calling InstagramApi.instagram_blended_top_search, the character length must be great than or equal to 1.'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/v1/instagram/search/top'
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
query_params[:'query'] = query
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"InstagramApi.instagram_blended_top_search",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_blended_top_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get active stories
|
|
152
|
+
# Active stories (account pool only).
|
|
153
|
+
# @param username [String]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [Object]
|
|
156
|
+
def instagram_get_active_stories(username, opts = {})
|
|
157
|
+
data, _status_code, _headers = instagram_get_active_stories_with_http_info(username, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get active stories
|
|
162
|
+
# Active stories (account pool only).
|
|
163
|
+
# @param username [String]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
166
|
+
def instagram_get_active_stories_with_http_info(username, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_active_stories ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'username' is set
|
|
171
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_active_stories"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/v1/instagram/users/{username}/stories'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
184
|
+
|
|
185
|
+
# form parameters
|
|
186
|
+
form_params = opts[:form_params] || {}
|
|
187
|
+
|
|
188
|
+
# http body (model)
|
|
189
|
+
post_body = opts[:debug_body]
|
|
190
|
+
|
|
191
|
+
# return_type
|
|
192
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
193
|
+
|
|
194
|
+
# auth_names
|
|
195
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
196
|
+
|
|
197
|
+
new_options = opts.merge(
|
|
198
|
+
:operation => :"InstagramApi.instagram_get_active_stories",
|
|
199
|
+
:header_params => header_params,
|
|
200
|
+
:query_params => query_params,
|
|
201
|
+
:form_params => form_params,
|
|
202
|
+
:body => post_body,
|
|
203
|
+
:auth_names => auth_names,
|
|
204
|
+
:return_type => return_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_active_stories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
210
|
+
end
|
|
211
|
+
return data, status_code, headers
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Get audio track
|
|
215
|
+
# @param audio_id [String]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @return [Object]
|
|
218
|
+
def instagram_get_audio_track(audio_id, opts = {})
|
|
219
|
+
data, _status_code, _headers = instagram_get_audio_track_with_http_info(audio_id, opts)
|
|
220
|
+
data
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Get audio track
|
|
224
|
+
# @param audio_id [String]
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
227
|
+
def instagram_get_audio_track_with_http_info(audio_id, opts = {})
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_audio_track ...'
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'audio_id' is set
|
|
232
|
+
if @api_client.config.client_side_validation && audio_id.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'audio_id' when calling InstagramApi.instagram_get_audio_track"
|
|
234
|
+
end
|
|
235
|
+
# resource path
|
|
236
|
+
local_var_path = '/v1/instagram/audio/{audio_id}'.sub('{' + 'audio_id' + '}', CGI.escape(audio_id.to_s))
|
|
237
|
+
|
|
238
|
+
# query parameters
|
|
239
|
+
query_params = opts[:query_params] || {}
|
|
240
|
+
|
|
241
|
+
# header parameters
|
|
242
|
+
header_params = opts[:header_params] || {}
|
|
243
|
+
# HTTP header 'Accept' (if needed)
|
|
244
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
245
|
+
|
|
246
|
+
# form parameters
|
|
247
|
+
form_params = opts[:form_params] || {}
|
|
248
|
+
|
|
249
|
+
# http body (model)
|
|
250
|
+
post_body = opts[:debug_body]
|
|
251
|
+
|
|
252
|
+
# return_type
|
|
253
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
254
|
+
|
|
255
|
+
# auth_names
|
|
256
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
257
|
+
|
|
258
|
+
new_options = opts.merge(
|
|
259
|
+
:operation => :"InstagramApi.instagram_get_audio_track",
|
|
260
|
+
:header_params => header_params,
|
|
261
|
+
:query_params => query_params,
|
|
262
|
+
:form_params => form_params,
|
|
263
|
+
:body => post_body,
|
|
264
|
+
:auth_names => auth_names,
|
|
265
|
+
:return_type => return_type
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_audio_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
+
end
|
|
272
|
+
return data, status_code, headers
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Get comments
|
|
276
|
+
# @param code [String]
|
|
277
|
+
# @param [Hash] opts the optional parameters
|
|
278
|
+
# @option opts [Integer] :amount (default to 20)
|
|
279
|
+
# @option opts [String] :cursor
|
|
280
|
+
# @return [Object]
|
|
281
|
+
def instagram_get_comments(code, opts = {})
|
|
282
|
+
data, _status_code, _headers = instagram_get_comments_with_http_info(code, opts)
|
|
283
|
+
data
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Get comments
|
|
287
|
+
# @param code [String]
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @option opts [Integer] :amount (default to 20)
|
|
290
|
+
# @option opts [String] :cursor
|
|
291
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
292
|
+
def instagram_get_comments_with_http_info(code, opts = {})
|
|
293
|
+
if @api_client.config.debugging
|
|
294
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_comments ...'
|
|
295
|
+
end
|
|
296
|
+
# verify the required parameter 'code' is set
|
|
297
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
298
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling InstagramApi.instagram_get_comments"
|
|
299
|
+
end
|
|
300
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
301
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_comments, must be smaller than or equal to 100.'
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
305
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_comments, must be greater than or equal to 1.'
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '/v1/instagram/media/{code}/comments'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
314
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
315
|
+
|
|
316
|
+
# header parameters
|
|
317
|
+
header_params = opts[:header_params] || {}
|
|
318
|
+
# HTTP header 'Accept' (if needed)
|
|
319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
320
|
+
|
|
321
|
+
# form parameters
|
|
322
|
+
form_params = opts[:form_params] || {}
|
|
323
|
+
|
|
324
|
+
# http body (model)
|
|
325
|
+
post_body = opts[:debug_body]
|
|
326
|
+
|
|
327
|
+
# return_type
|
|
328
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
329
|
+
|
|
330
|
+
# auth_names
|
|
331
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
332
|
+
|
|
333
|
+
new_options = opts.merge(
|
|
334
|
+
:operation => :"InstagramApi.instagram_get_comments",
|
|
335
|
+
:header_params => header_params,
|
|
336
|
+
:query_params => query_params,
|
|
337
|
+
:form_params => form_params,
|
|
338
|
+
:body => post_body,
|
|
339
|
+
:auth_names => auth_names,
|
|
340
|
+
:return_type => return_type
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
344
|
+
if @api_client.config.debugging
|
|
345
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
+
end
|
|
347
|
+
return data, status_code, headers
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Get followers
|
|
351
|
+
# Followers list, paginated (account pool).
|
|
352
|
+
# @param username [String]
|
|
353
|
+
# @param [Hash] opts the optional parameters
|
|
354
|
+
# @option opts [Integer] :amount (default to 50)
|
|
355
|
+
# @option opts [String] :cursor
|
|
356
|
+
# @option opts [String] :order date_followed_latest | date_followed_earliest
|
|
357
|
+
# @return [Object]
|
|
358
|
+
def instagram_get_followers(username, opts = {})
|
|
359
|
+
data, _status_code, _headers = instagram_get_followers_with_http_info(username, opts)
|
|
360
|
+
data
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Get followers
|
|
364
|
+
# Followers list, paginated (account pool).
|
|
365
|
+
# @param username [String]
|
|
366
|
+
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @option opts [Integer] :amount (default to 50)
|
|
368
|
+
# @option opts [String] :cursor
|
|
369
|
+
# @option opts [String] :order date_followed_latest | date_followed_earliest
|
|
370
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
371
|
+
def instagram_get_followers_with_http_info(username, opts = {})
|
|
372
|
+
if @api_client.config.debugging
|
|
373
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_followers ...'
|
|
374
|
+
end
|
|
375
|
+
# verify the required parameter 'username' is set
|
|
376
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
377
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_followers"
|
|
378
|
+
end
|
|
379
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
380
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_followers, must be smaller than or equal to 100.'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
384
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_followers, must be greater than or equal to 1.'
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# resource path
|
|
388
|
+
local_var_path = '/v1/instagram/users/{username}/followers'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
389
|
+
|
|
390
|
+
# query parameters
|
|
391
|
+
query_params = opts[:query_params] || {}
|
|
392
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
393
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
394
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
395
|
+
|
|
396
|
+
# header parameters
|
|
397
|
+
header_params = opts[:header_params] || {}
|
|
398
|
+
# HTTP header 'Accept' (if needed)
|
|
399
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
400
|
+
|
|
401
|
+
# form parameters
|
|
402
|
+
form_params = opts[:form_params] || {}
|
|
403
|
+
|
|
404
|
+
# http body (model)
|
|
405
|
+
post_body = opts[:debug_body]
|
|
406
|
+
|
|
407
|
+
# return_type
|
|
408
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
409
|
+
|
|
410
|
+
# auth_names
|
|
411
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
412
|
+
|
|
413
|
+
new_options = opts.merge(
|
|
414
|
+
:operation => :"InstagramApi.instagram_get_followers",
|
|
415
|
+
:header_params => header_params,
|
|
416
|
+
:query_params => query_params,
|
|
417
|
+
:form_params => form_params,
|
|
418
|
+
:body => post_body,
|
|
419
|
+
:auth_names => auth_names,
|
|
420
|
+
:return_type => return_type
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_followers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
426
|
+
end
|
|
427
|
+
return data, status_code, headers
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Get following
|
|
431
|
+
# @param username [String]
|
|
432
|
+
# @param [Hash] opts the optional parameters
|
|
433
|
+
# @option opts [Integer] :amount (default to 50)
|
|
434
|
+
# @option opts [String] :cursor
|
|
435
|
+
# @return [Object]
|
|
436
|
+
def instagram_get_following(username, opts = {})
|
|
437
|
+
data, _status_code, _headers = instagram_get_following_with_http_info(username, opts)
|
|
438
|
+
data
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# Get following
|
|
442
|
+
# @param username [String]
|
|
443
|
+
# @param [Hash] opts the optional parameters
|
|
444
|
+
# @option opts [Integer] :amount (default to 50)
|
|
445
|
+
# @option opts [String] :cursor
|
|
446
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
447
|
+
def instagram_get_following_with_http_info(username, opts = {})
|
|
448
|
+
if @api_client.config.debugging
|
|
449
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_following ...'
|
|
450
|
+
end
|
|
451
|
+
# verify the required parameter 'username' is set
|
|
452
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
453
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_following"
|
|
454
|
+
end
|
|
455
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
456
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_following, must be smaller than or equal to 100.'
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
460
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_following, must be greater than or equal to 1.'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# resource path
|
|
464
|
+
local_var_path = '/v1/instagram/users/{username}/following'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
465
|
+
|
|
466
|
+
# query parameters
|
|
467
|
+
query_params = opts[:query_params] || {}
|
|
468
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
469
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
470
|
+
|
|
471
|
+
# header parameters
|
|
472
|
+
header_params = opts[:header_params] || {}
|
|
473
|
+
# HTTP header 'Accept' (if needed)
|
|
474
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
475
|
+
|
|
476
|
+
# form parameters
|
|
477
|
+
form_params = opts[:form_params] || {}
|
|
478
|
+
|
|
479
|
+
# http body (model)
|
|
480
|
+
post_body = opts[:debug_body]
|
|
481
|
+
|
|
482
|
+
# return_type
|
|
483
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
484
|
+
|
|
485
|
+
# auth_names
|
|
486
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
487
|
+
|
|
488
|
+
new_options = opts.merge(
|
|
489
|
+
:operation => :"InstagramApi.instagram_get_following",
|
|
490
|
+
:header_params => header_params,
|
|
491
|
+
:query_params => query_params,
|
|
492
|
+
:form_params => form_params,
|
|
493
|
+
:body => post_body,
|
|
494
|
+
:auth_names => auth_names,
|
|
495
|
+
:return_type => return_type
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
499
|
+
if @api_client.config.debugging
|
|
500
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_following\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
501
|
+
end
|
|
502
|
+
return data, status_code, headers
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# Get hashtag info
|
|
506
|
+
# @param tag [String]
|
|
507
|
+
# @param [Hash] opts the optional parameters
|
|
508
|
+
# @return [Object]
|
|
509
|
+
def instagram_get_hashtag_info(tag, opts = {})
|
|
510
|
+
data, _status_code, _headers = instagram_get_hashtag_info_with_http_info(tag, opts)
|
|
511
|
+
data
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# Get hashtag info
|
|
515
|
+
# @param tag [String]
|
|
516
|
+
# @param [Hash] opts the optional parameters
|
|
517
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
518
|
+
def instagram_get_hashtag_info_with_http_info(tag, opts = {})
|
|
519
|
+
if @api_client.config.debugging
|
|
520
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_hashtag_info ...'
|
|
521
|
+
end
|
|
522
|
+
# verify the required parameter 'tag' is set
|
|
523
|
+
if @api_client.config.client_side_validation && tag.nil?
|
|
524
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling InstagramApi.instagram_get_hashtag_info"
|
|
525
|
+
end
|
|
526
|
+
# resource path
|
|
527
|
+
local_var_path = '/v1/instagram/hashtags/{tag}'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
|
528
|
+
|
|
529
|
+
# query parameters
|
|
530
|
+
query_params = opts[:query_params] || {}
|
|
531
|
+
|
|
532
|
+
# header parameters
|
|
533
|
+
header_params = opts[:header_params] || {}
|
|
534
|
+
# HTTP header 'Accept' (if needed)
|
|
535
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
536
|
+
|
|
537
|
+
# form parameters
|
|
538
|
+
form_params = opts[:form_params] || {}
|
|
539
|
+
|
|
540
|
+
# http body (model)
|
|
541
|
+
post_body = opts[:debug_body]
|
|
542
|
+
|
|
543
|
+
# return_type
|
|
544
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
545
|
+
|
|
546
|
+
# auth_names
|
|
547
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
548
|
+
|
|
549
|
+
new_options = opts.merge(
|
|
550
|
+
:operation => :"InstagramApi.instagram_get_hashtag_info",
|
|
551
|
+
:header_params => header_params,
|
|
552
|
+
:query_params => query_params,
|
|
553
|
+
:form_params => form_params,
|
|
554
|
+
:body => post_body,
|
|
555
|
+
:auth_names => auth_names,
|
|
556
|
+
:return_type => return_type
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
560
|
+
if @api_client.config.debugging
|
|
561
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_hashtag_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
562
|
+
end
|
|
563
|
+
return data, status_code, headers
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
# Get highlights
|
|
567
|
+
# @param username [String]
|
|
568
|
+
# @param [Hash] opts the optional parameters
|
|
569
|
+
# @return [Object]
|
|
570
|
+
def instagram_get_highlights(username, opts = {})
|
|
571
|
+
data, _status_code, _headers = instagram_get_highlights_with_http_info(username, opts)
|
|
572
|
+
data
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
# Get highlights
|
|
576
|
+
# @param username [String]
|
|
577
|
+
# @param [Hash] opts the optional parameters
|
|
578
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
579
|
+
def instagram_get_highlights_with_http_info(username, opts = {})
|
|
580
|
+
if @api_client.config.debugging
|
|
581
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_highlights ...'
|
|
582
|
+
end
|
|
583
|
+
# verify the required parameter 'username' is set
|
|
584
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
585
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_highlights"
|
|
586
|
+
end
|
|
587
|
+
# resource path
|
|
588
|
+
local_var_path = '/v1/instagram/users/{username}/highlights'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
589
|
+
|
|
590
|
+
# query parameters
|
|
591
|
+
query_params = opts[:query_params] || {}
|
|
592
|
+
|
|
593
|
+
# header parameters
|
|
594
|
+
header_params = opts[:header_params] || {}
|
|
595
|
+
# HTTP header 'Accept' (if needed)
|
|
596
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
597
|
+
|
|
598
|
+
# form parameters
|
|
599
|
+
form_params = opts[:form_params] || {}
|
|
600
|
+
|
|
601
|
+
# http body (model)
|
|
602
|
+
post_body = opts[:debug_body]
|
|
603
|
+
|
|
604
|
+
# return_type
|
|
605
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
606
|
+
|
|
607
|
+
# auth_names
|
|
608
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
609
|
+
|
|
610
|
+
new_options = opts.merge(
|
|
611
|
+
:operation => :"InstagramApi.instagram_get_highlights",
|
|
612
|
+
:header_params => header_params,
|
|
613
|
+
:query_params => query_params,
|
|
614
|
+
:form_params => form_params,
|
|
615
|
+
:body => post_body,
|
|
616
|
+
:auth_names => auth_names,
|
|
617
|
+
:return_type => return_type
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
621
|
+
if @api_client.config.debugging
|
|
622
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_highlights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
623
|
+
end
|
|
624
|
+
return data, status_code, headers
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
# Get likers
|
|
628
|
+
# @param code [String]
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @return [Object]
|
|
631
|
+
def instagram_get_likers(code, opts = {})
|
|
632
|
+
data, _status_code, _headers = instagram_get_likers_with_http_info(code, opts)
|
|
633
|
+
data
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# Get likers
|
|
637
|
+
# @param code [String]
|
|
638
|
+
# @param [Hash] opts the optional parameters
|
|
639
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
640
|
+
def instagram_get_likers_with_http_info(code, opts = {})
|
|
641
|
+
if @api_client.config.debugging
|
|
642
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_likers ...'
|
|
643
|
+
end
|
|
644
|
+
# verify the required parameter 'code' is set
|
|
645
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
646
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling InstagramApi.instagram_get_likers"
|
|
647
|
+
end
|
|
648
|
+
# resource path
|
|
649
|
+
local_var_path = '/v1/instagram/media/{code}/likers'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
|
|
650
|
+
|
|
651
|
+
# query parameters
|
|
652
|
+
query_params = opts[:query_params] || {}
|
|
653
|
+
|
|
654
|
+
# header parameters
|
|
655
|
+
header_params = opts[:header_params] || {}
|
|
656
|
+
# HTTP header 'Accept' (if needed)
|
|
657
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
658
|
+
|
|
659
|
+
# form parameters
|
|
660
|
+
form_params = opts[:form_params] || {}
|
|
661
|
+
|
|
662
|
+
# http body (model)
|
|
663
|
+
post_body = opts[:debug_body]
|
|
664
|
+
|
|
665
|
+
# return_type
|
|
666
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
667
|
+
|
|
668
|
+
# auth_names
|
|
669
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
670
|
+
|
|
671
|
+
new_options = opts.merge(
|
|
672
|
+
:operation => :"InstagramApi.instagram_get_likers",
|
|
673
|
+
:header_params => header_params,
|
|
674
|
+
:query_params => query_params,
|
|
675
|
+
:form_params => form_params,
|
|
676
|
+
:body => post_body,
|
|
677
|
+
:auth_names => auth_names,
|
|
678
|
+
:return_type => return_type
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
682
|
+
if @api_client.config.debugging
|
|
683
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_likers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
684
|
+
end
|
|
685
|
+
return data, status_code, headers
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
# Get location
|
|
689
|
+
# @param location_pk [Integer]
|
|
690
|
+
# @param [Hash] opts the optional parameters
|
|
691
|
+
# @return [Object]
|
|
692
|
+
def instagram_get_location(location_pk, opts = {})
|
|
693
|
+
data, _status_code, _headers = instagram_get_location_with_http_info(location_pk, opts)
|
|
694
|
+
data
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Get location
|
|
698
|
+
# @param location_pk [Integer]
|
|
699
|
+
# @param [Hash] opts the optional parameters
|
|
700
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
701
|
+
def instagram_get_location_with_http_info(location_pk, opts = {})
|
|
702
|
+
if @api_client.config.debugging
|
|
703
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_location ...'
|
|
704
|
+
end
|
|
705
|
+
# verify the required parameter 'location_pk' is set
|
|
706
|
+
if @api_client.config.client_side_validation && location_pk.nil?
|
|
707
|
+
fail ArgumentError, "Missing the required parameter 'location_pk' when calling InstagramApi.instagram_get_location"
|
|
708
|
+
end
|
|
709
|
+
# resource path
|
|
710
|
+
local_var_path = '/v1/instagram/locations/{location_pk}'.sub('{' + 'location_pk' + '}', CGI.escape(location_pk.to_s))
|
|
711
|
+
|
|
712
|
+
# query parameters
|
|
713
|
+
query_params = opts[:query_params] || {}
|
|
714
|
+
|
|
715
|
+
# header parameters
|
|
716
|
+
header_params = opts[:header_params] || {}
|
|
717
|
+
# HTTP header 'Accept' (if needed)
|
|
718
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
719
|
+
|
|
720
|
+
# form parameters
|
|
721
|
+
form_params = opts[:form_params] || {}
|
|
722
|
+
|
|
723
|
+
# http body (model)
|
|
724
|
+
post_body = opts[:debug_body]
|
|
725
|
+
|
|
726
|
+
# return_type
|
|
727
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
728
|
+
|
|
729
|
+
# auth_names
|
|
730
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
731
|
+
|
|
732
|
+
new_options = opts.merge(
|
|
733
|
+
:operation => :"InstagramApi.instagram_get_location",
|
|
734
|
+
:header_params => header_params,
|
|
735
|
+
:query_params => query_params,
|
|
736
|
+
:form_params => form_params,
|
|
737
|
+
:body => post_body,
|
|
738
|
+
:auth_names => auth_names,
|
|
739
|
+
:return_type => return_type
|
|
740
|
+
)
|
|
741
|
+
|
|
742
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
743
|
+
if @api_client.config.debugging
|
|
744
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
745
|
+
end
|
|
746
|
+
return data, status_code, headers
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
# Get post/reel detail
|
|
750
|
+
# Single post or reel: caption, media, counts, tags, location, carousel.
|
|
751
|
+
# @param code [String]
|
|
752
|
+
# @param [Hash] opts the optional parameters
|
|
753
|
+
# @return [Object]
|
|
754
|
+
def instagram_get_post_reel_detail(code, opts = {})
|
|
755
|
+
data, _status_code, _headers = instagram_get_post_reel_detail_with_http_info(code, opts)
|
|
756
|
+
data
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
# Get post/reel detail
|
|
760
|
+
# Single post or reel: caption, media, counts, tags, location, carousel.
|
|
761
|
+
# @param code [String]
|
|
762
|
+
# @param [Hash] opts the optional parameters
|
|
763
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
764
|
+
def instagram_get_post_reel_detail_with_http_info(code, opts = {})
|
|
765
|
+
if @api_client.config.debugging
|
|
766
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_post_reel_detail ...'
|
|
767
|
+
end
|
|
768
|
+
# verify the required parameter 'code' is set
|
|
769
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
770
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling InstagramApi.instagram_get_post_reel_detail"
|
|
771
|
+
end
|
|
772
|
+
# resource path
|
|
773
|
+
local_var_path = '/v1/instagram/media/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
|
|
774
|
+
|
|
775
|
+
# query parameters
|
|
776
|
+
query_params = opts[:query_params] || {}
|
|
777
|
+
|
|
778
|
+
# header parameters
|
|
779
|
+
header_params = opts[:header_params] || {}
|
|
780
|
+
# HTTP header 'Accept' (if needed)
|
|
781
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
782
|
+
|
|
783
|
+
# form parameters
|
|
784
|
+
form_params = opts[:form_params] || {}
|
|
785
|
+
|
|
786
|
+
# http body (model)
|
|
787
|
+
post_body = opts[:debug_body]
|
|
788
|
+
|
|
789
|
+
# return_type
|
|
790
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
791
|
+
|
|
792
|
+
# auth_names
|
|
793
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
794
|
+
|
|
795
|
+
new_options = opts.merge(
|
|
796
|
+
:operation => :"InstagramApi.instagram_get_post_reel_detail",
|
|
797
|
+
:header_params => header_params,
|
|
798
|
+
:query_params => query_params,
|
|
799
|
+
:form_params => form_params,
|
|
800
|
+
:body => post_body,
|
|
801
|
+
:auth_names => auth_names,
|
|
802
|
+
:return_type => return_type
|
|
803
|
+
)
|
|
804
|
+
|
|
805
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
806
|
+
if @api_client.config.debugging
|
|
807
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_post_reel_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
808
|
+
end
|
|
809
|
+
return data, status_code, headers
|
|
810
|
+
end
|
|
811
|
+
|
|
812
|
+
# Get profile
|
|
813
|
+
# Full public profile: bio, counts, verification, business contact, links.
|
|
814
|
+
# @param username [String]
|
|
815
|
+
# @param [Hash] opts the optional parameters
|
|
816
|
+
# @return [Object]
|
|
817
|
+
def instagram_get_profile(username, opts = {})
|
|
818
|
+
data, _status_code, _headers = instagram_get_profile_with_http_info(username, opts)
|
|
819
|
+
data
|
|
820
|
+
end
|
|
821
|
+
|
|
822
|
+
# Get profile
|
|
823
|
+
# Full public profile: bio, counts, verification, business contact, links.
|
|
824
|
+
# @param username [String]
|
|
825
|
+
# @param [Hash] opts the optional parameters
|
|
826
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
827
|
+
def instagram_get_profile_with_http_info(username, opts = {})
|
|
828
|
+
if @api_client.config.debugging
|
|
829
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_profile ...'
|
|
830
|
+
end
|
|
831
|
+
# verify the required parameter 'username' is set
|
|
832
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
833
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_profile"
|
|
834
|
+
end
|
|
835
|
+
# resource path
|
|
836
|
+
local_var_path = '/v1/instagram/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
837
|
+
|
|
838
|
+
# query parameters
|
|
839
|
+
query_params = opts[:query_params] || {}
|
|
840
|
+
|
|
841
|
+
# header parameters
|
|
842
|
+
header_params = opts[:header_params] || {}
|
|
843
|
+
# HTTP header 'Accept' (if needed)
|
|
844
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
845
|
+
|
|
846
|
+
# form parameters
|
|
847
|
+
form_params = opts[:form_params] || {}
|
|
848
|
+
|
|
849
|
+
# http body (model)
|
|
850
|
+
post_body = opts[:debug_body]
|
|
851
|
+
|
|
852
|
+
# return_type
|
|
853
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
854
|
+
|
|
855
|
+
# auth_names
|
|
856
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
857
|
+
|
|
858
|
+
new_options = opts.merge(
|
|
859
|
+
:operation => :"InstagramApi.instagram_get_profile",
|
|
860
|
+
:header_params => header_params,
|
|
861
|
+
:query_params => query_params,
|
|
862
|
+
:form_params => form_params,
|
|
863
|
+
:body => post_body,
|
|
864
|
+
:auth_names => auth_names,
|
|
865
|
+
:return_type => return_type
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
869
|
+
if @api_client.config.debugging
|
|
870
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
871
|
+
end
|
|
872
|
+
return data, status_code, headers
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# Get tagged posts
|
|
876
|
+
# @param username [String]
|
|
877
|
+
# @param [Hash] opts the optional parameters
|
|
878
|
+
# @option opts [Integer] :amount (default to 20)
|
|
879
|
+
# @option opts [String] :cursor
|
|
880
|
+
# @return [Object]
|
|
881
|
+
def instagram_get_tagged_posts(username, opts = {})
|
|
882
|
+
data, _status_code, _headers = instagram_get_tagged_posts_with_http_info(username, opts)
|
|
883
|
+
data
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
# Get tagged posts
|
|
887
|
+
# @param username [String]
|
|
888
|
+
# @param [Hash] opts the optional parameters
|
|
889
|
+
# @option opts [Integer] :amount (default to 20)
|
|
890
|
+
# @option opts [String] :cursor
|
|
891
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
892
|
+
def instagram_get_tagged_posts_with_http_info(username, opts = {})
|
|
893
|
+
if @api_client.config.debugging
|
|
894
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_tagged_posts ...'
|
|
895
|
+
end
|
|
896
|
+
# verify the required parameter 'username' is set
|
|
897
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
898
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_tagged_posts"
|
|
899
|
+
end
|
|
900
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
901
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_tagged_posts, must be smaller than or equal to 100.'
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
905
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_tagged_posts, must be greater than or equal to 1.'
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
# resource path
|
|
909
|
+
local_var_path = '/v1/instagram/users/{username}/tagged'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
910
|
+
|
|
911
|
+
# query parameters
|
|
912
|
+
query_params = opts[:query_params] || {}
|
|
913
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
914
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
915
|
+
|
|
916
|
+
# header parameters
|
|
917
|
+
header_params = opts[:header_params] || {}
|
|
918
|
+
# HTTP header 'Accept' (if needed)
|
|
919
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
920
|
+
|
|
921
|
+
# form parameters
|
|
922
|
+
form_params = opts[:form_params] || {}
|
|
923
|
+
|
|
924
|
+
# http body (model)
|
|
925
|
+
post_body = opts[:debug_body]
|
|
926
|
+
|
|
927
|
+
# return_type
|
|
928
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
929
|
+
|
|
930
|
+
# auth_names
|
|
931
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
932
|
+
|
|
933
|
+
new_options = opts.merge(
|
|
934
|
+
:operation => :"InstagramApi.instagram_get_tagged_posts",
|
|
935
|
+
:header_params => header_params,
|
|
936
|
+
:query_params => query_params,
|
|
937
|
+
:form_params => form_params,
|
|
938
|
+
:body => post_body,
|
|
939
|
+
:auth_names => auth_names,
|
|
940
|
+
:return_type => return_type
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
944
|
+
if @api_client.config.debugging
|
|
945
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_tagged_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
946
|
+
end
|
|
947
|
+
return data, status_code, headers
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
# Get user posts
|
|
951
|
+
# Timeline posts, paginated.
|
|
952
|
+
# @param username [String]
|
|
953
|
+
# @param [Hash] opts the optional parameters
|
|
954
|
+
# @option opts [Integer] :amount (default to 20)
|
|
955
|
+
# @option opts [String] :cursor
|
|
956
|
+
# @return [Object]
|
|
957
|
+
def instagram_get_user_posts(username, opts = {})
|
|
958
|
+
data, _status_code, _headers = instagram_get_user_posts_with_http_info(username, opts)
|
|
959
|
+
data
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
# Get user posts
|
|
963
|
+
# Timeline posts, paginated.
|
|
964
|
+
# @param username [String]
|
|
965
|
+
# @param [Hash] opts the optional parameters
|
|
966
|
+
# @option opts [Integer] :amount (default to 20)
|
|
967
|
+
# @option opts [String] :cursor
|
|
968
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
969
|
+
def instagram_get_user_posts_with_http_info(username, opts = {})
|
|
970
|
+
if @api_client.config.debugging
|
|
971
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_user_posts ...'
|
|
972
|
+
end
|
|
973
|
+
# verify the required parameter 'username' is set
|
|
974
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
975
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_user_posts"
|
|
976
|
+
end
|
|
977
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
978
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_user_posts, must be smaller than or equal to 100.'
|
|
979
|
+
end
|
|
980
|
+
|
|
981
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
982
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_user_posts, must be greater than or equal to 1.'
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
# resource path
|
|
986
|
+
local_var_path = '/v1/instagram/users/{username}/posts'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
987
|
+
|
|
988
|
+
# query parameters
|
|
989
|
+
query_params = opts[:query_params] || {}
|
|
990
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
991
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
992
|
+
|
|
993
|
+
# header parameters
|
|
994
|
+
header_params = opts[:header_params] || {}
|
|
995
|
+
# HTTP header 'Accept' (if needed)
|
|
996
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
997
|
+
|
|
998
|
+
# form parameters
|
|
999
|
+
form_params = opts[:form_params] || {}
|
|
1000
|
+
|
|
1001
|
+
# http body (model)
|
|
1002
|
+
post_body = opts[:debug_body]
|
|
1003
|
+
|
|
1004
|
+
# return_type
|
|
1005
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1006
|
+
|
|
1007
|
+
# auth_names
|
|
1008
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1009
|
+
|
|
1010
|
+
new_options = opts.merge(
|
|
1011
|
+
:operation => :"InstagramApi.instagram_get_user_posts",
|
|
1012
|
+
:header_params => header_params,
|
|
1013
|
+
:query_params => query_params,
|
|
1014
|
+
:form_params => form_params,
|
|
1015
|
+
:body => post_body,
|
|
1016
|
+
:auth_names => auth_names,
|
|
1017
|
+
:return_type => return_type
|
|
1018
|
+
)
|
|
1019
|
+
|
|
1020
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1021
|
+
if @api_client.config.debugging
|
|
1022
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_user_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1023
|
+
end
|
|
1024
|
+
return data, status_code, headers
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
# Get user reels
|
|
1028
|
+
# @param username [String]
|
|
1029
|
+
# @param [Hash] opts the optional parameters
|
|
1030
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1031
|
+
# @option opts [String] :cursor
|
|
1032
|
+
# @return [Object]
|
|
1033
|
+
def instagram_get_user_reels(username, opts = {})
|
|
1034
|
+
data, _status_code, _headers = instagram_get_user_reels_with_http_info(username, opts)
|
|
1035
|
+
data
|
|
1036
|
+
end
|
|
1037
|
+
|
|
1038
|
+
# Get user reels
|
|
1039
|
+
# @param username [String]
|
|
1040
|
+
# @param [Hash] opts the optional parameters
|
|
1041
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1042
|
+
# @option opts [String] :cursor
|
|
1043
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1044
|
+
def instagram_get_user_reels_with_http_info(username, opts = {})
|
|
1045
|
+
if @api_client.config.debugging
|
|
1046
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_get_user_reels ...'
|
|
1047
|
+
end
|
|
1048
|
+
# verify the required parameter 'username' is set
|
|
1049
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
1050
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_get_user_reels"
|
|
1051
|
+
end
|
|
1052
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
1053
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_user_reels, must be smaller than or equal to 100.'
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
1057
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_get_user_reels, must be greater than or equal to 1.'
|
|
1058
|
+
end
|
|
1059
|
+
|
|
1060
|
+
# resource path
|
|
1061
|
+
local_var_path = '/v1/instagram/users/{username}/reels'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
1062
|
+
|
|
1063
|
+
# query parameters
|
|
1064
|
+
query_params = opts[:query_params] || {}
|
|
1065
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
1066
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1067
|
+
|
|
1068
|
+
# header parameters
|
|
1069
|
+
header_params = opts[:header_params] || {}
|
|
1070
|
+
# HTTP header 'Accept' (if needed)
|
|
1071
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1072
|
+
|
|
1073
|
+
# form parameters
|
|
1074
|
+
form_params = opts[:form_params] || {}
|
|
1075
|
+
|
|
1076
|
+
# http body (model)
|
|
1077
|
+
post_body = opts[:debug_body]
|
|
1078
|
+
|
|
1079
|
+
# return_type
|
|
1080
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1081
|
+
|
|
1082
|
+
# auth_names
|
|
1083
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1084
|
+
|
|
1085
|
+
new_options = opts.merge(
|
|
1086
|
+
:operation => :"InstagramApi.instagram_get_user_reels",
|
|
1087
|
+
:header_params => header_params,
|
|
1088
|
+
:query_params => query_params,
|
|
1089
|
+
:form_params => form_params,
|
|
1090
|
+
:body => post_body,
|
|
1091
|
+
:auth_names => auth_names,
|
|
1092
|
+
:return_type => return_type
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1096
|
+
if @api_client.config.debugging
|
|
1097
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_get_user_reels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1098
|
+
end
|
|
1099
|
+
return data, status_code, headers
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1102
|
+
# Health
|
|
1103
|
+
# @param [Hash] opts the optional parameters
|
|
1104
|
+
# @return [Object]
|
|
1105
|
+
def instagram_health(opts = {})
|
|
1106
|
+
data, _status_code, _headers = instagram_health_with_http_info(opts)
|
|
1107
|
+
data
|
|
1108
|
+
end
|
|
1109
|
+
|
|
1110
|
+
# Health
|
|
1111
|
+
# @param [Hash] opts the optional parameters
|
|
1112
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1113
|
+
def instagram_health_with_http_info(opts = {})
|
|
1114
|
+
if @api_client.config.debugging
|
|
1115
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_health ...'
|
|
1116
|
+
end
|
|
1117
|
+
# resource path
|
|
1118
|
+
local_var_path = '/v1/instagram/health'
|
|
1119
|
+
|
|
1120
|
+
# query parameters
|
|
1121
|
+
query_params = opts[:query_params] || {}
|
|
1122
|
+
|
|
1123
|
+
# header parameters
|
|
1124
|
+
header_params = opts[:header_params] || {}
|
|
1125
|
+
# HTTP header 'Accept' (if needed)
|
|
1126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1127
|
+
|
|
1128
|
+
# form parameters
|
|
1129
|
+
form_params = opts[:form_params] || {}
|
|
1130
|
+
|
|
1131
|
+
# http body (model)
|
|
1132
|
+
post_body = opts[:debug_body]
|
|
1133
|
+
|
|
1134
|
+
# return_type
|
|
1135
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1136
|
+
|
|
1137
|
+
# auth_names
|
|
1138
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1139
|
+
|
|
1140
|
+
new_options = opts.merge(
|
|
1141
|
+
:operation => :"InstagramApi.instagram_health",
|
|
1142
|
+
:header_params => header_params,
|
|
1143
|
+
:query_params => query_params,
|
|
1144
|
+
:form_params => form_params,
|
|
1145
|
+
:body => post_body,
|
|
1146
|
+
:auth_names => auth_names,
|
|
1147
|
+
:return_type => return_type
|
|
1148
|
+
)
|
|
1149
|
+
|
|
1150
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1151
|
+
if @api_client.config.debugging
|
|
1152
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1153
|
+
end
|
|
1154
|
+
return data, status_code, headers
|
|
1155
|
+
end
|
|
1156
|
+
|
|
1157
|
+
# Health
|
|
1158
|
+
# @param [Hash] opts the optional parameters
|
|
1159
|
+
# @return [Object]
|
|
1160
|
+
def instagram_health_head(opts = {})
|
|
1161
|
+
data, _status_code, _headers = instagram_health_head_with_http_info(opts)
|
|
1162
|
+
data
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
# Health
|
|
1166
|
+
# @param [Hash] opts the optional parameters
|
|
1167
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1168
|
+
def instagram_health_head_with_http_info(opts = {})
|
|
1169
|
+
if @api_client.config.debugging
|
|
1170
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_health_head ...'
|
|
1171
|
+
end
|
|
1172
|
+
# resource path
|
|
1173
|
+
local_var_path = '/v1/instagram/health'
|
|
1174
|
+
|
|
1175
|
+
# query parameters
|
|
1176
|
+
query_params = opts[:query_params] || {}
|
|
1177
|
+
|
|
1178
|
+
# header parameters
|
|
1179
|
+
header_params = opts[:header_params] || {}
|
|
1180
|
+
# HTTP header 'Accept' (if needed)
|
|
1181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1182
|
+
|
|
1183
|
+
# form parameters
|
|
1184
|
+
form_params = opts[:form_params] || {}
|
|
1185
|
+
|
|
1186
|
+
# http body (model)
|
|
1187
|
+
post_body = opts[:debug_body]
|
|
1188
|
+
|
|
1189
|
+
# return_type
|
|
1190
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1191
|
+
|
|
1192
|
+
# auth_names
|
|
1193
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1194
|
+
|
|
1195
|
+
new_options = opts.merge(
|
|
1196
|
+
:operation => :"InstagramApi.instagram_health_head",
|
|
1197
|
+
:header_params => header_params,
|
|
1198
|
+
:query_params => query_params,
|
|
1199
|
+
:form_params => form_params,
|
|
1200
|
+
:body => post_body,
|
|
1201
|
+
:auth_names => auth_names,
|
|
1202
|
+
:return_type => return_type
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
1206
|
+
if @api_client.config.debugging
|
|
1207
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_health_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1208
|
+
end
|
|
1209
|
+
return data, status_code, headers
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
# Recent hashtag posts
|
|
1213
|
+
# @param tag [String]
|
|
1214
|
+
# @param [Hash] opts the optional parameters
|
|
1215
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1216
|
+
# @option opts [String] :cursor
|
|
1217
|
+
# @return [Object]
|
|
1218
|
+
def instagram_recent_hashtag_posts(tag, opts = {})
|
|
1219
|
+
data, _status_code, _headers = instagram_recent_hashtag_posts_with_http_info(tag, opts)
|
|
1220
|
+
data
|
|
1221
|
+
end
|
|
1222
|
+
|
|
1223
|
+
# Recent hashtag posts
|
|
1224
|
+
# @param tag [String]
|
|
1225
|
+
# @param [Hash] opts the optional parameters
|
|
1226
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1227
|
+
# @option opts [String] :cursor
|
|
1228
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1229
|
+
def instagram_recent_hashtag_posts_with_http_info(tag, opts = {})
|
|
1230
|
+
if @api_client.config.debugging
|
|
1231
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_recent_hashtag_posts ...'
|
|
1232
|
+
end
|
|
1233
|
+
# verify the required parameter 'tag' is set
|
|
1234
|
+
if @api_client.config.client_side_validation && tag.nil?
|
|
1235
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling InstagramApi.instagram_recent_hashtag_posts"
|
|
1236
|
+
end
|
|
1237
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
1238
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_recent_hashtag_posts, must be smaller than or equal to 100.'
|
|
1239
|
+
end
|
|
1240
|
+
|
|
1241
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
1242
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_recent_hashtag_posts, must be greater than or equal to 1.'
|
|
1243
|
+
end
|
|
1244
|
+
|
|
1245
|
+
# resource path
|
|
1246
|
+
local_var_path = '/v1/instagram/hashtags/{tag}/recent'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
|
1247
|
+
|
|
1248
|
+
# query parameters
|
|
1249
|
+
query_params = opts[:query_params] || {}
|
|
1250
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
1251
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1252
|
+
|
|
1253
|
+
# header parameters
|
|
1254
|
+
header_params = opts[:header_params] || {}
|
|
1255
|
+
# HTTP header 'Accept' (if needed)
|
|
1256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1257
|
+
|
|
1258
|
+
# form parameters
|
|
1259
|
+
form_params = opts[:form_params] || {}
|
|
1260
|
+
|
|
1261
|
+
# http body (model)
|
|
1262
|
+
post_body = opts[:debug_body]
|
|
1263
|
+
|
|
1264
|
+
# return_type
|
|
1265
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1266
|
+
|
|
1267
|
+
# auth_names
|
|
1268
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1269
|
+
|
|
1270
|
+
new_options = opts.merge(
|
|
1271
|
+
:operation => :"InstagramApi.instagram_recent_hashtag_posts",
|
|
1272
|
+
:header_params => header_params,
|
|
1273
|
+
:query_params => query_params,
|
|
1274
|
+
:form_params => form_params,
|
|
1275
|
+
:body => post_body,
|
|
1276
|
+
:auth_names => auth_names,
|
|
1277
|
+
:return_type => return_type
|
|
1278
|
+
)
|
|
1279
|
+
|
|
1280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1281
|
+
if @api_client.config.debugging
|
|
1282
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_recent_hashtag_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1283
|
+
end
|
|
1284
|
+
return data, status_code, headers
|
|
1285
|
+
end
|
|
1286
|
+
|
|
1287
|
+
# Related profiles
|
|
1288
|
+
# @param username [String]
|
|
1289
|
+
# @param [Hash] opts the optional parameters
|
|
1290
|
+
# @return [Object]
|
|
1291
|
+
def instagram_related_profiles(username, opts = {})
|
|
1292
|
+
data, _status_code, _headers = instagram_related_profiles_with_http_info(username, opts)
|
|
1293
|
+
data
|
|
1294
|
+
end
|
|
1295
|
+
|
|
1296
|
+
# Related profiles
|
|
1297
|
+
# @param username [String]
|
|
1298
|
+
# @param [Hash] opts the optional parameters
|
|
1299
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1300
|
+
def instagram_related_profiles_with_http_info(username, opts = {})
|
|
1301
|
+
if @api_client.config.debugging
|
|
1302
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_related_profiles ...'
|
|
1303
|
+
end
|
|
1304
|
+
# verify the required parameter 'username' is set
|
|
1305
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
1306
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling InstagramApi.instagram_related_profiles"
|
|
1307
|
+
end
|
|
1308
|
+
# resource path
|
|
1309
|
+
local_var_path = '/v1/instagram/users/{username}/related'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
1310
|
+
|
|
1311
|
+
# query parameters
|
|
1312
|
+
query_params = opts[:query_params] || {}
|
|
1313
|
+
|
|
1314
|
+
# header parameters
|
|
1315
|
+
header_params = opts[:header_params] || {}
|
|
1316
|
+
# HTTP header 'Accept' (if needed)
|
|
1317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1318
|
+
|
|
1319
|
+
# form parameters
|
|
1320
|
+
form_params = opts[:form_params] || {}
|
|
1321
|
+
|
|
1322
|
+
# http body (model)
|
|
1323
|
+
post_body = opts[:debug_body]
|
|
1324
|
+
|
|
1325
|
+
# return_type
|
|
1326
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1327
|
+
|
|
1328
|
+
# auth_names
|
|
1329
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1330
|
+
|
|
1331
|
+
new_options = opts.merge(
|
|
1332
|
+
:operation => :"InstagramApi.instagram_related_profiles",
|
|
1333
|
+
:header_params => header_params,
|
|
1334
|
+
:query_params => query_params,
|
|
1335
|
+
:form_params => form_params,
|
|
1336
|
+
:body => post_body,
|
|
1337
|
+
:auth_names => auth_names,
|
|
1338
|
+
:return_type => return_type
|
|
1339
|
+
)
|
|
1340
|
+
|
|
1341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1342
|
+
if @api_client.config.debugging
|
|
1343
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_related_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1344
|
+
end
|
|
1345
|
+
return data, status_code, headers
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
# Search hashtags
|
|
1349
|
+
# @param query [String]
|
|
1350
|
+
# @param [Hash] opts the optional parameters
|
|
1351
|
+
# @return [Object]
|
|
1352
|
+
def instagram_search_hashtags(query, opts = {})
|
|
1353
|
+
data, _status_code, _headers = instagram_search_hashtags_with_http_info(query, opts)
|
|
1354
|
+
data
|
|
1355
|
+
end
|
|
1356
|
+
|
|
1357
|
+
# Search hashtags
|
|
1358
|
+
# @param query [String]
|
|
1359
|
+
# @param [Hash] opts the optional parameters
|
|
1360
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1361
|
+
def instagram_search_hashtags_with_http_info(query, opts = {})
|
|
1362
|
+
if @api_client.config.debugging
|
|
1363
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_search_hashtags ...'
|
|
1364
|
+
end
|
|
1365
|
+
# verify the required parameter 'query' is set
|
|
1366
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
1367
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling InstagramApi.instagram_search_hashtags"
|
|
1368
|
+
end
|
|
1369
|
+
if @api_client.config.client_side_validation && query.to_s.length < 1
|
|
1370
|
+
fail ArgumentError, 'invalid value for "query" when calling InstagramApi.instagram_search_hashtags, the character length must be great than or equal to 1.'
|
|
1371
|
+
end
|
|
1372
|
+
|
|
1373
|
+
# resource path
|
|
1374
|
+
local_var_path = '/v1/instagram/search/hashtags'
|
|
1375
|
+
|
|
1376
|
+
# query parameters
|
|
1377
|
+
query_params = opts[:query_params] || {}
|
|
1378
|
+
query_params[:'query'] = query
|
|
1379
|
+
|
|
1380
|
+
# header parameters
|
|
1381
|
+
header_params = opts[:header_params] || {}
|
|
1382
|
+
# HTTP header 'Accept' (if needed)
|
|
1383
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1384
|
+
|
|
1385
|
+
# form parameters
|
|
1386
|
+
form_params = opts[:form_params] || {}
|
|
1387
|
+
|
|
1388
|
+
# http body (model)
|
|
1389
|
+
post_body = opts[:debug_body]
|
|
1390
|
+
|
|
1391
|
+
# return_type
|
|
1392
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1393
|
+
|
|
1394
|
+
# auth_names
|
|
1395
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1396
|
+
|
|
1397
|
+
new_options = opts.merge(
|
|
1398
|
+
:operation => :"InstagramApi.instagram_search_hashtags",
|
|
1399
|
+
:header_params => header_params,
|
|
1400
|
+
:query_params => query_params,
|
|
1401
|
+
:form_params => form_params,
|
|
1402
|
+
:body => post_body,
|
|
1403
|
+
:auth_names => auth_names,
|
|
1404
|
+
:return_type => return_type
|
|
1405
|
+
)
|
|
1406
|
+
|
|
1407
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1408
|
+
if @api_client.config.debugging
|
|
1409
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_search_hashtags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1410
|
+
end
|
|
1411
|
+
return data, status_code, headers
|
|
1412
|
+
end
|
|
1413
|
+
|
|
1414
|
+
# Search users
|
|
1415
|
+
# @param query [String]
|
|
1416
|
+
# @param [Hash] opts the optional parameters
|
|
1417
|
+
# @return [Object]
|
|
1418
|
+
def instagram_search_users(query, opts = {})
|
|
1419
|
+
data, _status_code, _headers = instagram_search_users_with_http_info(query, opts)
|
|
1420
|
+
data
|
|
1421
|
+
end
|
|
1422
|
+
|
|
1423
|
+
# Search users
|
|
1424
|
+
# @param query [String]
|
|
1425
|
+
# @param [Hash] opts the optional parameters
|
|
1426
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1427
|
+
def instagram_search_users_with_http_info(query, opts = {})
|
|
1428
|
+
if @api_client.config.debugging
|
|
1429
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_search_users ...'
|
|
1430
|
+
end
|
|
1431
|
+
# verify the required parameter 'query' is set
|
|
1432
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
1433
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling InstagramApi.instagram_search_users"
|
|
1434
|
+
end
|
|
1435
|
+
if @api_client.config.client_side_validation && query.to_s.length < 1
|
|
1436
|
+
fail ArgumentError, 'invalid value for "query" when calling InstagramApi.instagram_search_users, the character length must be great than or equal to 1.'
|
|
1437
|
+
end
|
|
1438
|
+
|
|
1439
|
+
# resource path
|
|
1440
|
+
local_var_path = '/v1/instagram/search/users'
|
|
1441
|
+
|
|
1442
|
+
# query parameters
|
|
1443
|
+
query_params = opts[:query_params] || {}
|
|
1444
|
+
query_params[:'query'] = query
|
|
1445
|
+
|
|
1446
|
+
# header parameters
|
|
1447
|
+
header_params = opts[:header_params] || {}
|
|
1448
|
+
# HTTP header 'Accept' (if needed)
|
|
1449
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1450
|
+
|
|
1451
|
+
# form parameters
|
|
1452
|
+
form_params = opts[:form_params] || {}
|
|
1453
|
+
|
|
1454
|
+
# http body (model)
|
|
1455
|
+
post_body = opts[:debug_body]
|
|
1456
|
+
|
|
1457
|
+
# return_type
|
|
1458
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1459
|
+
|
|
1460
|
+
# auth_names
|
|
1461
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1462
|
+
|
|
1463
|
+
new_options = opts.merge(
|
|
1464
|
+
:operation => :"InstagramApi.instagram_search_users",
|
|
1465
|
+
:header_params => header_params,
|
|
1466
|
+
:query_params => query_params,
|
|
1467
|
+
:form_params => form_params,
|
|
1468
|
+
:body => post_body,
|
|
1469
|
+
:auth_names => auth_names,
|
|
1470
|
+
:return_type => return_type
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1473
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1474
|
+
if @api_client.config.debugging
|
|
1475
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1476
|
+
end
|
|
1477
|
+
return data, status_code, headers
|
|
1478
|
+
end
|
|
1479
|
+
|
|
1480
|
+
# Top hashtag posts
|
|
1481
|
+
# @param tag [String]
|
|
1482
|
+
# @param [Hash] opts the optional parameters
|
|
1483
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1484
|
+
# @option opts [String] :cursor
|
|
1485
|
+
# @return [Object]
|
|
1486
|
+
def instagram_top_hashtag_posts(tag, opts = {})
|
|
1487
|
+
data, _status_code, _headers = instagram_top_hashtag_posts_with_http_info(tag, opts)
|
|
1488
|
+
data
|
|
1489
|
+
end
|
|
1490
|
+
|
|
1491
|
+
# Top hashtag posts
|
|
1492
|
+
# @param tag [String]
|
|
1493
|
+
# @param [Hash] opts the optional parameters
|
|
1494
|
+
# @option opts [Integer] :amount (default to 20)
|
|
1495
|
+
# @option opts [String] :cursor
|
|
1496
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1497
|
+
def instagram_top_hashtag_posts_with_http_info(tag, opts = {})
|
|
1498
|
+
if @api_client.config.debugging
|
|
1499
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.instagram_top_hashtag_posts ...'
|
|
1500
|
+
end
|
|
1501
|
+
# verify the required parameter 'tag' is set
|
|
1502
|
+
if @api_client.config.client_side_validation && tag.nil?
|
|
1503
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling InstagramApi.instagram_top_hashtag_posts"
|
|
1504
|
+
end
|
|
1505
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] > 100
|
|
1506
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_top_hashtag_posts, must be smaller than or equal to 100.'
|
|
1507
|
+
end
|
|
1508
|
+
|
|
1509
|
+
if @api_client.config.client_side_validation && !opts[:'amount'].nil? && opts[:'amount'] < 1
|
|
1510
|
+
fail ArgumentError, 'invalid value for "opts[:"amount"]" when calling InstagramApi.instagram_top_hashtag_posts, must be greater than or equal to 1.'
|
|
1511
|
+
end
|
|
1512
|
+
|
|
1513
|
+
# resource path
|
|
1514
|
+
local_var_path = '/v1/instagram/hashtags/{tag}/top'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
|
1515
|
+
|
|
1516
|
+
# query parameters
|
|
1517
|
+
query_params = opts[:query_params] || {}
|
|
1518
|
+
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
|
1519
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1520
|
+
|
|
1521
|
+
# header parameters
|
|
1522
|
+
header_params = opts[:header_params] || {}
|
|
1523
|
+
# HTTP header 'Accept' (if needed)
|
|
1524
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1525
|
+
|
|
1526
|
+
# form parameters
|
|
1527
|
+
form_params = opts[:form_params] || {}
|
|
1528
|
+
|
|
1529
|
+
# http body (model)
|
|
1530
|
+
post_body = opts[:debug_body]
|
|
1531
|
+
|
|
1532
|
+
# return_type
|
|
1533
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1534
|
+
|
|
1535
|
+
# auth_names
|
|
1536
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1537
|
+
|
|
1538
|
+
new_options = opts.merge(
|
|
1539
|
+
:operation => :"InstagramApi.instagram_top_hashtag_posts",
|
|
1540
|
+
:header_params => header_params,
|
|
1541
|
+
:query_params => query_params,
|
|
1542
|
+
:form_params => form_params,
|
|
1543
|
+
:body => post_body,
|
|
1544
|
+
:auth_names => auth_names,
|
|
1545
|
+
:return_type => return_type
|
|
1546
|
+
)
|
|
1547
|
+
|
|
1548
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1549
|
+
if @api_client.config.debugging
|
|
1550
|
+
@api_client.config.logger.debug "API called: InstagramApi#instagram_top_hashtag_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1551
|
+
end
|
|
1552
|
+
return data, status_code, headers
|
|
1553
|
+
end
|
|
1554
|
+
end
|
|
1555
|
+
end
|