Api client for the Packagist Api
npm i @agonyz/packagist-api-client
See Packagist API best practices
// set an userAgent with some sort of contact information
const packagistApi: PackagistApi = new PackagistApi('my-example-implementation - contact: [email protected]');
import PackagistApi from "@agonyz/packagist-api-client";
import {Package} from "@agonyz/packagist-api-client/lib/interfaces";
const packagistApi: PackagistApi = new PackagistApi();
packagistApi.getPackageInfo('agonyz/contao-countdown-bundle')
.then((packageInformation: Package) => console.log(packageInformation));
var packagistApiClient = require("@agonyz/packagist-api-client").default
const packagistApi = new packagistApiClient();
packagistApi.getPackageInfo('agonyz/contao-countdown-bundle')
.then(packageInformation => console.log(packageInformation));