Skip to content

Commit 638e199

Browse files
committed
fix: filter other campus students
1 parent 7e029b6 commit 638e199

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require __DIR__ . '/vendor/autoload.php';
66

77
try {
8-
$nim = new Nim('211351143');
8+
$nim = new Nim('231331011');
99

1010
var_dump($nim->dump());
1111
} catch (\Exception $e) {

src/PDDikti.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ private function prepareList()
5252
return;
5353
}
5454

55-
$response = $this->http->request('GET', "api/pencarian/mhs/$this->nim", [
55+
$response = $this->http->request('GET', "api/pencarian/all/WASTUKANCANA%20$this->nim", [
5656
'headers' => $this->headers,
5757
]);
5858
$data = $this->parseResponse($response);
5959

60-
$this->id = $data[0]->id ?? null;
61-
$this->name = $data[0]->nama ?? null;
60+
$this->id = $data->mahasiswa[0]->id ?? null;
61+
$this->name = $data->mahasiswa[0]->nama ?? null;
6262
}
6363

6464
private function prepareDetail()

0 commit comments

Comments
 (0)