erland;545019 Wrote: 
> 
> Greg, is there any other information in the miscData structure than
> stocks ? Are there plans for anything else ? 
> Can external plugins add their own items to the miscData structure or
> is it only to the sportsData structure they can add custom items ?
Yes, here's an example with custom content (CTA Bus Tracker) and long
weather forecasts (enabled from SDT settings->long weather frequency). 
Basically there will be a different toplevel key for the content type. 
The next key will be a unique identifier, usually just a unique number.
For each identifier there will be line1, line2, and type items.  Type
can be short or long to indicate if it's a long text screen or a
shorter item.


Code:
--------------------
    {
  'CTABusTracker' => {
  '22' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'NB #8 Halsted - 19 min'
  },
  '21' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'SB #8 Halsted - 16 min'
  },
  '18' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'NB #8 Halsted - 6 min'
  },
  '19' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'SB #8 Halsted - 5 min'
  },
  '17' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'SB #8 Halsted - 3 min'
  },
  '20' => {
  'type' => 'short',
  'line1' => 'CTA Bus Tracker',
  'line2' => 'NB #8 Halsted - 17 min'
  }
  },
  'getLongWeather' => {
  '11' => {
  'type' => 'long',
  'line1' => 'NEXT 6HRS: Mostly sunny',
  'line2' => 'Mostly sunny with temperat
  ures warming into the mid to upper 50s. Winds ESE at 10 to 15 mph.'
  },
  '16' => {
  'type' => 'long',
  'line1' => 'Wednesday',
  'line2' => 'Mostly Cloudy. Highs in th
  e mid 50s and lows in the low 50s.'
  },
  '13' => {
  'type' => 'long',
  'line1' => 'Tonight',
  'line2' => 'Showers early, becoming a
  steady rain overnight. Windy. Low 48┬░. Winds ESE at 20 to 30 
mph. Chance of rai
  n 80%. Rainfall near a half an inch.'
  },
  '12' => {
  'type' => 'long',
  'line1' => 'Today',
  'line2' => 'Sunny skies this morning w
  ill become overcast during the afternoon. High 61┬░. Winds ESE at 
10 to 20 mph.'
  
  },
  '15' => {
  'type' => 'long',
  'line1' => 'Tomorrow night',
  'line2' => 'A few clouds. Low 46┬░. Wi
  nds W at 10 to 20 mph.'
  },
  '14' => {
  'type' => 'long',
  'line1' => 'Tomorrow',
  'line2' => 'A steady rain in the morni
  ng. Showers continuing in the afternoon. High 63┬░. SE winds 
shifting to SW at 2
  0 to 30 mph. Chance of rain 70%. Rainfall around a half an inch.'
  }
  },
  'stocks' => {
  'GLD' => {
  'lastdate' => '5/7/2010',
  'volume' => '1.80M',
  'change' => '0.00',
  'pchange' => '0.00%',
  'name' => 'SPDR Gold Trust',
  'prevclose' => '118.27',
  'ticker' => 'GLD',
  'open' => 'N/A',
  'high' => 'N/A',
  'low' => 'N/A',
  'daychartURL' => 'http://ichart.finance.yahoo
  .com/t?s=GLD',
  'lasttrade' => '118.27',
  'lasttime' => '4:00pm'
  },
  'SIRI' => {
  'lastdate' => '5/7/2010',
  'volume' => '3.11M',
  'change' => '0.00',
  'pchange' => '0.00%',
  'name' => 'Sirius XM Radio I',
  'prevclose' => '1.01',
  'ticker' => 'SIRI',
  'open' => 'N/A',
  'high' => 'N/A',
  'low' => 'N/A',
  'daychartURL' => 'http://ichart.finance.yaho
  o.com/t?s=SIRI',
  'lasttrade' => '1.01',
  'lasttime' => '4:00pm'
  }
  }
  };
  
--------------------


-- 
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