Skip to content

Commit

Permalink
Released 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 13, 2022
1 parent cc2690b commit 6e307fd
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 17 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.9.0] - 2022-02-13
### Added
- Function `Get-ShlinkUrl` has new parameter `-TagsMode`, new in Shlink 3.0.0
- Function `Get-ShlinkTags` has new parameter `-SearchTerm`, new in Shlink 3.0.0
Expand Down Expand Up @@ -112,7 +114,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/codaamok/PSShlink/compare/0.8.2..HEAD
[Unreleased]: https://github.com/codaamok/PSShlink/compare/0.9.0..HEAD
[0.9.0]: https://github.com/codaamok/PSShlink/compare/0.8.2..0.9.0
[0.8.2]: https://github.com/codaamok/PSShlink/compare/0.8.1..0.8.2
[0.8.1]: https://github.com/codaamok/PSShlink/compare/0.8.0..0.8.1
[0.8.0]: https://github.com/codaamok/PSShlink/compare/0.7.0..0.8.0
Expand Down
29 changes: 26 additions & 3 deletions docs/Get-ShlinkTags.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Returns the list of all tags used in any short URL, including stats and ordered
## SYNTAX

```
Get-ShlinkTags [[-ShlinkServer] <String>] [[-ShlinkApiKey] <SecureString>] [<CommonParameters>]
Get-ShlinkTags [[-SearchTerm] <String>] [[-ShlinkServer] <String>] [[-ShlinkApiKey] <SecureString>]
[<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -28,8 +29,30 @@ Get-ShlinkTags

Returns the list of all tags used in any short URL, including stats and ordered by name.

### EXAMPLE 2
```
Get-ShlinkTags -SearchTerm "pwsh"
```

Returns the list of all tags used in any short URL, including stats and ordered by name, where those match the term "pwsh" by name of tag.

## PARAMETERS

### -SearchTerm
A query used to filter results by searching for it on the tag name.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

### -ShlinkServer
The URL of your Shlink server (including schema).
For example "https://example.com".
Expand All @@ -42,7 +65,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -59,7 +82,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down
28 changes: 22 additions & 6 deletions docs/Get-ShlinkUrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Get details of all short codes, or just one.

### ListShortUrls (Default)
```
Get-ShlinkUrl [-SearchTerm <String>] [-Tags <String[]>] [-OrderBy <String>] [-StartDate <DateTime>]
[-EndDate <DateTime>] [-ShlinkServer <String>] [-ShlinkApiKey <SecureString>] [<CommonParameters>]
Get-ShlinkUrl [-SearchTerm <String>] [-Tags <String[]>] [-TagsMode <String>] [-OrderBy <String>]
[-StartDate <DateTime>] [-EndDate <DateTime>] [-ShlinkServer <String>] [-ShlinkApiKey <SecureString>]
[<CommonParameters>]
```

### ParseShortCode
Expand Down Expand Up @@ -54,10 +55,10 @@ This is useful if your Shlink instance is responding/creating short URLs for mul

### EXAMPLE 4
```
Get-ShlinkUrl -Tags "oldwebsite", "evenolderwebsite" -OrderBy "dateCreated"
Get-ShlinkUrl -Tags "oldwebsite", "evenolderwebsite" -TagsMode "any" -OrderBy "dateCreated-ASC"
```

Returns short codes which are associated with the tags "oldwebsite" and "evenolderwebsite".
Returns short codes which are associated with the tags "oldwebsite" or "evenolderwebsite".
Ordered by the dateCreated property in ascending order.

### EXAMPLE 5
Expand Down Expand Up @@ -140,9 +141,24 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -TagsMode
Tells how the filtering by tags should work, returning short URLs containing "any" of the tags, or "all" the tags.
It's ignored if no tags are provided, and defaults to "any" if not provided.

```yaml
Type: String
Parameter Sets: ListShortUrls
Aliases:

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

### -OrderBy
Order the results returned by "longUrl", "shortCode", "dateCreated", or "visits".
The default sort order is in ascending order.
Order the results returned by "longUrl-ASC", "longUrl-DESC", "shortCode-ASC", "shortCode-DESC", "dateCreated-ASC", "dateCreated-DESC", "visits-ASC", "visits-DESC", "title-ASC", "title-DESC".

