diff --git a/lib/endpoints/employees.rb b/lib/endpoints/employees.rb index 8f64cf7..309cb6f 100644 --- a/lib/endpoints/employees.rb +++ b/lib/endpoints/employees.rb @@ -5,7 +5,7 @@ def initialize(token, id=false) super(token, id) self.uri = @@uri self.uri = id + '/' + @@uri if id - self.uri = self.uri.gsub("//", "/").chomp("/") + self.uri = self.uri.gsub("//", "/") end end end diff --git a/readme.md b/readme.md index bc34513..f209714 100644 --- a/readme.md +++ b/readme.md @@ -330,6 +330,9 @@ client = Wonde::Client.new('TOKEN_GOES_HERE') school = client.school('SCHOOL_ID_GOES_HERE') +# Get single employee +employee = school.employees.get('EMPLOYEE_ID_GOES_HERE') + # Get employees school.employees.all().each do |employee| p employee.forename + ' ' + employee.surname