Fetches data from a GitHub API path and returns it in JSON for viewing repository, user, or organization information.