Skip to content

Latest commit

 

History

History
1018 lines (827 loc) · 32.4 KB

File metadata and controls

1018 lines (827 loc) · 32.4 KB

Unifapi.Sdk.Api.RedditApi

All URIs are relative to https://api.unifapi.com

Method HTTP request Description
RedditFeedHomeGet GET /reddit/feed/home Browse Reddit's anonymous home feed
RedditFeedNewsGet GET /reddit/feed/news Browse Reddit's news feed
RedditFeedPopularGet GET /reddit/feed/popular Browse Reddit's popular feed
RedditPostsIdCommentsGet GET /reddit/posts/{id}/comments List Reddit comments on a post
RedditPostsIdGet GET /reddit/posts/{id} Get a Reddit post by id
RedditSubredditsNameGet GET /reddit/subreddits/{name} Get a Reddit subreddit by name
RedditTrendingSearchesGet GET /reddit/trending-searches List Reddit's current trending search queries
RedditUsersUsernameCommentsGet GET /reddit/users/{username}/comments List Reddit comments authored by a user
RedditUsersUsernameGet GET /reddit/users/{username} Get a Reddit user profile by username
RedditUsersUsernamePostsGet GET /reddit/users/{username}/posts List Reddit posts authored by a user

RedditFeedHomeGet

RedditFeedHomeGet200Response RedditFeedHomeGet (string? cursor = null)

