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

Android Build a Weather App (2015) Hooking Up the Model to the View Wrapping Up

Abhinav Kanoria
Abhinav Kanoria
7,730 Points

Getting treehouse API key

In the Teacher's Notes section of the video 'Wrapping Up' in the course 'Build a Weather App', there is a link to Treehouse Blog API. BUt how do I get the API key and URL so that I can use it in my app?? Because I'll be required to pass this URL in the Request.build.url() method while requesting Treehouse Blog data. Please help! Thanks.

2 Answers

Kourosh Raeen
Kourosh Raeen
23,733 Points

I played around with the Treehouse Blog API the other day to answer someone's question here and as far as I know you don't need a key.

Abhinav Kanoria
Abhinav Kanoria
7,730 Points

So can you tell me how I can access the information on Treehouse Blog API? In the videos, Ben told us that we need to pass a URL. I guess the following line is the URL we need to access the Blog Post data: http://blog.teamtreehouse.com/api/get_recent_summary/?count=20 Am I right?

Kourosh Raeen
Kourosh Raeen
23,733 Points

Yes, that is the URL and you can change the value of the count parameter.

Abhinav Kanoria
Abhinav Kanoria
7,730 Points

What is the count parameter for? The number of Treehouse Blog Posts that I wish to access I believe?

Kourosh Raeen
Kourosh Raeen
23,733 Points

That's correct. That is the number of results that the get_recent_summary method returns.