Skip to content

Commit

Permalink
feat: add node/fees endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dated committed May 9, 2019
1 parent 9ea15b7 commit f201fbc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/API/Node.php
Expand Up @@ -49,4 +49,16 @@ public function configuration(): array
{
return $this->get('node/configuration');
}

/**
* Get the node fee statistics.
*
* @param integer|null $days
*
* @return array
*/
public function fees(integer $days = null): array
{
return $this->get('node/fees', ['query' => ['days' => $days]]);
}
}
8 changes: 8 additions & 0 deletions tests/API/NodeTest.php
Expand Up @@ -46,4 +46,12 @@ public function configuration_calls_correct_url()
return $connection->node()->configuration();
});
}

/** @test */
public function fees_calls_correct_url()
{
$this->assertResponse(2, 'GET', 'node/fees', function ($connection) {
return $connection->node()->fees();
});
}
}

0 comments on commit f201fbc

Please sign in to comment.