Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Juan Santa Cruz
5,596 PointsWould anyone be interested in extending the Fun Fact App?
I was thinking of extending the FunFact app, to use an API of interesting number facts, would anyone be interested in learning how to do this? This is a cool feature which would work perfect with that example since all it has to do is replace the fact array with the API.
I can put my bitbucket branch link if you guys are interested in taking a look and maybe cooperate. I don't think this is an Advance feature, but some general knowledge is required. If anyone is interested in taking a look let me know.
1 Answer
Stone Preston
42,016 Pointsim not sure an API is what you are really looking for. I think you want more of a backend database such as one provided by Parse.com, which you can add facts to and then pull from the data base within the app. the build a self destructing message app android course covers using parse.com as a backend for an app. you should look into that. If you are a pro member there is also the using parse.com as a backend workshop.
essentially you would create a table of facts in your backend, then just pull down all the facts and store them in an array in your app. This way to add more facts all you have to do is add them to your database, you dont have to change your code at all.
Juan Santa Cruz
5,596 PointsJuan Santa Cruz
5,596 PointsThanks for answering, but yes I do mean using a backend API which could be found here http://numbersapi.com/.
I can integrate a RESTful API which can pull the random number fact from that API. Just thought it would be a neat idea since there are many RESTful API's out there that one can use.
Stone Preston
42,016 PointsStone Preston
42,016 Pointsahhh i see. sorry I misunderstood. didnt really know that existed
Stone Preston
42,016 PointsStone Preston
42,016 Pointsahhh i see. sorry I misunderstood. didnt really know that existed