Added Android code
[wl-app.git] / Android / app / src / main / java / com / moiseum / wolnelektury / connection / services / UserService.java
1 package com.moiseum.wolnelektury.connection.services;
2
3 import com.moiseum.wolnelektury.connection.models.OAuthTokenModel;
4 import com.moiseum.wolnelektury.connection.models.UserModel;
5
6 import retrofit2.Call;
7 import retrofit2.http.GET;
8 import retrofit2.http.Headers;
9
10 /**
11  * Created by Piotr Ostrowski on 06.06.2018.
12  */
13 public interface UserService {
14
15         @Headers("Token-Requested: true")
16         @GET("oauth/request_token/")
17         Call<OAuthTokenModel> requestToken();
18
19         @Headers("Token-Requested: true")
20         @GET("oauth/access_token/")
21         Call<OAuthTokenModel> accessToken();
22
23         @Headers("Authentication-Required: true")
24         @GET("username/")
25         Call<UserModel> getUser();
26 }