Commit edf2cbcf authored by SpinShare's avatar SpinShare

added songreview song reference

parent 636e8f4b
......@@ -134,7 +134,7 @@
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Last Update</h4>
This documentation was last updated on 09/09/2020 at 16:58 CEST
This documentation was last updated on 09/09/2020 at 17:48 CEST
</div>
<div class="card">
......@@ -145,6 +145,7 @@
<li>Added an endpoint for UserCharts</li>
<li>Added an endpoint for UserReviews</li>
<li>Added an endpoint for UserSpinPlays</li>
<li>Added song reference to the UserReviews endpoint</li>
<li>Added counts of charts, reviews and spinplays to the UserOverview endpoint</li>
</ul>
</div>
......
......@@ -248,30 +248,59 @@
<strong>Output Body (Success)</strong>
<pre class="code">
{
{
"version":1,
"status":200,
"data":{[
"data":[
{
"id":22,
"id":2,
"song":{
"id":138,
"title":"Tendril",
"subtitle":"",
"artist":"Collin McLoughlin \u0026 Au5",
"charter":"Halflite",
"uploader":1,
"fileReference":"spinshare_5ea59e04df800",
"tags":[
"test",
"awesome",
"nice"
],
"views":534,
"downloads":2,
"isExplicit":false,
"isTournament":false,
"hasEasyDifficulty":false,
"hasNormalDifficulty":false,
"hasHardDifficulty":false,
"hasExtremeDifficulty":false,
"hasXDDifficulty":true,
"uploadDate":{
"date":"2020-04-26 16:43:16.000000",
"timezone_type":3,
"timezone":"Europe\/Berlin"
},
"description":"I\u0027m very proud of this chart!"
},
"user":{
"id":9,
"username":"testtest",
"coverReference":null,
"isVerified":null,
"id":2,
"username":"not-taw",
"coverReference":"",
"isVerified":false,
"isPatreon":null
},
"recommended":false,
"comment":"I did not enjoy this",
"comment":"Sucks Ass!",
"reviewDate":{
"date":"2020-08-22 18:22:56.000000",
"date":"2020-05-12 12:55:41.000000",
"timezone_type":3,
"timezone":"Europe\/Berlin"
}
},
...
]}
}
]
}
</pre>
<br />
......
......@@ -118,6 +118,7 @@ class SongReview
public function getJSON() {
$response = array(
'id' => $this->id,
'song' => $this->song->getJSON(),
'user' => $this->user->getJSON(),
'recommended' => $this->recommended,
'comment' => $this->comment,
......
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