summaryrefslogtreecommitdiffstats
path: root/class
diff options
context:
space:
mode:
Diffstat (limited to 'class')
-rw-r--r--class/FedoraPkgdb.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/class/FedoraPkgdb.php b/class/FedoraPkgdb.php
index afe7adc..9bbdfd5 100644
--- a/class/FedoraPkgdb.php
+++ b/class/FedoraPkgdb.php
@@ -46,13 +46,13 @@ class FedoraPkgdb extends FedoraClient
} else {
$server = 'admin.fedoraproject.org';
}
- parent::__construct("https://$server/pkgdb/api/", $options);
+ parent::__construct("https://$server/pkgdb/", $options);
$rep = $this->cache->get(__METHOD__, $this->url);
if ($rep!==false) {
$this->logDebug(2, __METHOD__."() get from cache");
} else {
- $rep =$this->sendRequest('version');
+ $rep =$this->sendRequest('api/version');
$this->cache->save($rep, __METHOD__, $this->url);
$this->logDebug(2, __METHOD__."() save to cache"
);
@@ -78,7 +78,7 @@ class FedoraPkgdb extends FedoraClient
if ($rep) {
$this->logDebug(2, __METHOD__."() get from cache");
} else {
- $rep =$this->sendRequest('collections');
+ $rep =$this->sendRequest('api/collections');
$this->cache->save($rep, __METHOD__, $this->url);
$this->logDebug(2, __METHOD__."() save to cache");
}
@@ -104,7 +104,7 @@ class FedoraPkgdb extends FedoraClient
function getPackageURL($name)
{
- return $this->url.'acls/name/'.$name;
+ return $this->url.'package/'.urlencode($name);
}
function getPackageInfo($name, $refresh=false)
@@ -115,7 +115,7 @@ class FedoraPkgdb extends FedoraClient
'el6' => 'EL-6',
'epel7' => 'EL-7',
);
- $url='package/'.urlencode($name);
+ $url='api/package/'.urlencode($name);
$rep = ($refresh ? false : $this->cache->get(__METHOD__, $this->url.$url));
if ($rep) {
$this->logDebug(2, __METHOD__."($name) get from cache");
@@ -151,7 +151,7 @@ class FedoraPkgdb extends FedoraClient
function getBranch($name, $refresh=false)
{
if ($this->_version > 0) {
- $url='collections/'.urlencode($name).'/';
+ $url='api/collections/'.urlencode($name).'/';
$rep = ($refresh ? false : $this->cache->get(__METHOD__, $this->url.$url));
if ($rep) {
$this->logDebug(2, __METHOD__."($name) get from cache");
@@ -173,7 +173,7 @@ class FedoraPkgdb extends FedoraClient
function getCritPath($refresh=false)
{
if ($this->_version > 0) {
- $url="critpath";
+ $url="api/critpath";
$rep = ($refresh ? false : $this->cache->get(__METHOD__, $this->url));
if ($rep) {
$this->logDebug(2, __METHOD__."() get from cache");