RandomTesting/misctestingMArketAPI.ps1
#this was for testing Function Get-PartPrice { param( [string]$partName ) $partName = "rhino_prime_set" # Replace with the URL-friendly name of the item $headers = @{"Accept-Language" = "en"} $url = "https://api.warframe.market/v1/items/$partName/orders" $response = Invoke-RestMethod -Uri $url -Method Get -Headers $headers $url = "https://api.warframe.market/v1/items/$partName/statistics" $response2 = Invoke-RestMethod -Uri $url -Method Get -Headers $headers $prices = $response.payload.orders $statisticsEndpoint = "statistics" # Construct the full URL for the statistics endpoint $url = "$baseUrl/$itemName/$statisticsEndpoint" # Make the GET request $response = Invoke-WebRequest -Uri $url -Method GET -Headers @{ "Accept-Language" = "en" # Optional: Specify the language for the response } # Convert the JSON response to a PowerShell object $statsData = $response.Content | ConvertFrom-Json # Output the daily average price $dailyStats = $statsData.payload.statistics_live.'48hours' $dailystats | FT } $relicName = "Axi a2" |