Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions back-end/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,46 @@ app.use(express.json())

// END POINTS

app.get('/', (request, response) => {
response.send('<h1> Hello world!</h1>')
//end point 3
app.get('/get_song', (request, response) => {

})
const title = request.body.title //"song title" ex "magic shop"

try{

//Gets a song with a particular name specified by the request
axios.get('https://shazam.p.rapidapi.com/search', {
params: {
'term': title,
'limit': 1,
},
headers: {
'x-rapidapi-key' : 'c8936296a6msh4f298d73c33d088p1070c8jsn7b217e824682',
'x-rapidapi-host' : 'shazam.p.rapidapi.com',
'useQueryString' : true,
}
})

//Sends the song information back to the frontend
.then(function(res) {

const send_data = {
"title": res.data.tracks.hits[0].track.title,
"id": res.data.tracks.hits[0].track.key,
"artist": res.data.tracks.hits[0].track.subtitle,
"image": res.data.tracks.hits[0].track.share.image,


}
response.json(send_data)
})

}
catch(error){
console.log(error)
}
//response.send(`<h1> This is end point 3!! </h1>`);
})



Expand Down
2 changes: 1 addition & 1 deletion front-end/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\App.js":"1","C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\index.js":"2","C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\views\\library.jsx":"3","C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\views\\find.jsx":"4"},{"size":498,"mtime":1607133314479,"results":"5","hashOfConfig":"6"},{"size":198,"mtime":1607132095966,"results":"7","hashOfConfig":"6"},{"size":168,"mtime":1607133043445,"results":"8","hashOfConfig":"6"},{"size":172,"mtime":1607133058478,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"19at9bg",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"16","messages":"17","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\App.js",["18"],"C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\index.js",[],"C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\views\\library.jsx",["19"],"C:\\Users\\Aliah\\Documents\\projects\\actual\\techtogether-hack\\front-end\\src\\views\\find.jsx",["20"],{"ruleId":"21","severity":1,"message":"22","line":2,"column":17,"nodeType":"23","messageId":"24","endLine":2,"endColumn":21},{"ruleId":"21","severity":1,"message":"25","line":1,"column":17,"nodeType":"23","messageId":"24","endLine":1,"endColumn":25},{"ruleId":"21","severity":1,"message":"25","line":1,"column":17,"nodeType":"23","messageId":"24","endLine":1,"endColumn":25},"no-unused-vars","'Link' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used."]
[{"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\index.js":"1","C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\App.js":"2","C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\find.jsx":"3","C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\library.jsx":"4","C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\share.jsx":"5"},{"size":209,"mtime":1607139667277,"results":"6","hashOfConfig":"7"},{"size":517,"mtime":1607139667275,"results":"8","hashOfConfig":"7"},{"size":172,"mtime":1607139667278,"results":"9","hashOfConfig":"7"},{"size":168,"mtime":1607139667279,"results":"10","hashOfConfig":"7"},{"size":174,"mtime":1607139667280,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1bzi8sc",{"filePath":"14","messages":"15","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"16","messages":"17","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"18","messages":"19","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\index.js",[],"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\App.js",["22"],"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\find.jsx",["23"],"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\library.jsx",["24"],"C:\\Users\\megam\\techtogether-hack\\techtogether-hack\\front-end\\src\\views\\share.jsx",["25"],{"ruleId":"26","severity":1,"message":"27","line":2,"column":17,"nodeType":"28","messageId":"29","endLine":2,"endColumn":21},{"ruleId":"26","severity":1,"message":"30","line":1,"column":17,"nodeType":"28","messageId":"29","endLine":1,"endColumn":25},{"ruleId":"26","severity":1,"message":"30","line":1,"column":17,"nodeType":"28","messageId":"29","endLine":1,"endColumn":25},{"ruleId":"26","severity":1,"message":"30","line":1,"column":17,"nodeType":"28","messageId":"29","endLine":1,"endColumn":25},"no-unused-vars","'Link' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used."]
90 changes: 52 additions & 38 deletions front-end/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion front-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-scripts": "^4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
Expand Down