Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
thekamilpro committed Nov 20, 2022
1 parent e3c048c commit 6f82b6f
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 1 deletion.
Binary file modified src/KpPwpush.psd1
Binary file not shown.
14 changes: 14 additions & 0 deletions src/public/Connect-Pwpush.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
function Connect-Pwpush
{
<#
.SYNOPSIS
Connects to pwpush server and initialises the module
.DESCRIPTION
This must be first command used before running any other commands from this module. If no parameters are specified,
defaults to pwpush.com server.
.PARAMETER Server
Server to connect to to
.EXAMPLE
Connect-KpPwpush
Connects to https://pwpush.com server
#>


[cmdletbinding()]
param(
[string]$Server = "https://pwpush.com/"
Expand Down
13 changes: 13 additions & 0 deletions src/public/Get-Pwpush.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
function Get-Pwpush
{
<#
.SYNOPSIS
Retrieves a push.
.DESCRIPTION
Retrieves a push including it’s payload and details. If the push is still active, this will burn a view and the transaction will be logged in the push audit log.
.PARAMETER UrlToken
Token of the push
.LINK
https://pwpush.com/api/1.0/passwords/show.en.html
.EXAMPLE
Get-KpPwpush -UrlToken abc123
Retrieves push with token abc123
#>
[cmdletbinding()]
param (
[Parameter(Mandatory)]
Expand Down
13 changes: 13 additions & 0 deletions src/public/Get-PwpushPreview.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
function Get-PwpushPreview
{
<#
.SYNOPSIS
Retrieves the URL of a push.
.DESCRIPTION
Helper endpoint to retrieve the fully qualified secret URL of a push.
.PARAMETER UrlToken
Token of a secret
.LINK
https://pwpush.com/api/1.0/passwords/preview.en.html
.EXAMPLE
Get-KpPwpushPreview -UrlToken 123abc
Retrieves URL for token 123abc
#>
[cmdletbinding()]
param (
[Parameter(Mandatory)]
Expand Down
8 changes: 7 additions & 1 deletion src/public/Invoke-PwpushRequest.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
function Invoke-PwpushRequest
{
<#
.SYNOPSIS
Main function for interacting with pwpush API
.DESCRIPTION
This function takes care of all headers, pagination, body formatting etc. for pwpush api calls.
#>
[cmdletbinding()]
param(
[Parameter(Mandatory)]
Expand All @@ -15,7 +21,7 @@ function Invoke-PwpushRequest

if ( -not ($Script:Connection))
{
Throw "Please connect to Pwpush via Connect-Pwpush"
Throw "Please connect to Pwpush via Connect-KpPwpush"
}

$url = "$($Script:Connection.Server)/$Endpoint"
Expand Down
13 changes: 13 additions & 0 deletions src/public/New-Pwpush.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
function New-Pwpush
{
<#
.SYNOPSIS
Create a new push.
.DESCRIPTION
Create a new push.
.LINK
https://pwpush.com/api/1.0/passwords/create.en.html
.EXAMPLE
New-KpPwpush -Payload mySecret
Creates a new push with payload of mySecret
#>


[cmdletbinding()]
param (
[Parameter(Mandatory)]
Expand Down
13 changes: 13 additions & 0 deletions src/public/Remove-Pwpush.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
function Remove-Pwpush
{
<#
.SYNOPSIS
Expires a push
.DESCRIPTION
Expires a push immediately. Must be authenticated & owner of the push or the push must have been created with deleteable_by_viewer.
.LINK
https://pwpush.com/api/1.0/passwords/destroy.en.html
.PARAMETER UrlToken
Token of a push
.EXAMPLE
Remove-KpPwPush -UrlToken abc123
Expires token abc123
#>
[cmdletbinding()]
param (
[Parameter(Mandatory)]
Expand Down

0 comments on commit 6f82b6f

Please sign in to comment.