Skip to content
/ go-vgmdb Public

A Go library for accessing the VGMdb API

Notifications You must be signed in to change notification settings

imkh/go-vgmdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-vgmdb

A Go library for accessing the VGMdb API (https://vgmdb.info/). Inspired by go-gitlab.

Coverage

Searching

  • /search/<query> - Search for matching items
  • /search?q=<query> - Search for matching items
  • /search/albums/<query> - Search for matching albums
  • /search/albums?q=<query> - Search for matching albums
  • /search/artists/<query> - Search for matching artists
  • /search/artists?q=<query> - Search for matching artists
  • /search/orgs/<query> - Search for matching organizations
  • /search/orgs?q=<query> - Search for matching organizations
  • /search/products/<query> - Search for matching products
  • /search/products?q=<query> - Search for matching products

Browse Lists

  • /albumlist/<letter> - View all of the albums by letter
  • /artistlist/<letter> - View all of the artists by letter
  • /orglist - View all of the organizations
  • /orglist/<letter> - View all of the organizations by letter
  • /eventlist - View all of the events
  • /eventlist/<year> - View all of the events by year
  • /productlist/<letter> - View all of the products by letter

Recent Changes

  • /recent/albums - View recent album changes
  • /recent/media - View recent album media changes
  • /recent/tracklists - View recent album tracklist changes
  • /recent/scans - View recent album scanned covers
  • /recent/artists - View recent artist changes
  • /recent/products - View recent product changes
  • /recent/labels - View recent label organization changes
  • /recent/links - View recent album and artist links changes
  • /recent/ratings - View recent album rating changes

Information Pages

  • /album/<id> - Album information
  • /artist/<id> - Artist information
  • /org/<id> - Organization information
  • /event/<id> - Event information
  • /product/<id> - Product information

Seller Information

  • /album/<id>/sellers - Album sellers
  • /artist/<id>/sellers - Artist sellers
  • /album/<id>/sellers?allow_partial=true - Partial album sellers with Refresh header
  • /artist/<id>/sellers?allow_partial=true - Partial artist sellers with Refresh header

Installation

Inside your project directory, run:

$ go get github.com/imkg/go-vgmdb

or import the module and run go get without parameters.

import "github.com/imkg/go-vgmdb"

Usage

package main

import (
	"github.com/imkg/go-vgmdb"
)

func main() {
	// By default, created client uses public https://vgmdb.info.
	client, err := vgmdb.NewClient(
		// To use an another instance:
		//vgmdb.WithBaseURL("https://vgmdb.example.com")
	)
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	// Get an album
	album, _, err := client.Albums.GetAlbum(75832)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(album.Name)

	// Get a product
	product, _, err := client.Products.GetProduct(2)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(product.Name)
}

About

A Go library for accessing the VGMdb API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages