Back to project page MyTesla.
The source code is released under:
MIT License
If you think the Android project MyTesla listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.myappfactory.tesla.api.clients; //from w w w.j a v a2s.c o m import com.myappfactory.tesla.api.Endpoints; import org.androidannotations.annotations.rest.Accept; import org.androidannotations.annotations.rest.Get; import org.androidannotations.annotations.rest.Post; import org.androidannotations.annotations.rest.Rest; import org.androidannotations.annotations.rest.SetsCookie; import org.androidannotations.api.rest.MediaType; import org.springframework.http.converter.FormHttpMessageConverter; import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.util.LinkedMultiValueMap; @Rest(rootUrl = Endpoints.ROOT_URL, converters = { FormHttpMessageConverter.class, StringHttpMessageConverter.class }) @Accept(MediaType.TEXT_HTML) public interface LoginClient { void setCookie (String name, String value); String getCookie (String name); @Get(Endpoints.LOGIN) @SetsCookie({"_s_portal_session"}) String getLoginForm(); @Post(Endpoints.LOGIN) @SetsCookie({"user_credentials"}) String postLoginForm(LinkedMultiValueMap<String, String> user_session); }