PowerShellGallery.psm1

[Cmdletbinding()]
param()

$scriptName = $MyInvocation.MyCommand.Name
Write-Verbose "[$scriptName] Importing subcomponents"

#region - Data import
Write-Verbose "[$scriptName] - [data] - Processing folder"
$dataFolder = (Join-Path $PSScriptRoot 'data')
Write-Verbose "[$scriptName] - [data] - [$dataFolder]"
Get-ChildItem -Path "$dataFolder" -Recurse -Force -Include '*.psd1' -ErrorAction SilentlyContinue | ForEach-Object {
    Write-Verbose "[$scriptName] - [data] - [$($_.Name)] - Importing"
    New-Variable -Name $_.BaseName -Value (Import-PowerShellDataFile -Path $_.FullName) -Force
    Write-Verbose "[$scriptName] - [data] - [$($_.Name)] - Done"
}

Write-Verbose "[$scriptName] - [data] - Done"
#endregion - Data import

#region - From public
Write-Verbose "[$scriptName] - [public] - Processing folder"

#region - From public/Get-PSGalleryAPI.ps1
Write-Verbose "[$scriptName] - [public/Get-PSGalleryAPI.ps1] - Importing"

function Get-PSGalleryAPI {
    $response = Invoke-RestMethod -Method Get -Uri https://www.powershellgallery.com/api/v2/ -ContentType 'application/json'
}

Write-Verbose "[$scriptName] - [public/Get-PSGalleryAPI.ps1] - Done"
#endregion - From public/Get-PSGalleryAPI.ps1

Write-Verbose "[$scriptName] - [public] - Done"
#endregion - From public

Export-ModuleMember -Function 'Get-PSGalleryAPI' -Cmdlet '' -Variable '' -Alias '*'