Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Create a composer.json file for your project:
],
"require": {
"gsa/ckan-php-client": "0.*"
},
}
}

Install dependencies:
Expand All @@ -48,7 +48,7 @@ Now you can add the autoloader, and you will have access to the library:

use CKAN\CkanClient;

$apiUrl = 'http://catalog.data.gov/api/3'; // CKAN API URL
$apiUrl = 'http://catalog.data.gov/api/3/'; // CKAN API URL
$apiKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // CKAN API KEY, if needed / or null

$Ckan = new CkanClient($apiUrl, $apiKey);
Expand Down
1 change: 1 addition & 0 deletions src/CKAN/CkanClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class CkanClient
public function __construct($api_url, $api_key = null)
{
$this->api_url = $api_url;
if($this->api_url[-1] !== '/') $this->api_url += '/';
$this->api_key = $api_key;

// Create cURL object.
Expand Down