// Path: app/src/main/java/com/knight/arch/model/AccessTokenResponse.java
// public class AccessTokenResponse {
// 
//     private String access_token;
//     private String scope;
//     private String token_type;
// 
//     public String getAccess_token() {
//         return access_token;
//     }
// 
//     public void setAccess_token(String access_token) {
//         this.access_token = access_token;
//     }
// 
//     public String getScope() {
//         return scope;
//     }
// 
//     public void setScope(String scope) {
//         this.scope = scope;
//     }
// 
//     public String getToken_type() {
//         return token_type;
//     }
// 
//     public void setToken_type(String token_type) {
//         this.token_type = token_type;
//     }
// }


import com.knight.arch.model.AccessTokenResponse;
import retrofit.http.Field;
import retrofit.http.FormUrlEncoded;
import retrofit.http.Headers;
import retrofit.http.POST;
import rx.Observable;
package com.knight.arch.api;



/**
 * @author andyiac
 * @date 6/11/23
 * @web http://blog.andyiac.com
 * @github https://github.com/andyiac
 * GitHub Auth Web Application Flow
 */
public interface OAuthGitHubWebFlow {
    //POST https://github.com/login/oauth/access_token

    @Headers({
            "Accept: application/json"
    })
    @FormUrlEncoded
    @POST("/login/oauth/access_token")
// Path: app/src/main/java/com/knight/arch/model/AccessTokenResponse.java
// public class AccessTokenResponse {
// 
//     private String access_token;
//     private String scope;
//     private String token_type;
// 
//     public String getAccess_token() {
//         return access_token;
//     }
// 
//     public void setAccess_token(String access_token) {
//         this.access_token = access_token;
//     }
// 
//     public String getScope() {
//         return scope;
//     }
// 
//     public void setScope(String scope) {
//         this.scope = scope;
//     }
// 
//     public String getToken_type() {
//         return token_type;
//     }
// 
//     public void setToken_type(String token_type) {
//         this.token_type = token_type;
//     }
// }


// Path: app/src/main/java/com/knight/arch/api/OAuthGitHubWebFlow.java
import com.knight.arch.model.AccessTokenResponse;
import retrofit.http.Field;
import retrofit.http.FormUrlEncoded;
import retrofit.http.Headers;
import retrofit.http.POST;
import rx.Observable;

package com.knight.arch.api;



/**
 * @author andyiac
 * @date 6/11/23
 * @web http://blog.andyiac.com
 * @github https://github.com/andyiac
 * GitHub Auth Web Application Flow
 */
public interface OAuthGitHubWebFlow {
    //POST https://github.com/login/oauth/access_token

    @Headers({
            "Accept: application/json"
    })
    @FormUrlEncoded
    @POST("/login/oauth/access_token")
    Observable<AccessTokenResponse> getOAuthToken(@Field("client_id") String client_id,