```yaml
Type: String
Expand Down
132 changes: 132 additions & 0 deletions docs/Get-ShlinkVisitsNonOrphan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
external help file: PSShlink-help.xml
Module Name: PSShlink
online version:
schema: 2.0.0
---

# Get-ShlinkVisitsNonOrphan

## SYNOPSIS
Get the list of visits to invalid short URLs, the base URL or any other 404.

## SYNTAX

```
Get-ShlinkVisitsNonOrphan [[-StartDate] <DateTime>] [[-EndDate] <DateTime>] [-ExcludeBots]
[[-ShlinkServer] <String>] [[-ShlinkApiKey] <SecureString>] [<CommonParameters>]
```

## DESCRIPTION
Get the list of visits to invalid short URLs, the base URL or any other 404.

## EXAMPLES

### EXAMPLE 1
```
Get-ShlinkVisitsOrphan
```

Get the list of visits to invalid short URLs, the base URL or any other 404.

### EXAMPLE 2
```
Get-ShlinkVisitsOrphan -StartDate (Get-Date "2020-11-01") -EndDate (Get-Date "2020-12-01") -ExcludeBots
```

Get the list of visits to invalid short URLs, the base URL or any other 404, for the whole of November and excluding bots/crawlers.

## PARAMETERS

### -StartDate
A datetime object to filter the visit data where the start date is equal or greater than this value.

```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:

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

### -EndDate
A datetime object to filter the visit data where its end date is equal or less than this value.

```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:

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

### -ExcludeBots
Exclude visits from bots or crawlers.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -ShlinkServer
The URL of your Shlink server (including schema).
For example "https://example.com".
It is not required to use this parameter for every use of this function.
When it is used once for any of the functions in the PSShlink module, its value is retained throughout the life of the PowerShell session and its value is only accessible within the module's scope.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

### -ShlinkApiKey
A SecureString object of your Shlink server's API key.
It is not required to use this parameter for every use of this function.
When it is used once for any of the functions in the PSShlink module, its value is retained throughout the life of the PowerShell session and its value is only accessible within the module's scope.

```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
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](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### This function does not accept pipeline input.
## OUTPUTS

### System.Management.Automation.PSObject
## NOTES

## RELATED LINKS
23 changes: 20 additions & 3 deletions docs/Save-ShlinkUrlQrCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Save a QR code to disk for a short code.
### InputObject
```
Save-ShlinkUrlQrCode -InputObject <PSObject[]> [-Path <String>] [-Size <Int32>] [-Format <String>]
[-Margin <Int32>] [-ErrorCorrection <String>] [<CommonParameters>]
[-Margin <Int32>] [-ErrorCorrection <String>] [-RoundBlockSize <Boolean>] [<CommonParameters>]
```

### SpecifyProperties
```
Save-ShlinkUrlQrCode -ShortCode <String> [-Domain <String>] [-Path <String>] [-Size <Int32>] [-Format <String>]
[-Margin <Int32>] [-ErrorCorrection <String>] [-ShlinkServer <String>] [-ShlinkApiKey <SecureString>]
[<CommonParameters>]
[-Margin <Int32>] [-ErrorCorrection <String>] [-RoundBlockSize <Boolean>] [-ShlinkServer <String>]
[-ShlinkApiKey <SecureString>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -181,6 +181,23 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -RoundBlockSize
Allows to disable block size rounding, which might reduce the readability of the QR code, but ensures no extra margin is added.
Possible values are true or false boolean types.
If omitted, the default configuration of your Shlink server is used.

```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:

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

### -ShlinkServer
The URL of your Shlink server (including schema).
For example "https://example.com".
Expand Down
19 changes: 15 additions & 4 deletions src/PSShlink.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Adam Cook (@codaamok)
#
# Generated on: 11/21/2021
# Generated on: 02/13/2022
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'PSShlink.psm1'

# Version number of this module.
ModuleVersion = '0.8.2'
ModuleVersion = '0.9.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -111,8 +111,19 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '# Fixed
- Renamed parameter DoNotValidateUrl to ValidateUrl in comment based help for Set-ShlinkUrl'
ReleaseNotes = '# Added
- Function Get-ShlinkUrl has new parameter -TagsMode, new in Shlink 3.0.0
- Function Get-ShlinkTags has new parameter -SearchTerm, new in Shlink 3.0.0
- New function Get-ShlinkVisitsNonOrphan, new endpoint in Shlink 3.0.0
- New parameter -RoundBlockSize for Save-ShlinkUrlQrCode
# Changed
- Get-ShlinkTags uses the new /tags/stats endpoint to include stats in the data returned. This change is purely internal of the function, does not impact how the function is used or how the data is returned.
- Get-ShlinkDomains now includes two parent properties when data is returned: data and defaultRedirects. In Shlink 2.10.0, this endpoint was updated to include the defaultRedirects property. Previously, all that was returned was everything within the data property.
- New parameter set of possible values for -OrderBy parameter of Get-ShlinkUrl function: longUrl-ASC, longUrl-DESC, shortCode-ASC, shortCode-DESC, dateCreated-ASC, dateCreated-DESC, visits-ASC, visits-DESC, title-ASC, and title-DESC
# Removed
- Function New-ShlinKTag as the endpoint was removed from Shlink REST API in 3.0.0
# Fixed
- Remove-ShlinkTag ShouldProcess prompts listed the entire array of tags passed to it, rather than the current iterable it was working on'

# Prerelease string of this module
# Prerelease = ''
Expand Down

0 comments on commit 6e307fd

Please sign in to comment.