Go-github: Question: How to get the user id using client

Created on 13 Nov 2016  路  2Comments  路  Source: google/go-github

How to get the current user id if i have this object https://godoc.org/github.com/google/go-github/github#Client

Could not find it in docs.
Please suggest

Let me know the right place to ask this question if this is not the right place.

Most helpful comment

https://godoc.org/github.com/google/go-github/github#UsersService.Get

If you pass an empty string into Get it will return the current authenticated user object.

It might be worthwhile to have a UsersService.GetCurrentUser() method.

All 2 comments

https://godoc.org/github.com/google/go-github/github#UsersService.Get

If you pass an empty string into Get it will return the current authenticated user object.

It might be worthwhile to have a UsersService.GetCurrentUser() method.

@heidmotron Awesome, it worked thanks !

Was this page helpful?
0 / 5 - 0 ratings