PowerShell Reddit API Wrapper
RequiredAssemblies
have been removed$PSDefaultParameterValues
for Invoke-WebRequest
to set -SkipHeaderValidation
if available (for backwards compatibility with 5.1)$PsrawSettings
module scope hashtable variable to house settings such as the session default OAuth token.-PassThru
to return the imported tokenirr
alias to mimic iwr
and irm
aliases.Invoke-WebRequest
error handling logic reworked to support 5.1 and 6.0Script
Name
parameter is no longer Mandatory to simplify connectingScope
parameter has been deprecated and is no longer MandatoryUserAgent
no longer mandatory. default is now PowerShell:PSRAW:2.0 (by /u/markekraus)
-PassThru
to return the tokenCode
and Implicit
parameter sets have been removed.Code
and Implicit
parameters have been removedCode
and Implicit
grants flows have been removedState
parameter has been removed (was only required for Implicit grants)-AccessToken
is no longer mandatory and the default is the session default tokenCode
and Implicit
grants flows have been removed-SetDefault
switch added to set the updated token as the session default token.Get-HttpResponseContentType
to get API response Content-Type
as 6.0 and 5.1 currently house this in different locations.Request-RedditOAuthCode
as it is no needed without Code grant flowRedditOAuthResponse
Request-RedditOAuthTokenCode
as it is not needed without Code grant flowRequest-RedditOAuthTokenImplicit
as it is not needed without Implicit grant flowRedditOAuthResponse
RedditOAuthResponse
Request-RedditOAuthTokenRefresh
as it is no longer needed without Code grant flowShow-RedditOAuthWindow
as it is not compatible with Core (this is why Code and Implicit grant flows are no longer available)Scope
is now hidden as it serves no purpose without Code grant flows.GetAuthorizationUrl()
and _GetAuthorizationUrl()
as they depended on System.Web
(not available in Core) and are not needed without the Code or Implicit grant flows.RedditOAuthResponse
class to abstract the OAuth response from Reddit.RedditOAuthResponse
instead of a PSobject
and the code adjusted to use its propertiesGetRefreshToken()
Removed (not needed without Code grant flow)Refresh()
now takes a RedditOAuthResponse
UpdateRateLimit()
adjusted to support both 5.1 and 6.0 style headers dictionaries.[GUID]:Empty
Response
and ContentObject
are now appropriately typedContentType
property to hold the Content-Type
informationRedditDate
class to handle unix-to-date and date-to-unix translations for dates returned from the API.RedditThing
class to work with "Reddit Things" returned from the Reddit APIRedditModReport
to house moderator reportsRedditUserReport
to house user reportsRedditComment
to house comments.Authorization_Code
, Refresh_Token
, and Implicit
which are not needed without Code and Implicit grant flowsRedditThingKind
to Define "Reddit Thing" "Kind" (their terms, not mine)RedditThingPrefix
to define valid prefixes for "Reddit Things"Everything! This is the initial release of PSRAW so everything is a new feature! Check out the project at https://github.com/markekraus/PSRAW/ and the documentation at https://psraw.readthedocs.io/
This is a "Core Functionality" release. It provides all the components needed to build the rest of the functionality this module will provide. It does not include any of the wrapper functionality, but it is capable of making authenticated API calls in a manner similar to Invoke-WebRequest
Invoke-WebRequest
style.RedditApplication
objects so they can be imported later by Import-RedditApplication
RedditApplication
objects previously exported by Export-RedditApplication
RedditApplication
objects that can be used to request OAuth access to the API.RedditOAuthToken
objects so they can be imported later by Import-RedditPAuthToken
RedditOAuthScope
objects.RedditOAuthToken
objects previously exported by Export-RedditOAuthToken
RedditOAuthToken
objects.RedditOAuthToken
objects and perms refresh or re-grant operations when they expire.PSRAW Classes automatically become available in the calling scope when the module is Imported!
Invoke-RedditRequest
RedditOAuthToken
objectsRequest-RedditOAuthCode
private function used in Code
grant flows for OAuth. Provides a secure means of temporarily storing the Authentication Code.RedditApplication
, the OAuth Access Token and Refresh Token (if present) and used to authenticated to the Reddit API.PSRAW Enums automatically become available in the calling scope when the module is Imported!
RedditApplication
objectsHelp topics are available for all public functions, classes and Enums! Examples:
Get-Help Invoke-RedditRequest
Get-Help about_RedditOAuthToken
Get-Help about_RedditApplicationType
All functions (public and private) and all classes and enums are also documented online at https://psraw.readthedocs.io/
Wait-RedditApiRateLimit
provides Rate Limit cooldown.
The following functions have been added to deal with OAuth Grant flow in the function name
Request-RedditOAuthTokenClient
Request-RedditOAuthTokenCode
Request-RedditOAuthTokenImplicit
Request-RedditOAuthTokenInstalled
Request-RedditOAuthTokenPassword
Request-RedditOAuthTokenRefresh
Get-AuthorizationHeader
provides the rfc2617 Authorization header required by Reddit for OAuth Access Token requests.
Request-RedditOAuthCode
is used to request Authorization codes in `Code grant flows.
Show-RedditOAuthWindows
provides a WinForms
GUI browser for the Grant Flows that require the user to log i to the site and authorize the application.
Everything! This is the initial release of PSRAW so everything is a new feature! Check out the project at https://github.com/markekraus/PSRAW/ and the documentation at https://psraw.readthedocs.io/
This is a "Core Functionality" release. It provides all the components needed to build the rest of the functionality this module will provide. It does not include any of the wrapper functionality, but it is capable of making authenticated API calls in a manner similar to Invoke-WebRequest
Invoke-WebRequest
style.RedditApplication
objects so they can be imported later by Import-RedditApplication
RedditApplication
objects previously exported by Export-RedditApplication
RedditApplication
objects that can be used to request OAuth access to the API.RedditOAuthToken
objects so they can be imported later by Import-RedditPAuthToken
RedditOAuthScope
objects.RedditOAuthToken
objects previously exported by Export-RedditOAuthToken
RedditOAuthToken
objects.RedditOAuthToken
objects and perms refresh or re-grant operations when they expire.PSRAW Classes automatically become available in the calling scope when the module is Imported!
Invoke-RedditRequest
RedditOAuthToken
objectsRequest-RedditOAuthCode
private function used in Code
grant flows for OAuth. Provides a secure means of temporarily storing the Authentication Code.RedditApplication
, the OAuth Access Token and Refresh Token (if present) and used to authenticated to the Reddit API.PSRAW Enums automatically become available in the calling scope when the module is Imported!
RedditApplication
objectsHelp topics are available for all public functions, classes and Enums! Examples:
Get-Help Invoke-RedditRequest
Get-Help about_RedditOAuthToken
Get-Help about_RedditApplicationType
All functions (public and private) and all classes and enums are also documented online at https://psraw.readthedocs.io/
Wait-RedditApiRateLimit
provides Rate Limit cooldown.
The following functions have been added to deal with OAuth Grant flow in the function name
Request-RedditOAuthTokenClient
Request-RedditOAuthTokenCode
Request-RedditOAuthTokenImplicit
Request-RedditOAuthTokenInstalled
Request-RedditOAuthTokenPassword
Request-RedditOAuthTokenRefresh
Get-AuthorizationHeader
provides the rfc2617 Authorization header required by Reddit for OAuth Access Token requests.
Request-RedditOAuthCode
is used to request Authorization codes in `Code grant flows.
Show-RedditOAuthWindows
provides a WinForms
GUI browser for the Grant Flows that require the user to log i to the site and authorize the application.