Class: ScrapeBadger::RedditApi
- Inherits:
-
Object
- Object
- ScrapeBadger::RedditApi
- Defined in:
- lib/scrapebadger/api/reddit_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ RedditApi
constructor
A new instance of RedditApi.
-
#reddit_get_cross_posts(post_id, opts = {}) ⇒ Object
Get cross-posts Get cross-posts and duplicates of a Reddit post.
-
#reddit_get_cross_posts_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get cross-posts Get cross-posts and duplicates of a Reddit post.
-
#reddit_get_post_comments(post_id, opts = {}) ⇒ Object
Get post comments Get comment tree for a Reddit post.
-
#reddit_get_post_comments_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get post comments Get comment tree for a Reddit post.
-
#reddit_get_post_detail(post_id, opts = {}) ⇒ Object
Get post detail Get detailed information about a Reddit post.
-
#reddit_get_post_detail_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get post detail Get detailed information about a Reddit post.
-
#reddit_get_posts_by_domain(domain, opts = {}) ⇒ Object
Get posts by domain Get Reddit posts linking to a specific domain.
-
#reddit_get_posts_by_domain_with_http_info(domain, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get posts by domain Get Reddit posts linking to a specific domain.
-
#reddit_get_subreddit_info(subreddit, opts = {}) ⇒ Object
Get subreddit info Get detailed information about a subreddit.
-
#reddit_get_subreddit_info_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit info Get detailed information about a subreddit.
-
#reddit_get_subreddit_posts(subreddit, opts = {}) ⇒ Object
Get subreddit posts Get posts from a subreddit with sorting options.
-
#reddit_get_subreddit_posts_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit posts Get posts from a subreddit with sorting options.
-
#reddit_get_subreddit_rules(subreddit, opts = {}) ⇒ Object
Get subreddit rules Get the rules of a subreddit.
-
#reddit_get_subreddit_rules_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit rules Get the rules of a subreddit.
-
#reddit_get_trending_posts(opts = {}) ⇒ Object
Get trending posts Get trending posts from Reddit's front page.
-
#reddit_get_trending_posts_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get trending posts Get trending posts from Reddit's front page.
-
#reddit_get_user_profile(username, opts = {}) ⇒ Object
Get user profile Get a Reddit user's profile.
-
#reddit_get_user_profile_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user profile Get a Reddit user's profile.
-
#reddit_get_user_s_comments(username, opts = {}) ⇒ Object
Get user's comments Get comments by a Reddit user.
-
#reddit_get_user_s_comments_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's comments Get comments by a Reddit user.
-
#reddit_get_user_s_moderated_subreddits(username, opts = {}) ⇒ Object
Get user's moderated subreddits Get subreddits moderated by a user.
-
#reddit_get_user_s_moderated_subreddits_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's moderated subreddits Get subreddits moderated by a user.
-
#reddit_get_user_s_posts(username, opts = {}) ⇒ Object
Get user's posts Get posts submitted by a Reddit user.
-
#reddit_get_user_s_posts_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's posts Get posts submitted by a Reddit user.
-
#reddit_get_user_s_trophies(username, opts = {}) ⇒ Object
Get user's trophies Get a user's trophy case.
-
#reddit_get_user_s_trophies_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's trophies Get a user's trophy case.
-
#reddit_get_wiki_page_content(subreddit, page, opts = {}) ⇒ Object
Get wiki page content Get the content of a specific wiki page.
-
#reddit_get_wiki_page_content_with_http_info(subreddit, page, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get wiki page content Get the content of a specific wiki page.
-
#reddit_list_wiki_pages(subreddit, opts = {}) ⇒ Object
List wiki pages List all wiki pages in a subreddit.
-
#reddit_list_wiki_pages_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
List wiki pages List all wiki pages in a subreddit.
-
#reddit_new_subreddits(opts = {}) ⇒ Object
New subreddits Get recently created subreddits.
-
#reddit_new_subreddits_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
New subreddits Get recently created subreddits.
-
#reddit_popular_subreddits(opts = {}) ⇒ Object
Popular subreddits Get popular subreddits by subscriber count.
-
#reddit_popular_subreddits_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Popular subreddits Get popular subreddits by subscriber count.
-
#reddit_reddit_scraper_health_check(opts = {}) ⇒ Object
Reddit scraper health check.
-
#reddit_reddit_scraper_health_check_head(opts = {}) ⇒ Object
Reddit scraper health check.
-
#reddit_reddit_scraper_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Reddit scraper health check.
-
#reddit_reddit_scraper_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Reddit scraper health check.
-
#reddit_search_reddit_posts(q, opts = {}) ⇒ Object
Search Reddit posts Search Reddit posts globally or within a subreddit.
-
#reddit_search_reddit_posts_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search Reddit posts Search Reddit posts globally or within a subreddit.
-
#reddit_search_subreddits(q, opts = {}) ⇒ Object
Search subreddits Search for subreddits by keyword.
-
#reddit_search_subreddits_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search subreddits Search for subreddits by keyword.
-
#reddit_search_users(q, opts = {}) ⇒ Object
Search users Search for Reddit users.
-
#reddit_search_users_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search users Search for Reddit users.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#reddit_get_cross_posts(post_id, opts = {}) ⇒ Object
Get cross-posts Get cross-posts and duplicates of a Reddit post.
29 30 31 32 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 29 def reddit_get_cross_posts(post_id, opts = {}) data, _status_code, _headers = reddit_get_cross_posts_with_http_info(post_id, opts) data end |
#reddit_get_cross_posts_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get cross-posts Get cross-posts and duplicates of a Reddit post.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 41 def reddit_get_cross_posts_with_http_info(post_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_cross_posts ...' end # verify the required parameter 'post_id' is set if @api_client.config.client_side_validation && post_id.nil? fail ArgumentError, "Missing the required parameter 'post_id' when calling RedditApi.reddit_get_cross_posts" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_cross_posts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_cross_posts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/posts/{post_id}/duplicates'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_cross_posts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_cross_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_post_comments(post_id, opts = {}) ⇒ Object
Get post comments Get comment tree for a Reddit post.
107 108 109 110 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 107 def reddit_get_post_comments(post_id, opts = {}) data, _status_code, _headers = reddit_get_post_comments_with_http_info(post_id, opts) data end |
#reddit_get_post_comments_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get post comments Get comment tree for a Reddit post.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 120 def reddit_get_post_comments_with_http_info(post_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_post_comments ...' end # verify the required parameter 'post_id' is set if @api_client.config.client_side_validation && post_id.nil? fail ArgumentError, "Missing the required parameter 'post_id' when calling RedditApi.reddit_get_post_comments" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_post_comments, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_post_comments, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling RedditApi.reddit_get_post_comments, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling RedditApi.reddit_get_post_comments, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/reddit/posts/{post_id}/comments'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_post_comments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_post_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_post_detail(post_id, opts = {}) ⇒ Object
Get post detail Get detailed information about a Reddit post.
192 193 194 195 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 192 def reddit_get_post_detail(post_id, opts = {}) data, _status_code, _headers = reddit_get_post_detail_with_http_info(post_id, opts) data end |
#reddit_get_post_detail_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get post detail Get detailed information about a Reddit post.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 202 def reddit_get_post_detail_with_http_info(post_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_post_detail ...' end # verify the required parameter 'post_id' is set if @api_client.config.client_side_validation && post_id.nil? fail ArgumentError, "Missing the required parameter 'post_id' when calling RedditApi.reddit_get_post_detail" end # resource path local_var_path = '/v1/reddit/posts/{post_id}'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_post_detail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_post_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_posts_by_domain(domain, opts = {}) ⇒ Object
Get posts by domain Get Reddit posts linking to a specific domain.
259 260 261 262 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 259 def reddit_get_posts_by_domain(domain, opts = {}) data, _status_code, _headers = reddit_get_posts_by_domain_with_http_info(domain, opts) data end |
#reddit_get_posts_by_domain_with_http_info(domain, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get posts by domain Get Reddit posts linking to a specific domain.
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 273 def reddit_get_posts_by_domain_with_http_info(domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_posts_by_domain ...' end # verify the required parameter 'domain' is set if @api_client.config.client_side_validation && domain.nil? fail ArgumentError, "Missing the required parameter 'domain' when calling RedditApi.reddit_get_posts_by_domain" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_posts_by_domain, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_posts_by_domain, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/domains/{domain}/posts'.sub('{' + 'domain' + '}', CGI.escape(domain.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_posts_by_domain", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_posts_by_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_subreddit_info(subreddit, opts = {}) ⇒ Object
Get subreddit info Get detailed information about a subreddit.
338 339 340 341 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 338 def reddit_get_subreddit_info(subreddit, opts = {}) data, _status_code, _headers = reddit_get_subreddit_info_with_http_info(subreddit, opts) data end |
#reddit_get_subreddit_info_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit info Get detailed information about a subreddit.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 348 def reddit_get_subreddit_info_with_http_info(subreddit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_subreddit_info ...' end # verify the required parameter 'subreddit' is set if @api_client.config.client_side_validation && subreddit.nil? fail ArgumentError, "Missing the required parameter 'subreddit' when calling RedditApi.reddit_get_subreddit_info" end # resource path local_var_path = '/v1/reddit/subreddits/{subreddit}'.sub('{' + 'subreddit' + '}', CGI.escape(subreddit.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_subreddit_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_subreddit_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_subreddit_posts(subreddit, opts = {}) ⇒ Object
Get subreddit posts Get posts from a subreddit with sorting options.
405 406 407 408 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 405 def reddit_get_subreddit_posts(subreddit, opts = {}) data, _status_code, _headers = reddit_get_subreddit_posts_with_http_info(subreddit, opts) data end |
#reddit_get_subreddit_posts_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit posts Get posts from a subreddit with sorting options.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 419 def reddit_get_subreddit_posts_with_http_info(subreddit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_subreddit_posts ...' end # verify the required parameter 'subreddit' is set if @api_client.config.client_side_validation && subreddit.nil? fail ArgumentError, "Missing the required parameter 'subreddit' when calling RedditApi.reddit_get_subreddit_posts" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_subreddit_posts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_subreddit_posts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/subreddits/{subreddit}/posts'.sub('{' + 'subreddit' + '}', CGI.escape(subreddit.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_subreddit_posts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_subreddit_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_subreddit_rules(subreddit, opts = {}) ⇒ Object
Get subreddit rules Get the rules of a subreddit.
484 485 486 487 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 484 def reddit_get_subreddit_rules(subreddit, opts = {}) data, _status_code, _headers = reddit_get_subreddit_rules_with_http_info(subreddit, opts) data end |
#reddit_get_subreddit_rules_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get subreddit rules Get the rules of a subreddit.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 494 def reddit_get_subreddit_rules_with_http_info(subreddit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_subreddit_rules ...' end # verify the required parameter 'subreddit' is set if @api_client.config.client_side_validation && subreddit.nil? fail ArgumentError, "Missing the required parameter 'subreddit' when calling RedditApi.reddit_get_subreddit_rules" end # resource path local_var_path = '/v1/reddit/subreddits/{subreddit}/rules'.sub('{' + 'subreddit' + '}', CGI.escape(subreddit.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_subreddit_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_subreddit_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_trending_posts(opts = {}) ⇒ Object
Get trending posts Get trending posts from Reddit's front page.
550 551 552 553 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 550 def reddit_get_trending_posts(opts = {}) data, _status_code, _headers = reddit_get_trending_posts_with_http_info(opts) data end |
#reddit_get_trending_posts_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get trending posts Get trending posts from Reddit's front page.
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 563 def reddit_get_trending_posts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_trending_posts ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_trending_posts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_trending_posts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/posts/trending' # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_trending_posts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_trending_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_user_profile(username, opts = {}) ⇒ Object
Get user profile Get a Reddit user's profile.
624 625 626 627 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 624 def reddit_get_user_profile(username, opts = {}) data, _status_code, _headers = reddit_get_user_profile_with_http_info(username, opts) data end |
#reddit_get_user_profile_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user profile Get a Reddit user's profile.
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 634 def reddit_get_user_profile_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_user_profile ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling RedditApi.reddit_get_user_profile" end # resource path local_var_path = '/v1/reddit/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_user_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_user_s_comments(username, opts = {}) ⇒ Object
Get user's comments Get comments by a Reddit user.
691 692 693 694 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 691 def reddit_get_user_s_comments(username, opts = {}) data, _status_code, _headers = reddit_get_user_s_comments_with_http_info(username, opts) data end |
#reddit_get_user_s_comments_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's comments Get comments by a Reddit user.
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 705 def reddit_get_user_s_comments_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_user_s_comments ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling RedditApi.reddit_get_user_s_comments" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_user_s_comments, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_user_s_comments, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/users/{username}/comments'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_user_s_comments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_user_s_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_user_s_moderated_subreddits(username, opts = {}) ⇒ Object
Get user's moderated subreddits Get subreddits moderated by a user.
770 771 772 773 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 770 def reddit_get_user_s_moderated_subreddits(username, opts = {}) data, _status_code, _headers = reddit_get_user_s_moderated_subreddits_with_http_info(username, opts) data end |
#reddit_get_user_s_moderated_subreddits_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's moderated subreddits Get subreddits moderated by a user.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 780 def reddit_get_user_s_moderated_subreddits_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_user_s_moderated_subreddits ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling RedditApi.reddit_get_user_s_moderated_subreddits" end # resource path local_var_path = '/v1/reddit/users/{username}/moderated'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_user_s_moderated_subreddits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_user_s_moderated_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_user_s_posts(username, opts = {}) ⇒ Object
Get user's posts Get posts submitted by a Reddit user.
837 838 839 840 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 837 def reddit_get_user_s_posts(username, opts = {}) data, _status_code, _headers = reddit_get_user_s_posts_with_http_info(username, opts) data end |
#reddit_get_user_s_posts_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's posts Get posts submitted by a Reddit user.
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 851 def reddit_get_user_s_posts_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_user_s_posts ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling RedditApi.reddit_get_user_s_posts" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_user_s_posts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_get_user_s_posts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/users/{username}/posts'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_user_s_posts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_user_s_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_user_s_trophies(username, opts = {}) ⇒ Object
Get user's trophies Get a user's trophy case.
916 917 918 919 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 916 def reddit_get_user_s_trophies(username, opts = {}) data, _status_code, _headers = reddit_get_user_s_trophies_with_http_info(username, opts) data end |
#reddit_get_user_s_trophies_with_http_info(username, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get user's trophies Get a user's trophy case.
926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 926 def reddit_get_user_s_trophies_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_user_s_trophies ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling RedditApi.reddit_get_user_s_trophies" end # resource path local_var_path = '/v1/reddit/users/{username}/trophies'.sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_user_s_trophies", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_user_s_trophies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_get_wiki_page_content(subreddit, page, opts = {}) ⇒ Object
Get wiki page content Get the content of a specific wiki page.
980 981 982 983 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 980 def reddit_get_wiki_page_content(subreddit, page, opts = {}) data, _status_code, _headers = reddit_get_wiki_page_content_with_http_info(subreddit, page, opts) data end |
#reddit_get_wiki_page_content_with_http_info(subreddit, page, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get wiki page content Get the content of a specific wiki page.
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 991 def reddit_get_wiki_page_content_with_http_info(subreddit, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_get_wiki_page_content ...' end # verify the required parameter 'subreddit' is set if @api_client.config.client_side_validation && subreddit.nil? fail ArgumentError, "Missing the required parameter 'subreddit' when calling RedditApi.reddit_get_wiki_page_content" end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling RedditApi.reddit_get_wiki_page_content" end # resource path local_var_path = '/v1/reddit/subreddits/{subreddit}/wiki/{page}'.sub('{' + 'subreddit' + '}', CGI.escape(subreddit.to_s)).sub('{' + 'page' + '}', CGI.escape(page.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_get_wiki_page_content", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_get_wiki_page_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_list_wiki_pages(subreddit, opts = {}) ⇒ Object
List wiki pages List all wiki pages in a subreddit.
1048 1049 1050 1051 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1048 def reddit_list_wiki_pages(subreddit, opts = {}) data, _status_code, _headers = reddit_list_wiki_pages_with_http_info(subreddit, opts) data end |
#reddit_list_wiki_pages_with_http_info(subreddit, opts = {}) ⇒ Array<(Object, Integer, Hash)>
List wiki pages List all wiki pages in a subreddit.
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1058 def reddit_list_wiki_pages_with_http_info(subreddit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_list_wiki_pages ...' end # verify the required parameter 'subreddit' is set if @api_client.config.client_side_validation && subreddit.nil? fail ArgumentError, "Missing the required parameter 'subreddit' when calling RedditApi.reddit_list_wiki_pages" end # resource path local_var_path = '/v1/reddit/subreddits/{subreddit}/wiki'.sub('{' + 'subreddit' + '}', CGI.escape(subreddit.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_list_wiki_pages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_list_wiki_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_new_subreddits(opts = {}) ⇒ Object
New subreddits Get recently created subreddits.
1112 1113 1114 1115 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1112 def reddit_new_subreddits(opts = {}) data, _status_code, _headers = reddit_new_subreddits_with_http_info(opts) data end |
#reddit_new_subreddits_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
New subreddits Get recently created subreddits.
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1123 def reddit_new_subreddits_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_new_subreddits ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_new_subreddits, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_new_subreddits, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/subreddits/new' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_new_subreddits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_new_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_popular_subreddits(opts = {}) ⇒ Object
Popular subreddits Get popular subreddits by subscriber count.
1183 1184 1185 1186 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1183 def reddit_popular_subreddits(opts = {}) data, _status_code, _headers = reddit_popular_subreddits_with_http_info(opts) data end |
#reddit_popular_subreddits_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Popular subreddits Get popular subreddits by subscriber count.
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1194 def reddit_popular_subreddits_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_popular_subreddits ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_popular_subreddits, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_popular_subreddits, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/subreddits/popular' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_popular_subreddits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_popular_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_reddit_scraper_health_check(opts = {}) ⇒ Object
Reddit scraper health check
1251 1252 1253 1254 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1251 def reddit_reddit_scraper_health_check(opts = {}) data, _status_code, _headers = reddit_reddit_scraper_health_check_with_http_info(opts) data end |
#reddit_reddit_scraper_health_check_head(opts = {}) ⇒ Object
Reddit scraper health check
1306 1307 1308 1309 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1306 def reddit_reddit_scraper_health_check_head(opts = {}) data, _status_code, _headers = reddit_reddit_scraper_health_check_head_with_http_info(opts) data end |
#reddit_reddit_scraper_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Reddit scraper health check
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1314 def reddit_reddit_scraper_health_check_head_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_reddit_scraper_health_check_head ...' end # resource path local_var_path = '/v1/reddit/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_reddit_scraper_health_check_head", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_reddit_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_reddit_scraper_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Reddit scraper health check
1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1259 def reddit_reddit_scraper_health_check_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_reddit_scraper_health_check ...' end # resource path local_var_path = '/v1/reddit/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_reddit_scraper_health_check", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_reddit_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_search_reddit_posts(q, opts = {}) ⇒ Object
Search Reddit posts Search Reddit posts globally or within a subreddit.
1368 1369 1370 1371 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1368 def reddit_search_reddit_posts(q, opts = {}) data, _status_code, _headers = reddit_search_reddit_posts_with_http_info(q, opts) data end |
#reddit_search_reddit_posts_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search Reddit posts Search Reddit posts globally or within a subreddit.
1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1383 def reddit_search_reddit_posts_with_http_info(q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_search_reddit_posts ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling RedditApi.reddit_search_reddit_posts" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_reddit_posts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_reddit_posts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/search/posts' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q query_params[:'subreddit'] = opts[:'subreddit'] if !opts[:'subreddit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'t'] = opts[:'t'] if !opts[:'t'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_search_reddit_posts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_search_reddit_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_search_subreddits(q, opts = {}) ⇒ Object
Search subreddits Search for subreddits by keyword.
1452 1453 1454 1455 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1452 def reddit_search_subreddits(q, opts = {}) data, _status_code, _headers = reddit_search_subreddits_with_http_info(q, opts) data end |
#reddit_search_subreddits_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search subreddits Search for subreddits by keyword.
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1464 def reddit_search_subreddits_with_http_info(q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_search_subreddits ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling RedditApi.reddit_search_subreddits" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_subreddits, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_subreddits, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/search/subreddits' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_search_subreddits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_search_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reddit_search_users(q, opts = {}) ⇒ Object
Search users Search for Reddit users.
1530 1531 1532 1533 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1530 def reddit_search_users(q, opts = {}) data, _status_code, _headers = reddit_search_users_with_http_info(q, opts) data end |
#reddit_search_users_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search users Search for Reddit users.
1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 |
# File 'lib/scrapebadger/api/reddit_api.rb', line 1542 def reddit_search_users_with_http_info(q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RedditApi.reddit_search_users ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling RedditApi.reddit_search_users" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_users, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedditApi.reddit_search_users, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/reddit/search/users' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"RedditApi.reddit_search_users", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RedditApi#reddit_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |