augmentedlogic/maven-central-api

PHP client for the maven central REST API

v0.1.0 2023-09-09 16:28 UTC

This package is auto-updated.

Last update: 2025-03-10 13:53:51 UTC


README

PHP client for the maven central REST API

<?php

require_once dirname(__FILE__).'/vendor/autoload.php';

use \com\augmentedlogic\mavencentralapi\MavenCentralClient;
use \com\augmentedlogic\mavencentralapi\Result;

$mcc = new MavenCentralClient();

$results = $mcc->searchByGroupId("com.augmentedlogic.simpleslack");
 foreach($results as $r) {
     print "-- doc --\n";
     print $r->getTimestamp()."\n";
     print $r->getVersion()."\n";
     print $r->getArtifactId()."\n";
     print $r->getWebLink()."\n";
 }

sleep(1);

$results = $mcc->search("log");
 foreach($results as $a) {
     print "-- doc --\n";
     print $r->getTimestamp()."\n";
     print $r->getLatestVersion()."\n";
     print $r->getArtifactId()."\n";
     print $r->getWebLink()."\n";
 }

sleep(1);

$results = $mcc->searchByArtifact("guice");
 foreach($results as $r) {
     print "-- doc --\n";
     print $r->getTimestamp()."\n";
     print $r->getLatestVersion()."\n";
     print $r->getArtifactId()."\n";
     print $r->getWebLink()."\n";
 }