com.github.jonahwh.tesla_api_client.AuthenticationApi Maven / Gradle / Ivy
package com.github.jonahwh.tesla_api_client;
import com.github.jonahwh.CollectionFormats.*;
import retrofit2.Call;
import retrofit2.http.*;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;
import com.github.jonahwh.tesla_api_client.model.CreateAccessTokenRequest;
import com.github.jonahwh.tesla_api_client.model.CreateAccessTokenResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface AuthenticationApi {
/**
* Get an Access Token
* Performs the login. Takes in an plain text email and password, matching the owner's login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login). Returns a `access_token` which is passed along as a header with all future requests to authenticate the user. You must provide the `Authorization: Bearer {access_token}` header in all other requests. The current client ID and secret are [available here](http://pastebin.com/YiLPDggh)
* @param body (required)
* @return Call<CreateAccessTokenResponse>
*/
@Headers({
"Content-Type:application/json"
})
@POST("oauth/token")
Call createOauthToken(
@retrofit2.http.Body CreateAccessTokenRequest body
);
}