### Initialize Webling API Client Source: https://github.com/terminal42/webling-api/blob/main/README.md This PHP code demonstrates how to instantiate the Webling API client with subdomain, API key, and API version. It also shows an example of making a GET request to retrieve a member list. ```php $subdomain = 'meinverein'; $apiKey = 'foobar'; $apiVersion = '1'; $client = new Client($subdomain, $apiKey, $apiVersion); // Example call for member list: $client->get('member'); ``` -------------------------------- ### Install webling-api using Composer Source: https://github.com/terminal42/webling-api/blob/main/README.md This snippet shows how to install the webling-api library using Composer, a dependency manager for PHP. ```bash $ composer.phar require terminal42/webling-api ^2.0@dev ``` -------------------------------- ### QueryBuilder: Find member by complex conditions Source: https://github.com/terminal42/webling-api/blob/main/README.md This PHP code example shows how to build a complex query using the QueryBuilder, combining multiple conditions with logical OR operators. It utilizes `group`, `orGroup`, `where`, `isEqualTo`, and `andWhere` methods for query construction. ```php $qb = new QueryBuilder(); $query = $qb ->group( $qb->where('Firstname')->isEqualTo('Max')->andWhere('Lastname')->isEqualTo('Muster') ) ->orGroup( $qb->where('Firstname')->isEqualTo('Muster')->andWhere('Lastname')->isEqualTo('Max') ) ->build() ; ``` -------------------------------- ### Use EntityManager to find all members Source: https://github.com/terminal42/webling-api/blob/main/README.md This PHP code illustrates how to use the EntityManager to fetch and iterate over a list of members. The EntityManager handles lazy loading of member details, providing a more convenient way to work with the API compared to direct calls. ```php $em = EntityManager::createForAccount($subdomain, $apiKey); $entityList = $em->findAll('member'); foreach ($entityList as $member) { echo $member->getId(); echo $member->getProperty('Name'); var_dump($member->getProperties()); // etc. } ``` -------------------------------- ### QueryBuilder: Find member by name Source: https://github.com/terminal42/webling-api/blob/main/README.md This PHP code snippet demonstrates how to use the QueryBuilder to construct a query that finds members by their first and last names. The query is built using chained methods like `where`, `isEqualTo`, and `andWhere`. ```php $qb = new QueryBuilder(); $query = $qb->where('Firstname')->isEqualTo('Max')->andWhere('Lastname')->isEqualTo('Muster')->build(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.