We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc5542a commit b8ce6c1Copy full SHA for b8ce6c1
nodejs/src/index.ts
@@ -53,7 +53,7 @@ export type HistoryItem = {
53
*/
54
class API {
55
public readonly serverUrl: string
56
- private readonly enterprise: boolean
+ public readonly enterprise: boolean
57
private readonly _fetch: nodeFetchType
58
59
constructor(config: Partial<APIOptions> = {}) {
@@ -181,6 +181,17 @@ class API {
181
return res.body
182
}
183
184
+ async getTeams () {
185
+ let data
186
+ try {
187
+ data = await this.getMe()
188
+ } catch (err) {
189
+ return []
190
+ }
191
+
192
+ return data.teams || []
193
194
195
get fetch() {
196
return this._fetch
197
0 commit comments