mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Refactor common header constants and custom media type
This commit is contained in:
@@ -40,3 +40,40 @@ PROCESSING_202_WAIT_TIME = 2
|
||||
# ##############################################################################
|
||||
RES_ETAG = "etag"
|
||||
RES_LAST_MODIFIED = "last-modified"
|
||||
|
||||
# Inspired by https://github.com/google/go-github
|
||||
|
||||
# Headers
|
||||
|
||||
headerRateLimit = "x-ratelimit-limit"
|
||||
headerRateRemaining = "x-ratelimit-remaining"
|
||||
headerRateReset = "x-ratelimit-reset"
|
||||
headerOTP = "X-GitHub-OTP"
|
||||
|
||||
defaultMediaType = "application/octet-stream"
|
||||
|
||||
# Custom media type for preview API
|
||||
|
||||
# https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/
|
||||
mediaTypeStarringPreview = "application/vnd.github.v3.star+json"
|
||||
|
||||
# https://developer.github.com/changes/2016-02-19-source-import-preview-api/
|
||||
mediaTypeImportPreview = "application/vnd.github.barred-rock-preview"
|
||||
|
||||
# https://developer.github.com/changes/2016-05-12-reactions-api-preview/
|
||||
mediaTypeReactionsPreview = "application/vnd.github.squirrel-girl-preview"
|
||||
|
||||
# https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/
|
||||
mediaTypeIntegrationPreview = "application/vnd.github.machine-man-preview+json"
|
||||
|
||||
# https://developer.github.com/changes/2017-01-05-commit-search-api/
|
||||
mediaTypeCommitSearchPreview = "application/vnd.github.cloak-preview"
|
||||
|
||||
# https://developer.github.com/changes/2017-02-28-user-blocking-apis-and-webhook/
|
||||
mediaTypeBlockUsersPreview = "application/vnd.github.giant-sentry-fist-preview+json"
|
||||
|
||||
# https://developer.github.com/changes/2017-07-17-update-topics-on-repositories/
|
||||
mediaTypeTopicsPreview = "application/vnd.github.mercy-preview+json"
|
||||
|
||||
# https://developer.github.com/changes/2018-02-22-label-description-search-preview/
|
||||
mediaTypeLabelDescriptionSearchPreview = "application/vnd.github.symmetra-preview+json"
|
||||
|
||||
Reference in New Issue
Block a user