Commit 4d21f8bd authored by SpinShare's avatar SpinShare

added reviews and spinplays detail api calls

parent 6d78e333
...@@ -154,6 +154,38 @@ class SSAPI { ...@@ -154,6 +154,38 @@ class SSAPI {
}); });
} }
async getSongDetailReviews(_songId) {
let apiPath = this.apiBase + "song/" + _songId + "/reviews";
let supportedVersion = this.supportedVersion;
return axios.get(apiPath)
.then(function(response) {
if(response.data.version !== supportedVersion) {
throw new Error("Client is outdated!");
}
return response.data;
}).catch(function(error) {
throw new Error(error);
});
}
async getSongDetailSpinPlays(_songId) {
let apiPath = this.apiBase + "song/" + _songId + "/spinplays";
let supportedVersion = this.supportedVersion;
return axios.get(apiPath)
.then(function(response) {
if(response.data.version !== supportedVersion) {
throw new Error("Client is outdated!");
}
return response.data;
}).catch(function(error) {
throw new Error(error);
});
}
async getUserDetail(_userId) { async getUserDetail(_userId) {
let apiPath = this.apiBase + "user/" + _userId; let apiPath = this.apiBase + "user/" + _userId;
let supportedVersion = this.supportedVersion; let supportedVersion = this.supportedVersion;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment