yanyongyu / githubkit

The modern, all-batteries-included GitHub SDK for Python, including rest api, graphql, webhooks, like octokit!
https://yanyongyu.github.io/githubkit/
MIT License
177 stars 25 forks source link

Feature: Add support for REST-API-VERSION based on the used schema #24

Closed netomi closed 1 year ago

netomi commented 1 year ago

This PR is related to #9 and adds a REST-API-VERSION property for each Rest Client (at first I added it to the RestNamespace but that resulted in circular dependencies, maybe another place is better suited?) and adds an appropriate header when doing requests.

Tested this in my own project using githubkit as there are no tests available.

I did not regenerate the classes itself as this would clutter the PR.