@agonyz/packagist-api-client
v1.0.4
Published
API Client for the Packagist API
Downloads
32
Readme
Install
npm i @agonyz/packagist-api-client
Best practices
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]');
Usage
Import
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));
Require
var packagistApiClient = require("@agonyz/packagist-api-client").default
const packagistApi = new packagistApiClient();
packagistApi.getPackageInfo('agonyz/contao-countdown-bundle')
.then(packageInformation => console.log(packageInformation));