Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
fb0084e8
Commit
fb0084e8
authored
Jan 22, 2021
by
Andreas Heimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limited Discovery endpoints to 10 per page (was 12 before)
parent
6dd7daa7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
21 deletions
+26
-21
src/Repository/SongRepository.php
src/Repository/SongRepository.php
+8
-8
templates/apidocs/gettingstarted/introduction.html.twig
templates/apidocs/gettingstarted/introduction.html.twig
+14
-9
templates/apidocs/open/discovery.html.twig
templates/apidocs/open/discovery.html.twig
+4
-4
No files found.
src/Repository/SongRepository.php
View file @
fb0084e8
...
@@ -24,8 +24,8 @@ class SongRepository extends ServiceEntityRepository
...
@@ -24,8 +24,8 @@ class SongRepository extends ServiceEntityRepository
$qb
$qb
->
where
(
'e.publicationStatus = 0'
)
->
where
(
'e.publicationStatus = 0'
)
->
orderBy
(
'e.uploadDate'
,
'DESC'
)
->
orderBy
(
'e.uploadDate'
,
'DESC'
)
->
setFirstResult
(
1
2
*
$page
)
->
setFirstResult
(
1
0
*
$page
)
->
setMaxResults
(
1
2
);
->
setMaxResults
(
1
0
);
return
$qb
->
getQuery
()
->
getResult
();
return
$qb
->
getQuery
()
->
getResult
();
}
}
...
@@ -35,8 +35,8 @@ class SongRepository extends ServiceEntityRepository
...
@@ -35,8 +35,8 @@ class SongRepository extends ServiceEntityRepository
->
where
(
'e.publicationStatus = 0'
)
->
where
(
'e.publicationStatus = 0'
)
->
orderBy
(
'e.updateDate'
,
'DESC'
)
->
orderBy
(
'e.updateDate'
,
'DESC'
)
->
addOrderBy
(
'e.uploadDate'
,
'DESC'
)
->
addOrderBy
(
'e.uploadDate'
,
'DESC'
)
->
setFirstResult
(
1
2
*
$page
)
->
setFirstResult
(
1
0
*
$page
)
->
setMaxResults
(
1
2
);
->
setMaxResults
(
1
0
);
return
$qb
->
getQuery
()
->
getResult
();
return
$qb
->
getQuery
()
->
getResult
();
}
}
...
@@ -48,8 +48,8 @@ class SongRepository extends ServiceEntityRepository
...
@@ -48,8 +48,8 @@ class SongRepository extends ServiceEntityRepository
->
andWhere
(
'e.uploadDate >= :end'
)
->
andWhere
(
'e.uploadDate >= :end'
)
->
orderBy
(
'e.downloads'
,
'DESC'
)
->
orderBy
(
'e.downloads'
,
'DESC'
)
->
addOrderBy
(
'e.views'
,
'DESC'
)
->
addOrderBy
(
'e.views'
,
'DESC'
)
->
setFirstResult
(
1
2
*
$page
)
->
setFirstResult
(
1
0
*
$page
)
->
setMaxResults
(
1
2
)
->
setMaxResults
(
1
0
)
->
setParameter
(
'begin'
,
new
\DateTime
(
'NOW'
))
->
setParameter
(
'begin'
,
new
\DateTime
(
'NOW'
))
->
setParameter
(
'end'
,
new
\DateTime
(
'-7 days'
));
->
setParameter
(
'end'
,
new
\DateTime
(
'-7 days'
));
return
$qb
->
getQuery
()
->
getResult
();
return
$qb
->
getQuery
()
->
getResult
();
...
@@ -63,8 +63,8 @@ class SongRepository extends ServiceEntityRepository
...
@@ -63,8 +63,8 @@ class SongRepository extends ServiceEntityRepository
->
andWhere
(
'e.uploadDate >= :end'
)
->
andWhere
(
'e.uploadDate >= :end'
)
->
orderBy
(
'e.downloads'
,
'DESC'
)
->
orderBy
(
'e.downloads'
,
'DESC'
)
->
addOrderBy
(
'e.views'
,
'DESC'
)
->
addOrderBy
(
'e.views'
,
'DESC'
)
->
setFirstResult
(
1
2
*
$page
)
->
setFirstResult
(
1
0
*
$page
)
->
setMaxResults
(
1
2
)
->
setMaxResults
(
1
0
)
->
setParameter
(
'begin'
,
new
\DateTime
(
'NOW'
))
->
setParameter
(
'begin'
,
new
\DateTime
(
'NOW'
))
->
setParameter
(
'end'
,
new
\DateTime
(
'-1 month'
));
->
setParameter
(
'end'
,
new
\DateTime
(
'-1 month'
));
return
$qb
->
getQuery
()
->
getResult
();
return
$qb
->
getQuery
()
->
getResult
();
...
...
templates/apidocs/gettingstarted/introduction.html.twig
View file @
fb0084e8
...
@@ -26,29 +26,34 @@
...
@@ -26,29 +26,34 @@
<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
11/28/2020 at 15:05
CEST
This documentation was last updated on
01/22/2021 at 14:58
CEST
</div>
</div>
<div
class=
"card"
>
<div
class=
"card"
>
<h2
class=
"card-title"
>
11/28/2020
</h2>
<h2
class=
"card-title"
>
01/22/2021
</h2>
<ul>
<ul>
<li>
Deprecated the Open Discovery->Popular endpoint
</li>
<li>
Removed the Open Discovery->Popular endpoint
</li>
<li>
Added a link to the main website
</li>
<li>
Added difficulty ratings to songs
</li>
<li>
Added an update hash and update time to songs
</li>
<li>
Renamed Discovery->Hot endpoint to Discovery->HotThisWeek
</li>
<li>
Added Discovery->HotThisMonth endpoint
</li>
<li>
Added Discovery->Updated endpoint
</li>
<li>
Limited the Discovery endpoint outputs to 10 per page (was 12 before)
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"card"
>
<div
class=
"card"
>
<h2
class=
"card-title"
>
11/
02
/2020
</h2>
<h2
class=
"card-title"
>
11/
28
/2020
</h2>
<ul>
<ul>
<li>
Added preferred pronouns for user profiles
</li>
<li>
Deprecated the Open Discovery->Popular endpoint
</li>
<li>
Added a link to the main website
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"card"
>
<div
class=
"card"
>
<h2
class=
"card-title"
>
1
0/14
/2020
</h2>
<h2
class=
"card-title"
>
1
1/02
/2020
</h2>
<ul>
<ul>
<li>
Updated Tournament output
</li>
<li>
Added preferred pronouns for user profiles
</li>
<lI>
Added Playlists
</lI>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
...
templates/apidocs/open/discovery.html.twig
View file @
fb0084e8
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
<div
class=
"card"
id=
"new"
>
<div
class=
"card"
id=
"new"
>
<h2
class=
"card-title"
>
New Songs
</h2>
<h2
class=
"card-title"
>
New Songs
</h2>
<p>
Returns the 1
2
newest songs. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<p>
Returns the 1
0
newest songs. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<table
class=
"table table-bordered"
>
<table
class=
"table table-bordered"
>
<tr>
<tr>
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
<div
class=
"card"
id=
"updated"
>
<div
class=
"card"
id=
"updated"
>
<h2
class=
"card-title"
>
Updated Songs
</h2>
<h2
class=
"card-title"
>
Updated Songs
</h2>
<p>
Returns 1
2
songs that were last updated. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<p>
Returns 1
0
songs that were last updated. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<table
class=
"table table-bordered"
>
<table
class=
"table table-bordered"
>
<tr>
<tr>
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
<div
class=
"card"
id=
"hotThisWeek"
>
<div
class=
"card"
id=
"hotThisWeek"
>
<h2
class=
"card-title"
>
Hot This Week Songs
</h2>
<h2
class=
"card-title"
>
Hot This Week Songs
</h2>
<p>
Returns the 1
2
most popular songs from the last 7 days. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<p>
Returns the 1
0
most popular songs from the last 7 days. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<table
class=
"table table-bordered"
>
<table
class=
"table table-bordered"
>
<tr>
<tr>
...
@@ -321,7 +321,7 @@
...
@@ -321,7 +321,7 @@
<div
class=
"card"
id=
"hotThisMonth"
>
<div
class=
"card"
id=
"hotThisMonth"
>
<h2
class=
"card-title"
>
Hot This Month Songs
</h2>
<h2
class=
"card-title"
>
Hot This Month Songs
</h2>
<p>
Returns the 1
2
most popular songs from the last month. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<p>
Returns the 1
0
most popular songs from the last month. Use
<code
class=
"code"
>
offset
</code>
for pagination.
</p>
<table
class=
"table table-bordered"
>
<table
class=
"table table-bordered"
>
<tr>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment