lib/servicenow/client.rb in servicenow-0.0.2 vs lib/servicenow/client.rb in servicenow-0.0.3

- old
+ new

@@ -21,20 +21,21 @@ @@logger = Logger.new(STDOUT) end end + # TODO: filter password def logger @@logger end def get_changes_by_user(user_id) url = format('%s/change_request', @snow_table_url) query = { sysparm_limit: 10, - sysparm_query: 'active=true^GOTOu_cr_requester.u_name_idLIKE218947' + sysparm_query: "active=true^GOTOu_cr_requester.u_name_idLIKE#{user_id}" } response = send_request(url, query) obj = JSON.parse response.body @@ -60,10 +61,10 @@ def get_change(number) url = format('%s/change_request', @snow_table_url) query = { sysparm_limit: 1, - number: 'CHG0210847' + number: number } response = send_request(url, query) obj = JSON.parse response.body