Commit edf2cbcf authored by SpinShare's avatar SpinShare

added songreview song reference

parent 636e8f4b
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<div class="alert alert-primary" role="alert"> <div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Last Update</h4> <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>
<div class="card"> <div class="card">
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
<li>Added an endpoint for UserCharts</li> <li>Added an endpoint for UserCharts</li>
<li>Added an endpoint for UserReviews</li> <li>Added an endpoint for UserReviews</li>
<li>Added an endpoint for UserSpinPlays</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> <li>Added counts of charts, reviews and spinplays to the UserOverview endpoint</li>
</ul> </ul>
</div> </div>
......
...@@ -248,30 +248,59 @@ ...@@ -248,30 +248,59 @@
<strong>Output Body (Success)</strong> <strong>Output Body (Success)</strong>
<pre class="code"> <pre class="code">
{ {
"version":1, "version":1,
"status":200, "status":200,
"data":{[ "data":[
{ {
"id":22, "id":2,
"user":{ "song":{
"id":9, "id":138,
"username":"testtest", "title":"Tendril",
"coverReference":null, "subtitle":"",
"isVerified":null, "artist":"Collin McLoughlin \u0026 Au5",
"isPatreon":null "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":2,
"username":"not-taw",
"coverReference":"",
"isVerified":false,
"isPatreon":null
},
"recommended":false,
"comment":"Sucks Ass!",
"reviewDate":{
"date":"2020-05-12 12:55:41.000000",
"timezone_type":3,
"timezone":"Europe\/Berlin"
}
}, },
"recommended":false, ...
"comment":"I did not enjoy this", ]
"reviewDate":{ }
"date":"2020-08-22 18:22:56.000000",
"timezone_type":3,
"timezone":"Europe\/Berlin"
}
},
...
]}
}
</pre> </pre>
<br /> <br />
......
...@@ -118,6 +118,7 @@ class SongReview ...@@ -118,6 +118,7 @@ class SongReview
public function getJSON() { public function getJSON() {
$response = array( $response = array(
'id' => $this->id, 'id' => $this->id,
'song' => $this->song->getJSON(),
'user' => $this->user->getJSON(), 'user' => $this->user->getJSON(),
'recommended' => $this->recommended, 'recommended' => $this->recommended,
'comment' => $this->comment, '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