Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김유민
/
digging-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
blue
2021-12-05 22:34:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c38e6701df8f01e7758ed3285d6e09201bdf51ee
c38e6701
1 parent
8955f5dc
Modify routes/api.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
29 deletions
routes/api.js
routes/api.js
View file @
c38e670
const
SpotifyWebApi
=
require
(
'spotify-web-api-node'
);
// spotify api
//const { search } = require('.');
var
spotifyApi
=
new
SpotifyWebApi
({
clientId
:
"
faf7865d62b5488da2f6bca05e63a075"
,
//your id
clientSecret
:
"
b888f07e8986499aa70950b0235d81eb"
,
//your secret
redirectUri
:
'
http://localhost:3000/callback'
//redirectUri
clientId
:
"
your id"
,
clientSecret
:
"
your secret"
,
redirectUri
:
'
redirectUri'
});
const
scopes
=
[
...
...
@@ -105,12 +105,6 @@ function getArtist(artistid,callback){
});
}
module
.
exports
.
getArtist
=
getArtist
;
//followers.total
//images[0]
//name
//popularity
//id
// Get albums by a certain artist
function
getArtistAlbums
(
artistid
,
callback
){
spotifyApi
.
getArtistAlbums
(
artistid
)
...
...
@@ -122,23 +116,3 @@ function getArtistAlbums(artistid,callback){
});
}
module
.
exports
.
getArtistAlbums
=
getArtistAlbums
;
// function search(){
// SearchUrl = `https://open.spotify.com/artist/4kyWODlwZxF4tiAe4LblhX`
// request(SearchUrl, (error, response, body) => {
// var data = body;
// console.log(body)
// // for (var j = 0; j < 10; j++) {
// // var team_id = data["info"]["participants"][j]["teamId"]
// // if (p_id == summoner_puuid) {
// // my_info["kills"] += match["info"]["participants"][j]["kills"]
// // win = match["info"]["participants"][j]["win"];
// // }
// // }
// })
// }
// module.exports.search = search;
// var item = data.body.artists.items.find((item,idx)=>{
// item.popularity == "0";
// });
\ No newline at end of file
...
...
Please
register
or
login
to post a comment