Get the github user details.
(user, sub_path='')
| 574 | |
| 575 | |
| 576 | def get_user(user, sub_path=''): |
| 577 | """Get the github user details.""" |
| 578 | user = user.replace('@', '') |
| 579 | url = f'https://api.github.com/users/{user}{sub_path}' |
| 580 | response = requests.get(url, auth=_AUTH, headers=HEADERS) |
| 581 | |
| 582 | try: |
| 583 | response_dict = response.json() |
| 584 | except JSONDecodeError: |
| 585 | response_dict = {} |
| 586 | return response_dict |
| 587 | |
| 588 | |
| 589 | def get_notifications(): |