Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

gojibjib/gopeana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a316de2 · Sep 19, 2018

History

33 Commits
Apr 24, 2018
Apr 25, 2018
Apr 25, 2018
Apr 17, 2018
Sep 19, 2018
Apr 18, 2018
Apr 22, 2018
Apr 18, 2018
Apr 24, 2018
Apr 18, 2018
Apr 25, 2018
Apr 25, 2018
Apr 27, 2018
Apr 27, 2018

Repository files navigation

godoc badge Go Report Card Build Status

An Europeana Search API client written in Go

Europeana is a European collection of over 50 million digitised items. The Search API provides a programmatic way to access those resources. Make sure to get an API key first.

Inspired by go-xkcd.

Repo layout

The complete list of JibJib repos is:

  • jibjib: Our Android app. Records sounds and looks fantastic.
  • deploy: Instructions to deploy the JibJib stack.
  • jibjib-model: Code for training the machine learning model for bird classification
  • jibjib-api: Main API to receive database requests & audio files.
  • jibjib-data: A MongoDB instance holding information about detectable birds.
  • jibjib-query: A thin Python Flask API that handles communication with the TensorFlow Serving instance.
  • gopeana: A API client for Europeana, written in Go.
  • voice-grabber: A collection of scripts to construct the dataset required for model training

Install

$ go get github.com/gojibjib/gopeana

Example

package main

import (
	"encoding/json"
	"fmt"
	"github.com/gojibjib/gopeana"
	"log"
)

func main() {
	apiKey := "XXXXX"
	client := gopeana.NewClient(apiKey, "")
	   	
	// Returns all results for 'Mona Lisa' with an open license.
	request, err := gopeana.NewBasicSearchRequest(client, "open", "standard", "12", "1")
	if err != nil {
		log.Fatal(err)
	}
		
	resp, err := request.Get("mona+lisa")
	if err != nil {
		log.Fatal(err)
	}
	   	
	// Web search: https://www.europeana.eu/portal/de/search?q=mona+lisa&f%5BREUSABILITY%5D%5B%5D=open
	// API search: https://www.europeana.eu/api/v2/search.json?wskey=XXXXX&reusability=open&query=mona+lisa
	fmt.Println(resp)
}