SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Github Development (http://forums.sagetv.com/forums/forumdisplay.php?f=53)
-   -   Another SageX/API Question (http://forums.sagetv.com/forums/showthread.php?t=65893)

deanm 02-26-2019 10:52 AM

Another SageX/API Question
 
Is it possible to use wildcards with the API?

For example I want to extract the following from the Sage.Propierties file.

epg_data_sources/6667813/unavailable_stations

Using the GetServerProperty API command I get the reply I need.

sagex/api?c=GetServerProperty&1=epg_data_sources/6667813/unavailable_stations&2=Error

But my issue is I need to know the ref number (6667813) for the command to work.

If you cant use wildcards how would I find the ref number? My current work around is to copy the Sage.Properties file and extract the number/line but wanted something a bit more elegant using SageX

Dean

tmiranda 02-26-2019 12:51 PM

Quote:

Originally Posted by deanm (Post 620014)
Is it possible to use wildcards with the API?

For example I want to extract the following from the Sage.Propierties file.

epg_data_sources/6667813/unavailable_stations

Using the GetServerProperty API command I get the reply I need.

sagex/api?c=GetServerProperty&1=epg_data_sources/6667813/unavailable_stations&2=Error

But my issue is I need to know the ref number (6667813) for the command to work.

If you cant use wildcards how would I find the ref number? My current work around is to copy the Sage.Properties file and extract the number/line but wanted something a bit more elegant using SageX

Dean

There are other APIs you can use to get properties that start with a specific item, in your case "epg_data_sources". I don't recall exactly but they are something like GetPropertiesThatAreBanches and GetPropertiesThatAreLeaves. You should look into using those.

deanm 02-26-2019 05:12 PM

Quote:

Originally Posted by tmiranda (Post 620015)
There are other APIs you can use to get properties that start with a specific item, in your case "epg_data_sources". I don't recall exactly but they are something like GetPropertiesThatAreBanches and GetPropertiesThatAreLeaves. You should look into using those.

Thank you for the pointers, yes this resolved my issue.

Cheers

Dean


All times are GMT -6. The time now is 02:06 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.