Sitze und Rechtsformen aus Zefix API
This commit is contained in:
parent
28661a198a
commit
6d1fcf67b3
|
@ -49,6 +49,8 @@ curl_close($ch);
|
|||
|
||||
function sendAPICommunityRequest(string $username, string $password): string|bool
|
||||
{
|
||||
echo $username;
|
||||
echo $password;
|
||||
// API endpoint
|
||||
$apiUrl = 'https://www.zefix.admin.ch/ZefixPublicREST/api/v1/community';
|
||||
|
||||
|
@ -85,9 +87,7 @@ function sendAPICommunityRequest(string $username, string $password): string|boo
|
|||
|
||||
function communityCSV(string $username, string $password): string {
|
||||
$response = sendAPICommunityRequest($username, $password);
|
||||
echo "TEST";
|
||||
echo $response;
|
||||
echo "TEST3";
|
||||
$communityArray = json_decode($response, true);
|
||||
$csvOutput = 'bfsId,Kanton,Gemeindename,registryOfCommerceId\n';
|
||||
// Create CSV rows
|
||||
|
|
Loading…
Reference in New Issue