SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-26-2019, 10:52 AM
deanm deanm is offline
Sage Aficionado
 
Join Date: Apr 2005
Location: North East, UK
Posts: 293
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
__________________
Darkside: DVB-C x4 DVB-T2 x2 HD-300 x4
Lightside: DVB-C x2 DVB-T2 x4 HD-300 x3
Reply With Quote
  #2  
Old 02-26-2019, 12:51 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by deanm View Post
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.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #3  
Old 02-26-2019, 05:12 PM
deanm deanm is offline
Sage Aficionado
 
Join Date: Apr 2005
Location: North East, UK
Posts: 293
Quote:
Originally Posted by tmiranda View Post
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
__________________
Darkside: DVB-C x4 DVB-T2 x2 HD-300 x4
Lightside: DVB-C x2 DVB-T2 x4 HD-300 x3
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sagex-api / sagex-services v9.1.7.0 stuckless SageTV v9 Customizations 11 03-16-2018 07:13 PM
Sagex API intelligent sort question bnh SageTV v9 Customizations 3 10-27-2017 06:13 PM
Sagex question - turning on extenders wayner SageTV v9 Customizations 9 09-15-2017 07:30 AM
sagex-api Plugin MISSING: sagex-api-FAILED http://ubuntone.com/5NNCHGlywxvXBgRw8B3nMr antplugger SageTV v7 Customizations 10 06-10-2014 01:34 AM


All times are GMT -6. The time now is 03:49 PM.


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