Ability to change the sorting of results #110
-
Hi team, The Discogs API allows for setting the order of the results provided by a few metrics, if so, can you please advise how? if not, can it be added? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @VinylVault You can sort search results by the results = client.search("Master Boot")
print(results[0])
>>> <Artist 5237488 'Master Boot Record'>
results.sort("dateadded", "asc")
print(results[0])
>>> <Release 19894672 'ZZ Top / Bill Wyman / Snowy White / Stevie Ray Vaughan - Blues Rock / The Best Of ZZ Top'> |
Beta Was this translation helpful? Give feedback.
-
user = client.user("username")
releases = user.collection_folders[folder_id].releases
releases.sort("added", "asc")
for release in releases:
print(release.instance_id) List of accepted sort keys for collection folders found here @VinylVault |
Beta Was this translation helpful? Give feedback.
List of accepted sort keys for collection folders found here
@VinylVault
I'll mark this as answered.