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 trialFarai Ted Mandoreba
21,518 PointsChallenge Task 3 of 4 Annotate the activeListings method so that it does a GET request on the "/listings/active" path.
Challenge Task 3 of 4 Annotate the activeListings method so that it does a GET request on the "/listings/active" path.
package com.etsy.android.samples.sharesy.api;
import com.etsy.android.samples.sharesy.model.ActiveListings;
import retrofit.Callback;
import retrofit.http.GET;
import retrofit.http.Query;
// YOUR CODE HERE
public interface Api {
@GET("/listings/active")
void activeListings(@Query("includes") String includes
, Callback<ActiveListings> callback);
}
private static Api getApi() {
return new RestAdapter.builder()
setEndpoint("https://openapi.etsy.com/v2"
.build()
.create(Api.class);
}
3 Answers
Lauren Moineau
9,483 PointsHi. We're doing exactly the same thing as in the lesson video here: setting up the query to the API. So your interface code is absolutely correct.
However, the challenge ends here, it's just about the query. We do not need to create an instance and deal with the results of the query here. So just remove the second part of your code (the getApi()
method) and you will be fine.
Hope that helps :)
Farai Ted Mandoreba
21,518 Pointsback again here, whats wrong again here
Challenge Task 2 of 4 Set the type of this Intent as plain text: "text/plain".
MY ANSWER
Intent shareIntent = new Intent(Intent.ACTION_SEND); Intent.putExtra(Intent.EXTRA_TEXT, textToShare); intent.setType("text/plain"); ​
Farai Ted Mandoreba
21,518 Pointsi dont know what was happening, i reached that task 3 and i did exactly what you told me , and for the past 4 days its was giving me errors (bummer), this was the second time i was posting this question, dont know why they were giving me a wrong answer, 'but thanks a lot my friend you are a life saver, thank you so much
Lauren Moineau
9,483 PointsYou're welcome :)
Lauren Moineau
9,483 PointsSometimes having some lines commented out can trigger an error. Maybe it was your case?
Farai Ted Mandoreba
21,518 Pointsyaa maybe, thanks a lot
Gift Nyamapfene
5,409 Pointsimport com.etsy.android.samples.sharesy.model.ActiveListings;
import retrofit.Callback; import retrofit.http.GET; import retrofit.http.Query;
// YOUR CODE HERE
public interface Api { @GET("/listings/active") void activeListings(@Query("includes") String includes , Callback<ActiveListings> callback);
}
Farai Ted Mandoreba
21,518 PointsFarai Ted Mandoreba
21,518 Pointsplease help guys, i have been stuck here for a week, cant seem to figure what this code challenge task 3 is all about ?