NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Other Clients v
« Previous 1 2 3 4
Programming using v5 commands. How to login?

 
  • 0 Vote(s) - 0 Average
Programming using v5 commands. How to login?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#11
2019-08-05, 06:09 PM
For your usage, pretty much every call needs a "&sid=481e61328cc54915aa67639973969460" type parameter on the url. If it's not on the url, the application falls back to checking the user's session for the sid, which is how the web app appears to make these api calls without explicitly passing it.
drmargarit
Offline

Member

Posts: 184
Threads: 49
Joined: Sep 2013
#12
2019-08-05, 09:00 PM
Ok, thanks for the explanation. Easy enough to add. I was looking at the plugin code and it never adds the sid to any of it's calls that I could see either so I was really confused. I thought that maybe the DoRequest() call added it to the headers or some such.

Next question: some of the calls have a 'random' parameter with a floating point value. Is it truly just a random number and what is it's function?


JLM
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,118
Threads: 957
Joined: May 2006
#13
2019-08-05, 09:06 PM
The DoRequest logic in kodi and in knewc does append the sid and prepend http://ip:port so the calls can focus on the API. If you are planning on using JSON, I would recommend you also have a similar common function so you can also pass the accept:application/json header in the request.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#14
2019-08-05, 09:07 PM
drmargarit Wrote:Ok, thanks for the explanation. Easy enough to add. I was looking at the plugin code and it never adds the sid to any of it's calls that I could see either so I was really confused. I thought that maybe the DoRequest() call added it to the headers or some such.
The plugin code does end up adding it to the url inside DoRequest(). See https://github.com/kodi-pvr/pvr.nextpvr/...equest.cpp

Quote:Next question: some of the calls have a 'random' parameter with a floating point value. Is it truly just a random number and what is it's function?
You don't need it. I should remove these.
drmargarit
Offline

Member

Posts: 184
Threads: 49
Joined: Sep 2013
#15
2019-08-05, 09:54 PM
mvallevand Wrote:The DoRequest logic in kodi and in knewc does append the sid and prepend http://ip:port so the calls can focus on the API. If you are planning on using JSON, I would recommend you also have a similar common function so you can also pass the accept:application/json header in the request.

Martin

Oh no! Do I have to pass inline smiley faces too? Can't find that on stackoverflow....

LOL

JLM
drmargarit
Offline

Member

Posts: 184
Threads: 49
Joined: Sep 2013
#16
2019-08-05, 09:56 PM
Thanks for the info. I really appreciate it. If you need any dental consults, let me know :p

JLM
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode