Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.15 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.15 KB

9GAG API in Go

CircleCI Go Report Card MIT License

Installing

go get

$ go get -u github.com/mlabouardy/9gag

Example

Getting top memes

package main

import (
	"fmt"
	"github.com/mlabouardy/9gag"
)

func main() {
	gag9 := gag9.New()
	for _, meme := range gag9.Find() {
		fmt.Printf("Description: %s\nImage: %s\n", meme.Description, meme.Image)
	}
}

Filter by tag name

package main

import (
	"fmt"
	"github.com/mlabouardy/9gag"
)

func main() {
	gag9 := gag9.New()
	for _, meme := range gag9.FindByTag("got") {
		fmt.Printf("Description: %s\nImage: %s\n", meme.Description, meme.Image)
	}
}

How to use

http://www.blog.labouardy.com/create-9gag-android-application/

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem.