gimme

package
v0.0.0-...-d268cf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	R     *reddit.Reddit
	Cache *redis.Redis
}

Controller : Gives random meme(s) through /gimme endpoint

func (Controller) GetNPostsFromSub

func (g Controller) GetNPostsFromSub(c *gin.Context)

GetNPostsFromSub : Get N no. of posts from a specific subreddit

func (Controller) GetNRandomMemes

func (g Controller) GetNRandomMemes(c *gin.Context)

GetNRandomMemes : Returns N no. of memes from a random subreddit

func (Controller) GetOnePostFromSub

func (g Controller) GetOnePostFromSub(c *gin.Context)

GetOnePostFromSub : Get one post from a specific subreddit

func (Controller) GetOneRandomMeme

func (g Controller) GetOneRandomMeme(c *gin.Context)

GetOneRandomMeme : Returns a single meme from a random subreddit

func (Controller) SubredditOrCount

func (g Controller) SubredditOrCount(c *gin.Context)

SubredditOrCount : Find if the route is /<subreddit>/ or /<count>/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL