Closed Grunksky closed 2 years ago
In the second one they are just list of the relevant types, look at the docs to see what you can do with them.
Models is a list of the actual types, e.g [tidalapi.media.Track]
In the second one they are just list of the relevant types, look at the docs to see what you can do with them.
Thanks for the reply, however I just can't figure it out. Adding [tidalapi.media.Track]
did allow the command to finish properly, but then what? Should I use the tidal.media.Track.parse_track()
function to get the track info? It appears that the function requires a json_obj
input, but tidalapi.media.Track
doesn't seem to output that.
I only linked the docs mentally, but here they are, the types are clickable so you can see the properties of everything in the output of search.
https://0-7-x--tidalapi.netlify.app/api.html#tidalapi.session.Session.search
Got it! Thanks a bunch for your help. For anyone in the future having a similar problem, here's my code (I'm new to python, so this can probably be cleaned up):
searchres = session.search(query="PutSearchHere", models=[tidalapi.media.Track], limit="1", offset="0")
defined = searchres.get("top_hit")
print(defined.id)
Hello, I'm attempting to use the
session.search()
function on version 0.7.0rc1, however the command only results in an error.Here's a sample of my code:
Here's the output:
However if I change the the
models="Track"
var tomodels=""
the output becomes:I'm really at a loss for ideas, so any insight would be greatly appreciated.