Fetch the logged in account.
()
| 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>> { |