Skip to content

Latest commit

 

History

History
600 lines (407 loc) · 16.6 KB

File metadata and controls

600 lines (407 loc) · 16.6 KB

Unifapi\Sdk\RedditApi

All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.

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()

redditFeedHomeGet($cursor): \Unifapi\\Sdk\Model\RedditFeedHomeGet200Response

Browse Reddit's anonymous home feed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditFeedHomeGet($cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditFeedHomeGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditFeedNewsGet()

redditFeedNewsGet($cursor): \Unifapi\\Sdk\Model\RedditFeedHomeGet200Response

Browse Reddit's news feed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditFeedNewsGet($cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditFeedNewsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditFeedPopularGet()

redditFeedPopularGet($cursor): \Unifapi\\Sdk\Model\RedditFeedHomeGet200Response

Browse Reddit's popular feed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditFeedPopularGet($cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditFeedPopularGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditPostsIdCommentsGet()

redditPostsIdCommentsGet($id, $cursor): \Unifapi\\Sdk\Model\RedditPostsIdCommentsGet200Response

List Reddit comments on a post

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditPostsIdCommentsGet($id, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditPostsIdCommentsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditPostsIdCommentsGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditPostsIdGet()

redditPostsIdGet($id): \Unifapi\\Sdk\Model\RedditPostsIdGet200Response

Get a Reddit post by id

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | Reddit post fullname, e.g. `t3_1thjm1o`.

try {
    $result = $apiInstance->redditPostsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditPostsIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

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

Return type

\Unifapi\Sdk\Model\RedditPostsIdGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditSubredditsNameGet()

redditSubredditsNameGet($name): \Unifapi\\Sdk\Model\RedditSubredditsNameGet200Response

Get a Reddit subreddit by name

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$name = 'name_example'; // string | Subreddit slug without `r/`, e.g. `pics`.

try {
    $result = $apiInstance->redditSubredditsNameGet($name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditSubredditsNameGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

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

Return type

\Unifapi\Sdk\Model\RedditSubredditsNameGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditTrendingSearchesGet()

redditTrendingSearchesGet(): \Unifapi\\Sdk\Model\RedditTrendingSearchesGet200Response

List Reddit's current trending search queries

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->redditTrendingSearchesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditTrendingSearchesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Unifapi\Sdk\Model\RedditTrendingSearchesGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditUsersUsernameCommentsGet()

redditUsersUsernameCommentsGet($username, $cursor): \Unifapi\\Sdk\Model\RedditPostsIdCommentsGet200Response

List Reddit comments authored by a user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditUsersUsernameCommentsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditUsersUsernameCommentsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditPostsIdCommentsGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditUsersUsernameGet()

redditUsersUsernameGet($username): \Unifapi\\Sdk\Model\RedditUsersUsernameGet200Response

Get a Reddit user profile by username

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string

try {
    $result = $apiInstance->redditUsersUsernameGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditUsersUsernameGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string

Return type

\Unifapi\Sdk\Model\RedditUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

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

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

redditUsersUsernamePostsGet()

redditUsersUsernamePostsGet($username, $cursor): \Unifapi\\Sdk\Model\RedditFeedHomeGet200Response

List Reddit posts authored by a user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\RedditApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->redditUsersUsernamePostsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RedditApi->redditUsersUsernamePostsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\RedditFeedHomeGet200Response

Authorization

bearerAuth

HTTP request headers

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

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