View definition

(*AuthorizationsService).GetOrCreateForApp

Defined in github.com/google/go-github/github/authorizations.go

Description

GetOrCreateForApp creates a new authorization for the specified OAuth application, only if an authorization for that application doesn’t already exist for the user.

If a new token is created, the HTTP status code will be "201 Created", and the returned Authorization.Token field will be populated. If an existing token is returned, the status code will be "200 OK" and the Authorization.Token field will be empty.

clientID is the OAuth Client ID with which to create the token.

GitHub API docs: - https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app - https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint

GetOrCreateForApp is referenced in 1 repository

github.com/google/go-github