def get_shifts(self, params={}):
param_list = [(k, params[k]) for k in sorted(params)]<EOL>url = "<STR_LIT>" % urlencode(param_list)<EOL>data = self._get_resource(url)<EOL>shifts = []<EOL>locations = {}<EOL>sites = {}<EOL>positions = {}<EOL>users = {}<EOL>for entry in data.get("<STR_LIT>", []):<EOL><INDENT>location = Locations.location_from_json(entry)<EOL>locations[location.location_id] = location<EOL><DEDENT>for entry in data.get("<STR_LIT>", []):<EOL><INDENT>site = Sites.site_from_json(entry)<EOL>sites[site.site_id] = site<EOL><DEDENT>for entry in data.get("<STR_LIT>", []):<EOL><INDENT>position = Positions.position_from_json(entry)<EOL>positions[position.position_id] = position<EOL><DEDENT>for entry in data.get("<STR_LIT>", []):<EOL><INDENT>user = Users.user_from_json(entry)<EOL>users[user.user_id] = user<EOL><DEDENT>for entry in data["<STR_LIT>"]:<EOL><INDENT>shift = self.shift_from_json(entry)<EOL>shifts.append(shift)<EOL><DEDENT>for shift in shifts:<EOL><INDENT>shift.location = locations.get(shift.location_id, None)<EOL>shift.site = sites.get(shift.site_id, None)<EOL>shift.position = positions.get(shift.position_id, None)<EOL>shift.user = users.get(shift.user_id, None)<EOL><DEDENT>return shifts<EOL>
List shifts

http://dev.wheniwork.com/#listing-shifts