public void Login(Credentials credentials) { var body = new RegistrationRequest(credentials); _rest.PostForObjectAsync<RegistrationResponce>("/api/v1/person/sign_in.json", body, r => { if(r.Error == null) { _token = r.Response.api_token; } AuthorizationFinished(this, new AsyncOperationFinishedEventArgs(r.Error)); }); }
public RegistrationRequest(Credentials credentials) { person = new person(); person.email = credentials.UserName; person.password = credentials.Password; }