erland;540975 Wrote: 
> Hmm, looks like it works a bit different than I thought, I thought the
> JSON response was like the sample wetdata structure you attatched to an
> earlier post.
> 
> So if I understand you correctly, SDT will take a formatting string
> with these %* keywords as input in the JSON request and return the
> string expanded to real values ?
> 
Both options are available.  I'm attempting to document all the
available SDT API commands.  My current evolving copy is online at-
http://gregbrown.net/squeeze/sdt-api.htm  It doesn't (yet) include the
% macro call.
> 
> Notifications from the plugin when something changes could be tricky if
> this is the case as the plugin has no idea which formatting string the
> applet uses. So with this solution, we probably need to use polling.
> 
I'm not sure you'll have to go the poll route.  Basically the plugin
updates everything in one batch.  If you subscribe to a notification on
the data state you can update whenever you're notified a data refresh of
everything is complete.
> 
> I think I'd like to have a separate item type for SDT, probably two of
> them:
> - sdttext (which will be configured with a formatting strings as the
> one in your sample code)
> - sdticon (which will return the url, not sure if it needs to take any
> input data)
> (I'm not sure if it's going to be sdticon or sdtimage yet, need to look
> a bit more how they are handled in the Custom Clock code to know what's
> suitable)
> 
> How are icons handled ? 
> If I understand you correctly I can create an url based on a ID ?
> Does the icon need to be rescaled or does it already have the
> appropriate size ?
> 
The JSON includes both an ID and a URL to the filename.  There's a link
to an example in the API url I provided above.
> 
> I think I'd like to take a look at how sports are handled before
> deciding how to do in the generic Custom Clock applet, you can still
> continue your version if you like to but I like to analyze the sport
> data to make sure we can handle it the same way, at least if it uses
> similar structures.
> 
There's a link to an example of the Sports output for MLB on the API
URL above.  It's basically raw currently active game data.  You'll
probably want another API call to retrieve all the teams for each sport
so that a user can pick which ones they want displayed.  I can add that
if desired.
> 
> I wonder what should be displayed in the combobox in the web ui ?
> The %* keywords are pretty cryptical without any documentation that the
> end user can use to know what they means.
> 
> Would be kind of nice if there was a CLI/JSON command which Custom
> Clock Helper could call to get SDT to return a set of predefined
> formatting strings together with the corresponding expanded values,
> this way I could show these in a list box making it a bit easier for
> the user to configure it.
> 
> Or are all SDT users used to these %* keywords so this isn't a big
> issue ?
> How does it work for the Classic/Boom/Transporter, does it come with
> preconfigured formatting strings ? Does the user also have to enter
> these %* keywords ?
> 
SDT displays a table of all the % macro commands when configuring the
display for each player.  The user then enters their desired format
string.  Default formatting strings are provided and vary for different
player types.

I can create another cli command to retrieve all of the % macros and
what they represent.  They haven't changed much, but I have recently
introduced the option for plugins to hook into SDT and add their own.
> 
> Do you have some error messages from the log ?


-- 
GoCubs
------------------------------------------------------------------------
GoCubs's Profile: http://forums.slimdevices.com/member.php?userid=312
View this thread: http://forums.slimdevices.com/showthread.php?t=77864

_______________________________________________
jive mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive

Reply via email to