Skip to content

dorusth/project-1-1819

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 1 @cmda-minor-web · 2018-2019

Search the music collection of the OBA

The OBA has a broad collection of cd's, but it doesn't provide an easy way to listen to fragments of the albums for it's users.

My solution is a webApp which lets the user search for cd's by using the barcode and RFID chips on the cd's to find more info on the cd.

Live demo

Live demo | Repo

OBA API

In this project i'm making use of the OBA API. To gt data from this API i'm using the OBA wrapper

app

table of contents

Installation

this project doesn't have any dependencties so you can clone and run it with:

$ git clone https://github.com/dorusth/project-1-1819.git

and/or download the files and open the index.html file

Features

  • Search cd's
  • Scan cd barcodes
  • Scan cd RFID tags
  • Data filter fro cd's

API

For this project the OBA API as data source. By default the API only returns 20 entities with each request to request the data i've used the OBA wrapper.

Filter

The OBA API doesn't contain a filter for music cd's by default. Becaus of this i've written a filter which checks the amount of items the and checks the formats and filters out the audiobooks.

function dataFilter(stream){
	console.log(stream);
	let newData = [];
	if(stream.length){
		for (const obj in stream){
			let list = [];
			let item = stream[obj].formats.format;
			for(const name in item){
				list.push(item[name]._text);
			}
			if(!list.includes("audiobook")){
				newData.push(stream[obj]);
			}
		}
	}else{
		let list = [];
		let item = stream.formats.format;
		for(const name in item){
			list.push(item[name]._text);
		}
		if(!list.includes("audiobook")){
			newData.push(stream);
		}
	}
	console.log(newData);
	return newData
}

MIT © Dorus ten Haaf

About

Zoek in de de collectie van de OBA | project 1 @cmda-minor-web · 2018-2019

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.7%
  • CSS 24.8%
  • HTML 3.5%