Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help retrieving info from web RSS

Hello fellows. In my opinion, the documentation is very scant and there are basically low to no friendly resources for beginners who want to make apps.

 

The app I want to do is to simply parse an RSS from the web:

 

https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fthreatpost.com%2Ffeed%2F

 

and possibly get the titles and when I click on the title, to get the description.

 

In my understanding I would have to use the messaging libary, parse the RSS on the companion, send a command from the device and then send back the message to the device with the info from the RSS. I think this is really complicated. Is this the right way to do it?

 

I tried parsing the RSS but I get that it cannot do because the length exceeds 8064 bytes or something like that. Cant I just do a simple fetch on the device and not require a companion script?

 

Please enlighten me 🙂

Best Answer
0 Votes
3 REPLIES 3

That's correct. You need to send a message from the device to the companion (or periodically fetch by using the wakeInterval), then use the companion to fetch and parse your RSS, then send data back to the device using messaging or file transfer.

 

The device itself is very resource constrained, and doesn't have a direct internet connection, which is why the processing has to be done in the companion.

 

There are guides for each part of the process, except parsing RSS. For example, here's the communications guides which cover messaging and file transfer: https://dev.fitbit.com/build/guides/communications/

 

You can also find some modules and example apps in our open source repository: https://github.com/Fitbit/ossapps

 

Best Answer
0 Votes

Jon, thanks! The second link is really useful! The fitbit development guide, in my view, still needs a lot of work. 

Best Answer
0 Votes

If you have any specific suggestions, I'd gladly hear them.

Best Answer
0 Votes