

import requests

_UpperCAmelCase		:       int						    =	"""YOUR API KEY"""





def  __lowerCamelCase     (			UpperCamelCase__       ,							UpperCamelCase__ = giphy_api_key				):







							'''simple docstring'''






							snake_case_          =   '+'.join(query.split()				)
							snake_case_          =   F'''https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}'''
							snake_case_          =   requests.get(UpperCamelCase__				).json()['data']
							return [gif["url"] for gif in gifs]


if __name__ == "__main__":
					print("""\n""".join(get_gifs("""space ship""")))







from __future__ import annotations

import os
from typing import Any

import requests

_UpperCAmelCase		:       int						    =	"""https://api.github.com"""

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
_UpperCAmelCase		:       Dict						    =	BASE_URL + """/user"""

# https://github.com/settings/tokens
_UpperCAmelCase		:       Optional[Any]						    =	os.environ.get("""USER_TOKEN""", """""")





def  __lowerCamelCase     (			UpperCamelCase__				):







							'''simple docstring'''






							snake_case_          =   {
							    'Authorization': F'''token {auth_token}''',
							    'Accept': 'application/vnd.github.v3+json',
							}
							return requests.get(UpperCamelCase__       ,							headers=UpperCamelCase__				).json()


if __name__ == "__main__":  # pragma: no cover
					if USER_TOKEN:
										for key, value in fetch_github_info(USER_TOKEN).items():
															print(F'''{key}: {value}''')
					else:
										raise ValueError("""'USER_TOKEN' field cannot be empty.""")




