Skip to content

Commit 68566e0

Browse files
datedfaustbrian
authored andcommitted
feat: add node/fees endpoint (#42)
1 parent 9ea15b7 commit 68566e0

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/API/Node.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,16 @@ public function configuration(): array
4949
{
5050
return $this->get('node/configuration');
5151
}
52+
53+
/**
54+
* Get the node fee statistics.
55+
*
56+
* @param int|null $days
57+
*
58+
* @return array
59+
*/
60+
public function fees(int $days = null): array
61+
{
62+
return $this->get('node/fees', ['query' => ['days' => $days]]);
63+
}
5264
}

tests/API/NodeTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@ public function configuration_calls_correct_url()
4646
return $connection->node()->configuration();
4747
});
4848
}
49+
50+
/** @test */
51+
public function fees_calls_correct_url()
52+
{
53+
$this->assertResponse(2, 'GET', 'node/fees', function ($connection) {
54+
return $connection->node()->fees();
55+
});
56+
}
4957
}

0 commit comments

Comments
 (0)