Skip to content

Get GitHubRateLimit

Howard Wolosky edited this page Oct 5, 2020 · 1 revision

Get-GitHubRateLimit

SYNOPSIS

Gets the current rate limit status for the GitHub API based on the currently configured authentication (Access Token).

SYNTAX

Get-GitHubRateLimit [[-AccessToken] <String>] [<CommonParameters>]

DESCRIPTION

Gets the current rate limit status for the GitHub API based on the currently configured authentication (Access Token).

Use Set-GitHubAuthentication to change your current authentication (Access Token).

The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub

EXAMPLES

EXAMPLE 1

Get-GitHubRateLimit

PARAMETERS

-AccessToken

If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

GitHub.RateLimit

Limits returned are per hour.

The Search API has a custom rate limit, separate from the rate limit

governing the rest of the REST API. The GraphQL API also has a custom

rate limit that is separate from and calculated differently than rate

limits in the REST API.

For these reasons, the Rate Limit API response categorizes your rate limit.

Under resources, you'll see three objects:

The core object provides your rate limit status for all non-search-related resources

in the REST API.

The search object provides your rate limit status for the Search API.

The graphql object provides your rate limit status for the GraphQL API.

Deprecation notice

The rate object is deprecated.

If you're writing new API client code or updating existing code,

you should use the core object instead of the rate object.

The core object contains the same information that is present in the rate object.

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally