All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| reddit_feed_home_get | GET /reddit/feed/home | Browse Reddit's anonymous home feed |
| reddit_feed_news_get | GET /reddit/feed/news | Browse Reddit's news feed |
| reddit_feed_popular_get | GET /reddit/feed/popular | Browse Reddit's popular feed |
| reddit_posts_id_comments_get | GET /reddit/posts/{id}/comments | List Reddit comments on a post |
| reddit_posts_id_get | GET /reddit/posts/{id} | Get a Reddit post by id |
| reddit_subreddits_name_get | GET /reddit/subreddits/{name} | Get a Reddit subreddit by name |
| reddit_trending_searches_get | GET /reddit/trending-searches | List Reddit's current trending search queries |
| reddit_users_username_comments_get | GET /reddit/users/{username}/comments | List Reddit comments authored by a user |
| reddit_users_username_get | GET /reddit/users/{username} | Get a Reddit user profile by username |
| reddit_users_username_posts_get | GET /reddit/users/{username}/posts | List Reddit posts authored by a user |
reddit_feed_home_get(opts)
Browse Reddit's anonymous home feed
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
opts = {
cursor: 'cursor_example' # String |
}
begin
# Browse Reddit's anonymous home feed
result = api_instance.reddit_feed_home_get(opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_home_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_feed_home_get_with_http_info(opts)
begin
# Browse Reddit's anonymous home feed
data, status_code, headers = api_instance.reddit_feed_home_get_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditFeedHomeGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_home_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
reddit_feed_news_get(opts)
Browse Reddit's news feed
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
opts = {
cursor: 'cursor_example' # String |
}
begin
# Browse Reddit's news feed
result = api_instance.reddit_feed_news_get(opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_news_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_feed_news_get_with_http_info(opts)
begin
# Browse Reddit's news feed
data, status_code, headers = api_instance.reddit_feed_news_get_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditFeedHomeGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_news_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
reddit_feed_popular_get(opts)
Browse Reddit's popular feed
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
opts = {
cursor: 'cursor_example' # String |
}
begin
# Browse Reddit's popular feed
result = api_instance.reddit_feed_popular_get(opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_popular_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_feed_popular_get_with_http_info(opts)
begin
# Browse Reddit's popular feed
data, status_code, headers = api_instance.reddit_feed_popular_get_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditFeedHomeGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_feed_popular_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
reddit_posts_id_comments_get(id, opts)
List Reddit comments on a post
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
id = 'id_example' # String |
opts = {
cursor: 'cursor_example' # String |
}
begin
# List Reddit comments on a post
result = api_instance.reddit_posts_id_comments_get(id, opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_posts_id_comments_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_posts_id_comments_get_with_http_info(id, opts)
begin
# List Reddit comments on a post
data, status_code, headers = api_instance.reddit_posts_id_comments_get_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditPostsIdCommentsGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_posts_id_comments_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| cursor | String | [optional] |
RedditPostsIdCommentsGet200Response
- Content-Type: Not defined
- Accept: application/json
reddit_posts_id_get(id)
Get a Reddit post by id
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
id = 'id_example' # String | Reddit post fullname, e.g. `t3_1thjm1o`.
begin
# Get a Reddit post by id
result = api_instance.reddit_posts_id_get(id)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_posts_id_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_posts_id_get_with_http_info(id)
begin
# Get a Reddit post by id
data, status_code, headers = api_instance.reddit_posts_id_get_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditPostsIdGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_posts_id_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Reddit post fullname, e.g. `t3_1thjm1o`. |
- Content-Type: Not defined
- Accept: application/json
reddit_subreddits_name_get(name)
Get a Reddit subreddit by name
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
name = 'name_example' # String | Subreddit slug without `r/`, e.g. `pics`.
begin
# Get a Reddit subreddit by name
result = api_instance.reddit_subreddits_name_get(name)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_subreddits_name_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_subreddits_name_get_with_http_info(name)
begin
# Get a Reddit subreddit by name
data, status_code, headers = api_instance.reddit_subreddits_name_get_with_http_info(name)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditSubredditsNameGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_subreddits_name_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | Subreddit slug without `r/`, e.g. `pics`. |
RedditSubredditsNameGet200Response
- Content-Type: Not defined
- Accept: application/json
reddit_trending_searches_get
List Reddit's current trending search queries
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
begin
# List Reddit's current trending search queries
result = api_instance.reddit_trending_searches_get
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_trending_searches_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_trending_searches_get_with_http_info
begin
# List Reddit's current trending search queries
data, status_code, headers = api_instance.reddit_trending_searches_get_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditTrendingSearchesGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_trending_searches_get_with_http_info: #{e}"
endThis endpoint does not need any parameter.
RedditTrendingSearchesGet200Response
- Content-Type: Not defined
- Accept: application/json
reddit_users_username_comments_get(username, opts)
List Reddit comments authored by a user
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
username = 'username_example' # String |
opts = {
cursor: 'cursor_example' # String |
}
begin
# List Reddit comments authored by a user
result = api_instance.reddit_users_username_comments_get(username, opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_comments_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_users_username_comments_get_with_http_info(username, opts)
begin
# List Reddit comments authored by a user
data, status_code, headers = api_instance.reddit_users_username_comments_get_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditPostsIdCommentsGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_comments_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
RedditPostsIdCommentsGet200Response
- Content-Type: Not defined
- Accept: application/json
reddit_users_username_get(username)
Get a Reddit user profile by username
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
username = 'username_example' # String |
begin
# Get a Reddit user profile by username
result = api_instance.reddit_users_username_get(username)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_users_username_get_with_http_info(username)
begin
# Get a Reddit user profile by username
data, status_code, headers = api_instance.reddit_users_username_get_with_http_info(username)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditUsersUsernameGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String |
RedditUsersUsernameGet200Response
- Content-Type: Not defined
- Accept: application/json
reddit_users_username_posts_get(username, opts)
List Reddit posts authored by a user
require 'time'
require 'unifapi'
# setup authorization
Unifapi.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Unifapi::RedditApi.new
username = 'username_example' # String |
opts = {
cursor: 'cursor_example' # String |
}
begin
# List Reddit posts authored by a user
result = api_instance.reddit_users_username_posts_get(username, opts)
p result
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_posts_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> reddit_users_username_posts_get_with_http_info(username, opts)
begin
# List Reddit posts authored by a user
data, status_code, headers = api_instance.reddit_users_username_posts_get_with_http_info(username, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <RedditFeedHomeGet200Response>
rescue Unifapi::ApiError => e
puts "Error when calling RedditApi->reddit_users_username_posts_get_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
- Content-Type: Not defined
- Accept: application/json