diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a5a3a..41a1000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Expand the admission requirements filter to include the "Admission free with restriction" option. - Support filter reordering based on the `filters` attribute in the search shortcode. -- Support `ids` attribute in the search shortcode. +- Support `ids` attribute in the search shortcode to restrict search results by Campo Keys. +- Support `german-language-skills-for-international-students` attribute in the search shortcode to restrict search results by language skills. +- Support `hide` attribute in the search shortcode to hide the heading (`heading`) or search form (`search`). ### Changed +- Dynamically load degree program search results when selecting checkboxes or typing a search term. - Only the title, subtitle, and field "What is the degree program about?" are indexed for searching. +- Increase timeout limit when synchronizing data from the providing website. ### Fixed diff --git a/docs/degree_programs_search_shortcode.md b/docs/degree_programs_search_shortcode.md index bdaf0f8..7578201 100644 --- a/docs/degree_programs_search_shortcode.md +++ b/docs/degree_programs_search_shortcode.md @@ -17,19 +17,19 @@ See below for a list of supported attributes. ## List of supported filters -| Filter | Description | Accepted values (if used as a pre-applied filter) | -|-------------------------|-------------------------------------------------------------------------|---------------------------------------------------| -| `admission-requirement` | Admission requirements filter | Not available | -| `area-of-study` | Area of study filter | Comma-separated term names | -| `attribute` | Attribute filter | Comma-separated term names | -| `degree` | Degree filter | Comma-separated term names | -| `faculty` | Faculty filter | Comma-separated term names | -| `german-language-skills-for-international-students` | German language skills for international students filter | Comma-separated term names | -| `search` | Search keyword filter (explicitly added by default, no need to include) | Not available | -| `semester` | Semester filter | Comma-separated term names | -| `study-location` | Study location filter | Comma-separated term names | -| `subject-group` | Subject group filter | Comma-separated term names | -| `teaching-language` | Teaching language filter | Comma-separated term names | +| Filter | Description | Accepted values (if used as a pre-applied filter) | +|-----------------------------------------------------|-------------------------------------------------------------------------|---------------------------------------------------| +| `admission-requirement` | Admission requirements filter | Not available | +| `area-of-study` | Area of study filter | Comma-separated term names | +| `attribute` | Attribute filter | Comma-separated term names | +| `degree` | Degree filter | Comma-separated term names | +| `faculty` | Faculty filter | Comma-separated term names | +| `german-language-skills-for-international-students` | German language skills for international students filter | Comma-separated term names | +| `search` | Search keyword filter (explicitly added by default, no need to include) | Not available | +| `semester` | Semester filter | Comma-separated term names | +| `study-location` | Study location filter | Comma-separated term names | +| `subject-group` | Subject group filter | Comma-separated term names | +| `teaching-language` | Teaching language filter | Comma-separated term names | ## List of elements that can be hidden diff --git a/src/Infrastructure/ApiClient/ApiClient.php b/src/Infrastructure/ApiClient/ApiClient.php index ff79323..97b9117 100644 --- a/src/Infrastructure/ApiClient/ApiClient.php +++ b/src/Infrastructure/ApiClient/ApiClient.php @@ -13,14 +13,17 @@ final class ApiClient { private const API_HOST = 'https://meinstudium.fau.de'; - private array $headers; + private array $defaultArgs; public function __construct( private LoggerInterface $logger ) { - $this->headers = [ - 'Accept' => 'application/json', + $this->defaultArgs = [ + 'headers' => [ + 'Accept' => 'application/json', + ], + 'timeout' => 15, ]; } @@ -39,9 +42,7 @@ public function get(string $path, array $queryArgs = [], array $args = []): ?Rem $requestUrl, wp_parse_args( $args, - [ - 'headers' => $this->headers, - ] + $this->defaultArgs ) );