camc314 / tvawards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TV Awards

TV Awards is a series of packages written in Go, used to retrieve awards data from various sources such as: The Emmys and The BAFTAs.

Installation

To install the package, you need to install Go and set your Go workspace first.

  1. You first need Go installed, then you can use the below Go command to install.
$ go get -u github.com/camc314/tvawards
  1. Import it in your code:
import "github.com/camc314/tvawards

Quick start

The below program gets all BAFTA film awards and stores it to ./data/bafta-film-awards.json

package main

import "github.com/camc314/tvawards"

func main() {
    response, err := tvawards.GetBaftaAwards("film")

    if err != nil {
        panic(err)
    }

    file, _ := json.MarshalIndent(*response, "", "  ")

    ioutil.WriteFile("./data/bafta-film-awards.json", file, 0644)
}
$ go run main.go

Supported Awards

  • BAFTA's

Planned Support

  • Emmy's

About

License:MIT License


Languages

Language:Go 100.0%