Post guest users
https://cybozudev.zendesk.com/hc/ja/articles/202931674#step1

@param array $guests
@return array
549423
public function post(array $guests): array
    {
        $options = ['json' => ['guests' => $guests]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->post(KintoneApi::generateUrl('guests.json'), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
495361
def getGuestList(request):
    '''
    
    '''
    if not (
        request.method == 'POST' and
        request.POST.get('guestlist_id') and
        request.POST.get('event_id') and
        request.user.is_authenticated and
        request.user.has_perm('guestlist.view_guestlist')
    ):
        return JsonResponse({})

    guestList = GuestList.objects.filter(id=request.POST.get('guestlist_id')).first()
    event = Event.objects.filter(id=request.POST.get('event_id')).first()

    if not guestList or not event:
        return JsonResponse({})

    return JsonResponse({
        'names': guestList.getListForEvent(event),
    })
166995
function getUsers(array $filters = array(), array $fields = array())
    {
        $params = array(1, $this->username, $this->password, $filters);
        if (!empty($fields)) {
            $params[] = $fields;
        }

        return $this->sendRequest('wp.getUsers', $params);
    }
776782
public function recipients($users = [])
    {
        if (empty($users)) {
            return $this;
        }
        $model = $this->noInitModel;
        return $this->andWhere([$model->otherGuidAttribute => BaseMongoEntityModel::compositeGUIDs($users)]);
    }
863426
public function set_users(array $users) {
        $this->users = $users;
        $hasbulkops = !empty($this->bulkoperations);
        foreach ($users as $userid=>$user) {
            $user = (array)$user;
            $row = new html_table_row();
            $row->attributes = array('class' => 'userinforow');
            $row->id = 'user_'.$userid;
            $row->cells = array();
            if ($hasbulkops) {
                // Add a checkbox into the first column.
                $input = html_writer::empty_tag('input', array('type' => 'checkbox', 'name' => 'bulkuser[]', 'value' => $userid));
                $row->cells[] = new html_table_cell($input);
            }
            foreach ($this->fields as $field => $label) {
                if (is_array($label)) {
                    $bits = array();
                    foreach (array_keys($label) as $subfield) {
                        if (array_key_exists($subfield, $user)) {
                            $bits[] = html_writer::tag('div', $user[$subfield], array('class'=>'subfield subfield_'.$subfield));
                        }
                    }
                    if (empty($bits)) {
                        $bits[] = '&nbsp;';
                    }
                    $row->cells[] = new html_table_cell(join(' ', $bits));
                } else {
                    if (!array_key_exists($field, $user)) {
                        $user[$field] = '&nbsp;';
                    }
                    $row->cells[] = new html_table_cell($user[$field]);
                }
            }
            $this->data[] = $row;
        }
    }
1123238
public static function generate(array $authors)
    {
        $newAuthors = [];

        foreach ($authors as $author) {
            $newAuthors[] = (object)$author;
        }

        return $newAuthors;
    }
765036
public function getLoginUserGroups($login)
    {
        $groupName = $this->adminGroupConfiguration->getLoginGroupName($login);
        if (empty($groupName)) {
            $groupName = 'guest';
        }

        return $this->getUserGroup("$groupName");
    }
30851
public function display(array $users = [])
    {
        $headers = ['Name', 'Account Name', 'UPN'];

        $data = [];

        array_map(function (User $user) use (&$data) {
            $data[] = [
                'name' => $user->getCommonName(),
                'account_name' => $user->getAccountName(),
                'upn' => $user->getUserPrincipalName(),
            ];
        }, $users);

        $this->table($headers, $data);
    }
501030
protected function createData(array $entries): array
    {
        $rows = [];

        foreach ($entries as $entry) {
            $rows[] = $this->createEntryData($entry);
        }

        return [
            'version' => self::VERSION,
            'columns' => [self::COLUMN_LOG, self::COLUMN_TYPE, self::COLUMN_BACKTRACE],
            'rows' => $rows,
        ];
    }
973572
public function invites()
    {
        $data = [
            'current_user'  => true,
            'field_set_key' => 'news',
        ];

        $invites = $this->get(UrlBuilder::RESOURCE_BOARDS_INVITES, $data);

        return !$invites ? [] : $invites;
    }
769350
public function addGuestActions($guestActions)
    {
        if (!is_array($guestActions)) {
            $guestActions = [$guestActions];
        }

        $this->_guestActions = Hash::merge($this->_guestActions, $guestActions);
    }
914419
public function sync()
    {
        $this->start = microtime(true);
        $websites    = $this->helper->getWebsites();

        foreach ($websites as $website) {
            //check if the guest is mapped and enabled
            $addresbook = $this->helper->getGuestAddressBook($website);
            $guestSyncEnabled = $this->helper->isGuestSyncEnabled($website);
            $apiEnabled = $this->helper->isEnabled($website);
            if ($addresbook && $guestSyncEnabled && $apiEnabled) {
                //sync guests for website
                $this->exportGuestPerWebsite($website);
            }
        }
        if ($this->countGuests) {
            $this->helper->log(
                '----------- Guest sync ----------- : ' .
                gmdate('H:i:s', microtime(true) - $this->start) .
                ', Total synced = ' . $this->countGuests
            );
        }
    }
517317
public function thereAreUsers(TableNode $users)
    {
        $params = $this->getWordpressParameters();

        foreach ($users->getHash() as $user) {
            if (! isset($user['user_pass'])) {
                $user['user_pass'] = $this->getRandomString();
            }

            $this->createUser($user['user_login'], $user['user_email'], $user);

            $params['users'][] = array(
                'roles'    => $this->getUserDataFromUsername('roles', $user['user_login']),
                'username' => $user['user_login'],
                'password' => $user['user_pass'],
            );
        }

        $this->setWordpressParameters($params);
    }
773994
public function contactableAttendees() {
		$attendees = $this->Attendees();
		foreach ($this->stat("registrant_fields") as $field) {
			$attendees = $attendees->where("\"".$field."\" IS NOT NULL");
		}
		return $attendees;
	}
1156591
public static function createArray(array $addresses): array
    {
        $addrs = [];
        foreach ($addresses as $address) {
            $addrs[] = self::create($address);
        }

        return $addrs;
    }
1308498
public function addUsers(ArrayCollection $users)
    {
        foreach ($users as $user) {
            $user->addTeam($this);
            $this->users->add($user);
        }
    }
511937
def configure_hosts!(hosts)
      @hosts_queue = Queue.new
      Array(hosts).each do |host|
        @hosts_queue.push(host)
      end
    end