Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
def GroupsConnect(options):
    service = groups_service.GroupsService(email=options.admin_user,
                                           domain=options.domain,
                                           password=options.admin_pass)
    service.ProgrammaticLogin()
    return service