GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — unifapi-sdk-go/docs/RedditAPI.md at main · unifapi-agent/unifapi-sdk-go

Expand file tree

/

RedditAPI.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
683 lines (445 loc) · 18.6 KB
/

RedditAPI.md

Copy path

File metadata and controls

683 lines (445 loc) · 18.6 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

\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(ctx).Cursor(cursor).Execute()

Browse Reddit's anonymous home feed

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditFeedHomeGet(context.Background()).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditFeedHomeGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditFeedHomeGet`: RedditFeedHomeGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditFeedHomeGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRedditFeedHomeGetRequest struct via the builder pattern

Name Type Description Notes
cursor string

Return type

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

RedditFeedHomeGet200Response RedditFeedNewsGet(ctx).Cursor(cursor).Execute()

Browse Reddit's news feed

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditFeedNewsGet(context.Background()).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditFeedNewsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditFeedNewsGet`: RedditFeedHomeGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditFeedNewsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRedditFeedNewsGetRequest struct via the builder pattern

Name Type Description Notes
cursor string

Return type

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

RedditFeedHomeGet200Response RedditFeedPopularGet(ctx).Cursor(cursor).Execute()

Browse Reddit's popular feed

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditFeedPopularGet(context.Background()).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditFeedPopularGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditFeedPopularGet`: RedditFeedHomeGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditFeedPopularGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRedditFeedPopularGetRequest struct via the builder pattern

Name Type Description Notes
cursor string

Return type

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

RedditPostsIdCommentsGet200Response RedditPostsIdCommentsGet(ctx, id).Cursor(cursor).Execute()

List Reddit comments on a post

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	id := "id_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditPostsIdCommentsGet(context.Background(), id).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditPostsIdCommentsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditPostsIdCommentsGet`: RedditPostsIdCommentsGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditPostsIdCommentsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiRedditPostsIdCommentsGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

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

RedditPostsIdGet200Response RedditPostsIdGet(ctx, id).Execute()

Get a Reddit post by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	id := "id_example" // string | Reddit post fullname, e.g. `t3_1thjm1o`.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditPostsIdGet(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditPostsIdGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditPostsIdGet`: RedditPostsIdGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditPostsIdGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Reddit post fullname, e.g. `t3_1thjm1o`.

Other Parameters

Other parameters are passed through a pointer to a apiRedditPostsIdGetRequest struct via the builder pattern

Name Type Description Notes

Return type

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

RedditSubredditsNameGet200Response RedditSubredditsNameGet(ctx, name).Execute()

Get a Reddit subreddit by name

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	name := "name_example" // string | Subreddit slug without `r/`, e.g. `pics`.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditSubredditsNameGet(context.Background(), name).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditSubredditsNameGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditSubredditsNameGet`: RedditSubredditsNameGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditSubredditsNameGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Subreddit slug without `r/`, e.g. `pics`.

Other Parameters

Other parameters are passed through a pointer to a apiRedditSubredditsNameGetRequest struct via the builder pattern

Name Type Description Notes

Return type

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

RedditTrendingSearchesGet200Response RedditTrendingSearchesGet(ctx).Execute()

List Reddit's current trending search queries

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditTrendingSearchesGet(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditTrendingSearchesGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditTrendingSearchesGet`: RedditTrendingSearchesGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditTrendingSearchesGet`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiRedditTrendingSearchesGetRequest struct via the builder pattern

Return type

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

RedditPostsIdCommentsGet200Response RedditUsersUsernameCommentsGet(ctx, username).Cursor(cursor).Execute()

List Reddit comments authored by a user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditUsersUsernameCommentsGet(context.Background(), username).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditUsersUsernameCommentsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditUsersUsernameCommentsGet`: RedditPostsIdCommentsGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditUsersUsernameCommentsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiRedditUsersUsernameCommentsGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

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

RedditUsersUsernameGet200Response RedditUsersUsernameGet(ctx, username).Execute()

Get a Reddit user profile by username

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditUsersUsernameGet(context.Background(), username).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditUsersUsernameGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditUsersUsernameGet`: RedditUsersUsernameGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditUsersUsernameGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiRedditUsersUsernameGetRequest struct via the builder pattern

Name Type Description Notes

Return type

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

RedditFeedHomeGet200Response RedditUsersUsernamePostsGet(ctx, username).Cursor(cursor).Execute()

List Reddit posts authored by a user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	username := "username_example" // string | 
	cursor := "cursor_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RedditAPI.RedditUsersUsernamePostsGet(context.Background(), username).Cursor(cursor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RedditAPI.RedditUsersUsernamePostsGet``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RedditUsersUsernamePostsGet`: RedditFeedHomeGet200Response
	fmt.Fprintf(os.Stdout, "Response from `RedditAPI.RedditUsersUsernamePostsGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
username string

Other Parameters

Other parameters are passed through a pointer to a apiRedditUsersUsernamePostsGetRequest struct via the builder pattern

Name Type Description Notes

cursor | string | |

Return type

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]

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.