Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.74 KB

File metadata and controls

68 lines (46 loc) · 1.74 KB

Sigwin\RedditClient\ThingApi

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

Method HTTP request Description
getInfo() GET /api/info Get thing info

getInfo()

getInfo($id, $sr_name): \Sigwin\RedditClient\Model\ListingEnvelope

Get thing info

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Sigwin\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sigwin\RedditClient\Api\ThingApi(
    // 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 = t3_11e9mr5; // string
$sr_name = pics; // string

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

Parameters

Name Type Description Notes
id string [optional]
sr_name string [optional]

Return type

\Sigwin\RedditClient\Model\ListingEnvelope

Authorization

oauth2

HTTP request headers

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

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