package
0.2.0
Repository: https://github.com/joshbarrass/goreddit.git
Documentation: pkg.go.dev

# Functions

GetOauthURL returns the URL for an Oauth endpoint.
GetRedditURL returns the URL for a reddit endpoint.
NewRedditAPI creates a new API with a given ClientID and ClientSecret and with an unauthenticated account.

# Constants

grant types.
schemes.
schemes.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Oauth Endpoints */.
Reddit Endpoints */.

# Structs

BaseJSONResponse is for the JSON API and provides the necessary Error function for it.
BaseResponse stores "error" and "message" and provides a function for validating a response based on these.
No description provided by the author
ComposeMessageResponse is the response from composing a message.
MeResponse is the response from a Me query.
No description provided by the author
RedditAccount holds the data pertaining to a reddit account.
RedditAPI interfaces all the necessary functions to interact with Reddit via the official API.
No description provided by the author
StylesheetTemplateData is the data returned in the stylesheet template request.
StylesheetTemplateImage stores the data about an image that has been uploaded to a subreddit for use in the stylesheet.
No description provided by the author
Token stores the authentication token and expiry time so that the validity of the token can be automatically verified before requests.

# Type aliases

CommentsByScore implements a sort.Interface for sorting comments by score, from lowest to highest.
CommentsByScoreDescending implements a sort.Interface for sorting comments by score, from highest to lowest.
FloatTime implements a custom unmarshaller for decoding the float time into a time.Time-compatible object.
TokenExpiresIn is a Duration with custom unmarshaller for unmarshalling the duration as seconds.