From 1e83c5fc2bd98087decc049e869cd6ea1b68d50f Mon Sep 17 00:00:00 2001 From: Kenichi Takahashi Date: Wed, 18 Sep 2019 20:40:03 +0900 Subject: [PATCH] Fix mismatched parameter name --- mackerel/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mackerel/client.py b/mackerel/client.py index 27afca1..4e59f66 100644 --- a/mackerel/client.py +++ b/mackerel/client.py @@ -130,7 +130,7 @@ def get_hosts(self, **kwargs): """Get hosts. :param service: Service name - :param roles: Service role + :param role: Service role :param name: Host name """ uri = '/api/v0/hosts.json' @@ -138,8 +138,8 @@ def get_hosts(self, **kwargs): if kwargs.get('service', None): params['service'] = kwargs.get('service') - if kwargs.get('roles', None): - params['roles'] = kwargs.get('roles') + if kwargs.get('role', None): + params['role'] = kwargs.get('role') if kwargs.get('name', None): params['name'] = kwargs.get('name')