Where does a player's playlist get stored?

Apologies if I am asking in the wrong place!
I was looking at the API and I noticed the "getPlaylist" functions only work for saved playlists, and "getNowPlaying" only displays the currently playing track. What I am wondering is, when I add a song to the webapp player's playlist for example, where would I go to access that information? That is, is there a way for me to return whatever the next track is going to be? Or what the previous was?
I would be using this information to script hotkeys to control my player, so maybe I am asking the wrong question. If anyone knows how to interact directly with the webapp (if that's even possible) that would also be cool to know.
Thanks in advance for any help you can offer!
I was looking at the API and I noticed the "getPlaylist" functions only work for saved playlists, and "getNowPlaying" only displays the currently playing track. What I am wondering is, when I add a song to the webapp player's playlist for example, where would I go to access that information? That is, is there a way for me to return whatever the next track is going to be? Or what the previous was?
I would be using this information to script hotkeys to control my player, so maybe I am asking the wrong question. If anyone knows how to interact directly with the webapp (if that's even possible) that would also be cool to know.
Thanks in advance for any help you can offer!