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 Google Play Services Interacting with Your API Display Loading and Error States

aimensasi
aimensasi
11,343 Points

I receive a failure call?

The call is made but I still receive a failure.

I have the same problem. I did everything exactly like Huson but it returned failure all the time. Did you solved this problem?

RUIBO LIU
RUIBO LIU
8,051 Points
public static void getActiveListing(Callback<ActiveListings> callback) {
        getApi().activeListings("Shop,Images", callback);
    }

Change the parameters mentioned into "Shop,Images" rather than "Images,Shop" in the video.

Another spelling things you need pay attention to is "listings/active". The plural form of "listing".

I am getting an error message: Unable to resolve host "openapi.etsy.com": No address associated with hostname

If I copy and paste the final url (found on the RetrofitError) into the chrome it works just fine...

Turns out my laptop was running low on memory restarted it and it works just fine.

2 Answers

aimensasi
aimensasi
11,343 Points

yes I did, make sure the endpoint is correct(spelling). if it did not work try to make the call using OkHttp, it is much easer.

Sachin Jayaram
Sachin Jayaram
5,461 Points

Etsy.java file: setEndpoint("https://openapi.etsy.com/v2")

make sure its https and not http.