Browse Reddit's anonymous home feed

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditFeedHomeGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // Browse Reddit's anonymous home feed
                RedditFeedHomeGet200Response result = apiInstance.RedditFeedHomeGet(cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditFeedHomeGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditFeedHomeGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Browse Reddit's anonymous home feed
    ApiResponse<RedditFeedHomeGet200Response> response = apiInstance.RedditFeedHomeGetWithHttpInfo(cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditFeedHomeGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
cursor string? [optional]

Return type

RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditFeedNewsGet

RedditFeedHomeGet200Response RedditFeedNewsGet (string? cursor = null)

Browse Reddit's news feed

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditFeedNewsGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // Browse Reddit's news feed
                RedditFeedHomeGet200Response result = apiInstance.RedditFeedNewsGet(cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditFeedNewsGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditFeedNewsGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Browse Reddit's news feed
    ApiResponse<RedditFeedHomeGet200Response> response = apiInstance.RedditFeedNewsGetWithHttpInfo(cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditFeedNewsGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
cursor string? [optional]

Return type

RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditFeedPopularGet

RedditFeedHomeGet200Response RedditFeedPopularGet (string? cursor = null)

Browse Reddit's popular feed

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditFeedPopularGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // Browse Reddit's popular feed
                RedditFeedHomeGet200Response result = apiInstance.RedditFeedPopularGet(cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditFeedPopularGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditFeedPopularGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Browse Reddit's popular feed
    ApiResponse<RedditFeedHomeGet200Response> response = apiInstance.RedditFeedPopularGetWithHttpInfo(cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditFeedPopularGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
cursor string? [optional]

Return type

RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditPostsIdCommentsGet

RedditPostsIdCommentsGet200Response RedditPostsIdCommentsGet (string id, string? cursor = null)

List Reddit comments on a post

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditPostsIdCommentsGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var id = "id_example";  // string | 
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // List Reddit comments on a post
                RedditPostsIdCommentsGet200Response result = apiInstance.RedditPostsIdCommentsGet(id, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditPostsIdCommentsGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditPostsIdCommentsGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List Reddit comments on a post
    ApiResponse<RedditPostsIdCommentsGet200Response> response = apiInstance.RedditPostsIdCommentsGetWithHttpInfo(id, cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditPostsIdCommentsGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string
cursor string? [optional]

Return type

RedditPostsIdCommentsGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditPostsIdGet

RedditPostsIdGet200Response RedditPostsIdGet (string id)

Get a Reddit post by id

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditPostsIdGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var id = "id_example";  // string | Reddit post fullname, e.g. `t3_1thjm1o`.

            try
            {
                // Get a Reddit post by id
                RedditPostsIdGet200Response result = apiInstance.RedditPostsIdGet(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditPostsIdGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditPostsIdGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get a Reddit post by id
    ApiResponse<RedditPostsIdGet200Response> response = apiInstance.RedditPostsIdGetWithHttpInfo(id);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditPostsIdGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Reddit post fullname, e.g. `t3_1thjm1o`.

Return type

RedditPostsIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditSubredditsNameGet

RedditSubredditsNameGet200Response RedditSubredditsNameGet (string name)

Get a Reddit subreddit by name

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditSubredditsNameGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var name = "name_example";  // string | Subreddit slug without `r/`, e.g. `pics`.

            try
            {
                // Get a Reddit subreddit by name
                RedditSubredditsNameGet200Response result = apiInstance.RedditSubredditsNameGet(name);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditSubredditsNameGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditSubredditsNameGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get a Reddit subreddit by name
    ApiResponse<RedditSubredditsNameGet200Response> response = apiInstance.RedditSubredditsNameGetWithHttpInfo(name);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditSubredditsNameGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
name string Subreddit slug without `r/`, e.g. `pics`.

Return type

RedditSubredditsNameGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditTrendingSearchesGet

RedditTrendingSearchesGet200Response RedditTrendingSearchesGet ()

List Reddit's current trending search queries

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditTrendingSearchesGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);

            try
            {
                // List Reddit's current trending search queries
                RedditTrendingSearchesGet200Response result = apiInstance.RedditTrendingSearchesGet();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditTrendingSearchesGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditTrendingSearchesGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List Reddit's current trending search queries
    ApiResponse<RedditTrendingSearchesGet200Response> response = apiInstance.RedditTrendingSearchesGetWithHttpInfo();
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditTrendingSearchesGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

RedditTrendingSearchesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditUsersUsernameCommentsGet

RedditPostsIdCommentsGet200Response RedditUsersUsernameCommentsGet (string username, string? cursor = null)

List Reddit comments authored by a user

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditUsersUsernameCommentsGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var username = "username_example";  // string | 
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // List Reddit comments authored by a user
                RedditPostsIdCommentsGet200Response result = apiInstance.RedditUsersUsernameCommentsGet(username, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditUsersUsernameCommentsGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditUsersUsernameCommentsGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List Reddit comments authored by a user
    ApiResponse<RedditPostsIdCommentsGet200Response> response = apiInstance.RedditUsersUsernameCommentsGetWithHttpInfo(username, cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditUsersUsernameCommentsGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
username string
cursor string? [optional]

Return type

RedditPostsIdCommentsGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditUsersUsernameGet

RedditUsersUsernameGet200Response RedditUsersUsernameGet (string username)

Get a Reddit user profile by username

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditUsersUsernameGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var username = "username_example";  // string | 

            try
            {
                // Get a Reddit user profile by username
                RedditUsersUsernameGet200Response result = apiInstance.RedditUsersUsernameGet(username);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditUsersUsernameGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditUsersUsernameGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get a Reddit user profile by username
    ApiResponse<RedditUsersUsernameGet200Response> response = apiInstance.RedditUsersUsernameGetWithHttpInfo(username);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditUsersUsernameGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
username string

Return type

RedditUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RedditUsersUsernamePostsGet

RedditFeedHomeGet200Response RedditUsersUsernamePostsGet (string username, string? cursor = null)

List Reddit posts authored by a user

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class RedditUsersUsernamePostsGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new RedditApi(config);
            var username = "username_example";  // string | 
            var cursor = "cursor_example";  // string? |  (optional) 

            try
            {
                // List Reddit posts authored by a user
                RedditFeedHomeGet200Response result = apiInstance.RedditUsersUsernamePostsGet(username, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RedditApi.RedditUsersUsernamePostsGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RedditUsersUsernamePostsGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List Reddit posts authored by a user
    ApiResponse<RedditFeedHomeGet200Response> response = apiInstance.RedditUsersUsernamePostsGetWithHttpInfo(username, cursor);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling RedditApi.RedditUsersUsernamePostsGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
username string
cursor string? [optional]

Return type

RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]