title: Using Retrofit 2.0 in Android
body: <p>As I am very new to using third-party HTTP libraries for Android like Retrofit, there are a few questions I would like to ask you who could help me.</p>
  
  <p>It seems there recently has been a great change on a transition from Retrofit 1.9 to 2.0, for example the changes on APIs. So I could not find a proper documentations for using the library, even on its own webpage.</p>
  
  <p>When it comes to implementing an HTTP request for registering a user on the server, it seems, according to the webpage, the first thing is to create an interface that defines the role (e.g. POST, GET, etc.). For example:</p>
  
  <pre><code>public interface GitHubService {
    @GET("/users/{user}/repos")
    Call&lt;List&lt;Repo&gt;&gt; listRepos(@Path("user") String user);
  }
  </code></pre>
  
  <p>And it seems I should create a Retrofit instance to connect to the server and use </p>
  
  <pre><code>Retrofit retrofit = new Retrofit.Builder()
      .baseUrl("https://api.github.com")
      .build();
  
  GitHubService service = retrofit.create(GitHubService.class);
  </code></pre>
  
  <p>The things I really would like to find out are,</p>
  
  <ol>
  <li><p>What does Repo in the above generics mean? that's the first thing I still cannot figure out.</p></li>
  <li><p>What should be written in the parenthesis followed by each annotation like @POST or @GET? Does it mean a subdirectory under the server URL? According to the example codes above, does the @GET annotation state that the listRepos method get the user value from the 'user' path or something? This is so confusing..</p></li>
  </ol>
  
  <p>Please, I'm really new to this world, so I'm desperate for your helps. Thanks in advance.</p>