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 Write a Retrofit interface

Jose Mena
PLUS
Jose Mena
Courses Plus Student 18,978 Points

Empty Interface in Java?

The tasks just asks you to declare an interface called Api, and if I do only this the task does not pass.

If I go ahead and type the interface and a method just like in the video, then task 1 passes, but I had to do all the tasks in Task1 and then there was nothing for me to do in the remaining 3 tasks

I believe this is an error in the Task, but if anyone knows what I was doing wrong I would appreciate it

com/etsy/android/samples/sharesy/api/Api.java
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

1 Answer

Seth Kroger
Seth Kroger
56,413 Points
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 {

}

Typing out the empty interface like that passed the first task just fine. Perhaps you did something a little different it didn't like?

Jose Mena
Jose Mena
Courses Plus Student 18,978 Points

That is what I typed and it wasn't working for me, I ended up doing all of it in the first task. Thank you very much for the response