Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/stringy/grape

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/stringy/grape

  • v0.0.0-20131001164553-59a85a6a3349
  • Source
  • Go
  • Socket score

Version published
Created
Source

grape

grape is a Go wrapper for the Reddit API. It will provide functionality for all aspects of the API for use in the creation of bots.

The current functionality is limited to the following:

  • Logging in
  • Retrieving information about any user
  • Retrieving information about the currently logged in user
  • Retrieving a subreddit (limited to front page only)
  • Retrieving sorted subreddits (by new, hot and top)
  • Retrieving comments from a link
  • Submitting a link from the currently logged in user to a subreddit
  • Submitting comments
  • Getting all mail (inbox as well as unread)
  • Cached responses from reddit and a priority system in preparation for prefetching of data

Immediate TODO:

  • Prefetching of extra information
  • Replying to private messages
  • Develop a way of incorporating OAuth

Example Code:

package main 

import (
  "github.com/Stringy/grape"
  "fmt"
)

func main() {
  user, err := grape.Login("username", "password", true)
  if err != nil {
    // handle error
  } 
  sub, err := grape.GetSubreddit("learnprogramming")
  if err != nil {
    // handle error
  }
  for i, item := range sub.Items {
    fmt.Println(item.Submission)
  }
}

FAQs

Package last updated on 01 Oct 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc