Get GitHubRateLimit - X-Guardian/PowerShellForGitHub GitHub Wiki

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>] [-NoStatus] [-WhatIf] [-Confirm] [<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

-NoStatus

If this switch is specified, long-running commands will run on the main thread with no commandline status update. When not specified, those commands run in the background, enabling the command prompt to provide status information. If not supplied here, the DefaultNoStatus configuration property value will be used.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
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

⚠️ **GitHub.com Fallback** ⚠️