MCPcopy Create free account
hub / github.com/desktop/desktop / fetchAccount

Method fetchAccount

app/src/lib/api.ts:1069–1078  ·  view source on GitHub ↗

Fetch the logged in account.

()

Source from the content-addressed store, hash-verified

1067
1068 /** Fetch the logged in account. */
1069 public async fetchAccount(): Promise<IAPIFullIdentity> {
1070 try {
1071 const response = await this.ghRequest('GET', 'user')
1072 const result = await parsedResponse<IAPIFullIdentity>(response)
1073 return result
1074 } catch (e) {
1075 log.warn(`fetchAccount: failed with endpoint ${this.endpoint}`, e)
1076 throw e
1077 }
1078 }
1079
1080 /** Fetch the current user's emails. */
1081 public async fetchEmails(): Promise<ReadonlyArray<IAPIEmail>> {

Callers 1

fetchUserFunction · 0.95

Calls 2

ghRequestMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected