


$APIendpoint    = 'https://api.curseforge.com'
$APIkey         = '$2a$10$JImTmfu6axMXbi7vPRNZWesM86H83rda4Cs1D7MElzm24XaXBSqYK'
$BaseFileURL    = 'https://www.curseforge.com/minecraft/modpacks/pitek-3-0/files/'




$headers = @{
    'Accept'    = 'application/json'
    'x-api-key' = $APIkey
}

Function Get-CurrentVersion {
    $GetFiles = '/v1/mods/255109/files?pageSize=1'
    $uri = "$APIendpoint$GetFiles"
    $Request = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers -ContentType 'application/json'
    $rData = $Request.data[0]
    $rData
}



#Send-Version
# Body and InFile. Specify either Body or Infile, then retry.
#

Get-CurrentVersion