Currently developping an autobuild for the docker image of slidev hosted at Docker Hub, I need to compare already built version with npm available version of the module
I have this code :
import requests as curl
def getreleasegh():
url = "https://api.github.com/repos/slidevjs/slidev/tags"
with curl.get(url) as r:
if r.status_code == 200:
j = r.json()
release = j[0]['name']
release.replace("v", "")
return release
def getactualimage():
url = 'https://registry.hub.docker.com/v2/repositories/stig124/slidev/tags/'
with curl.get(url) as r:
if r.status_code == 200:
j = r.json()
image = j['results'][0]['name']
return image
The npm package I want to query the version is @slidev
with every subpackages being the same version tag
I used npms.io
API from a suggestion in this question
Is there any way to query subpackages?
Querying API endpoint for any subpackages (https://api.npms.io/v2/package/@slidev-cli
) return
{"code":"INVALID_PARAMETER","message":"name can only contain URL-friendly characters (\"@slidev-cli\")"}
Querying https://api.npms.io/v2/package/slidev-cli
returns
{"code":"NOT_FOUND","message":"Module not found"}
Is there any way is it possible?