Kodi Community Forum
How to get program info with JSON (CLI) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: How to get program info with JSON (CLI) (/showthread.php?tid=365455)



How to get program info with JSON (CLI) - konrul - 2021-11-12

Hello,

I am able to get program EPG info with this code:

Code:
http://192.168.1.12:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "PVR.GetChannelDetails", "params": {"channelid": 4010, "properties" :["broadcastnow"]},"id": 1}]

But I want to use the code with -curl way on SSH (or CLI) 

I will be thankful for your helps.

Edit: I have found the solution

Code:
curl -s --data-binary '{"jsonrpc": "2.0", "method": "PVR.GetBroadcasts", "params": {"channelid": 4010, "properties" :["broadcastnow"]},"id": 1}' -H 'content-type: application/json;' http://192.168.1.12:8080/jsonrpc]


Best wishes!