def get_group_service(username, password, domain): """Construct a Service object and authenticate""" group_service = service.GroupsService(email=username, domain=domain, password=password) group_service.ProgrammaticLogin() return group_service
def _GetGroupsConnection(self): """Gets a Groups Service API connection. Returns: A Groups Service API ClientLogin connection. """ service = groups_service.GroupsService(email=self.admin_user, domain=self.domain, password=self.admin_pass) service.ProgrammaticLogin() return service
def GroupsConnect(options): service = groups_service.GroupsService(email=options.admin_user, domain=options.domain, password=options.admin_pass) service.ProgrammaticLogin() return service