{% extends 'apidocs/base.html.twig' %}

{% block title %}Users{% endblock %}

{% block content %}
					<div class="row justify-content-center">
						<div class="col-lg-7">
							<div class="content">
								<h1 class="content-title">
									Users
                                </h1>
                                
                                <div class="card" id="detail">
                                    <h2 class="card-title">Overview</h2>
                                    <p>Returns a general overview of information about a user.</p>

                                    <table class="table table-bordered">
                                        <tr>
                                            <th>Method</th>
                                            <td>GET</td>
                                        </tr>
                                        <tr>
                                            <th>Endpoint</th>
                                            <td>/user/<code class="code">userID</code></td>
                                        </tr>
                                    </table>

                                    <br /><br />

                                    <strong>Output Body (Success)</strong>
<pre class="code">
{
    "version":1,
    "status":200,
    "data":{
        "id":4,
        "username":"thatanimeweirdo",
        "isVerified":true,
        "isPatreon":null,
        "avatar":"https:\/\/spinsha.re\/uploads\/avatar\/5ef8cddb50106.png",
        "songs":0,
		"reviews":0,
		"spinplays":0,
		"cards":[
			{
				"id":1,
				"icon":"http:\/\/spinsha.re\/uploads\/card\/card_b4bcc0b27340a10b012a1ba8a6fd04b0.png",
				"title":"SSSO Spring 2020 Player",
				"description":"This card was given out to every player of the Spring 2020 SpinShare Speen Open tournament."
			},
			...
		]
    }
}
</pre>

                                    <br />

                                    <strong>Output Body (Not Found)</strong>
<pre class="code">
{
    "version":1,
    "status":404,
    "data":[]
}
</pre>
                                </div>
                                
                                <div class="card" id="charts">
                                    <h2 class="card-title">Charts</h2>
                                    <p>Returns all public charts of a user.</p>

                                    <table class="table table-bordered">
                                        <tr>
                                            <th>Method</th>
                                            <td>GET</td>
                                        </tr>
                                        <tr>
                                            <th>Endpoint</th>
                                            <td>/user/<code class="code">userID</code>/charts</td>
                                        </tr>
                                    </table>

                                    <br /><br />

                                    <strong>Output Body (Success)</strong>
<pre class="code">
{
    "version":1,
    "status":200,
    "data":{[
		{
			"id":1018,
			"title":"Keyboard Combos",
			"subtitle":"",
			"artist":"Discord",
			"charter":"taw.moe",
			"uploader":4,
			"hasEasyDifficulty":false,
			"hasNormalDifficulty":false,
			"hasHardDifficulty":true,
			"hasExtremeDifficulty":false,
			"hasXDDifficulty":false,
			"cover":"https:\/\/spinsha.re\/uploads\/thumbnail\/spinshare_5f2c729b8ea3b.jpg",
			"zip":"https:\/\/spinsha.re\/api\/song\/1018\/download"
		},
		...
	]}
}
</pre>

                                    <br />

                                    <strong>Output Body (Not Found)</strong>
<pre class="code">
{
    "version":1,
    "status":404,
    "data":[]
}
</pre>
                                </div>
                                
                                <div class="card" id="reviews">
                                    <h2 class="card-title">Reviews</h2>
                                    <p>Returns all reviews of a user.</p>

                                    <table class="table table-bordered">
                                        <tr>
                                            <th>Method</th>
                                            <td>GET</td>
                                        </tr>
                                        <tr>
                                            <th>Endpoint</th>
                                            <td>/user/<code class="code">userID</code>/reviews</td>
                                        </tr>
                                    </table>

                                    <br /><br />

                                    <strong>Output Body (Success)</strong>
<pre class="code">
	{
		"version":1,
		"status":200,
		"data":[
		   {
			  "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":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"
			  }
		   },
		   ...
		]
	 }
</pre>

                                    <br />

                                    <strong>Output Body (Not Found)</strong>
<pre class="code">
{
    "version":1,
    "status":404,
    "data":[]
}
</pre>
                                </div>
                                
                                <div class="card" id="spinplays">
                                    <h2 class="card-title">SpinPlays</h2>
                                    <p>Returns all SpinPlays of a user.</p>

                                    <table class="table table-bordered">
                                        <tr>
                                            <th>Method</th>
                                            <td>GET</td>
                                        </tr>
                                        <tr>
                                            <th>Endpoint</th>
                                            <td>/user/<code class="code">userID</code>/spinplays</td>
                                        </tr>
                                    </table>

                                    <br /><br />

                                    <strong>Output Body (Success)</strong>
<pre class="code">
{
    "version":1,
    "status":200,
    "data":{[
		{
			"id":13,
			"user":{
				"id":1,
				"username":"taw",
				"coverReference":"5f4147b117c7b.png",
				"isVerified":true,
				"isPatreon":true
			},
			"videoUrl":"https:\/\/youtu.be\/tPycD9OwojQ",
			"videoThumbnail":"https:\/\/i.ytimg.com\/vi\/tPycD9OwojQ\/maxresdefault.jpg",
			"submitDate":{
				"date":"2020-07-20 18:48:49.000000",
				"timezone_type":3,
				"timezone":"Europe\/Berlin"
			},
			"isActive":true
		},
		...
	]}
}
</pre>

                                    <br />

                                    <strong>Output Body (Not Found)</strong>
<pre class="code">
{
    "version":1,
    "status":404,
    "data":[]
}
</pre>
                                </div>
							</div>
						</div>
						<div class="col-lg-3">
							<div class="content">
								<div class="on-this-page-nav">
									<div class="title">On this page</div>
									<a href="#overview">Overview</a>
									<a href="#charts">Charts</a>
									<a href="#reviews">Reviews</a>
									<a href="#spinplays">SpinPlays</a>
								</div>
							</div>
						</div>
					</div>
{% endblock %}