Giter VIP home page Giter VIP logo

pushshift-go's Introduction

pushshift-go

Go wrapper for the PushShift Reddit API.

PushShift is a free, no signup required API for searching Reddit Submissions, comments, and more. It is the only public API that allows for searching Reddit posts by date since the official Reddit API has removed that feature.

Installation

Install the package with go get:

go get -u github.com/AustinGomez/pushshift-golang

Usage

You can use this wrapper with or without specifying a client object. This will make more sense with the following examples. For search, you need to use the particular Package's SearchParams.

Without the Client, you can just specify the packages you need, and this example uses the submission SearchParams.

package main

import (
	"fmt"
	"github.com/AustinGomez/pushshift-go/submission"
)

func main() {
	params := submission.SearchParams{Limit: 1}
	submissions := submission.Search(params)
	fmt.Println("%v", submissions)
}

With Client:

package main

import (
	"fmt"
	"github.com/AustinGomez/pushshift-go/"
	"github.com/AustinGomez/pushshift-go/submission"
)

func main() {
	ps := pushshift.PushShift{}
	ps.Init()
	params := submission.SearchParams{Limit: 1}
	submissions := submission.Search(params)
	fmt.Println("%v", submissions)
}

Full Documentation

Full a look at the full documentation at and consider donating at https://pushshift.io/

Restrictions

PushShift rate limits you by IP address to around ~200 requests per minute. No authentication is required.

Roadmap

Currently only searching Submissions and Comments is implemented. Subreddit search is broken on PushShift's side right now. I'll implement this once it's back online.

pushshift-go's People

Contributors

austingomez avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.