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.
In this project i'm making use of the OBA API. To gt data from this API i'm using the OBA wrapper
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
- Search cd's
- Scan cd barcodes
- Scan cd RFID tags
- Data filter fro cd's
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.
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
}