< Back

Get-GitHubRateLimit

Sat Jan 18, 2020 9:36 pm

NAME 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





PARAMETERS

-AccessToken <String>

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.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoStatus [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

[PSCustomObject]

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.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-GitHubRateLimit















RELATED LINKS