async private Task <Authorization> Authorize(NetworkCredential credential, Authorization.AuthorizeRequest authRequest) { var request = CreateRequest("/authorizations"); request.AddAuthorizationCredential(credential); var response = await PostAsJson <Authorization.AuthorizeRequest, Authorization>(request, authRequest); Context.Authorize(response.Result); return(Context.Authorization); }
async public Task<Authorization> Authorize(NetworkCredential credential, IEnumerable<Scopes> scopes, string note = null) { var authRequest = new Authorization.AuthorizeRequest { Scopes = scopes }; if (note != null) authRequest.Note = note; return await Authorize(credential, authRequest); }
async public Task <Authorization> Authorize(NetworkCredential credential, IEnumerable <Scopes> scopes, string note = null) { var authRequest = new Authorization.AuthorizeRequest { Scopes = scopes }; if (note != null) { authRequest.Note = note; } return(await Authorize(credential, authRequest)); }