Socket
Socket
Sign inDemoInstall

github.com/scord/reddit

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/scord/reddit

Package reddit implements an abstraction for the reddit.com API.


Version published

Readme

Source

reddit

a convenient abstraction for the reddit.com API

Checkout the godoc page

warning

this is a work in progress!

example

package main

import (
	"fmt"

	"github.com/jzelinskie/reddit"
)

// Please don't handle errors this way.
func main() {
	// Login to reddit
	session, _ := reddit.NewLoginSession(
		"novelty_account",
		"password",
		"golang reddit example",
	)

	// Get reddit's default frontpage
	submissions, _ := session.DefaultFrontpage()

	// Get our own personal frontpage
	submissions, _ = session.Frontpage()

	// Upvote the first post
	session.Vote(submissions[0], reddit.UpVote)
}

FAQs

Last updated on 09 Jul 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc