Skip to content

Commit 317357c

Browse files
committed
fix(lore): added language switch support
1 parent 2556071 commit 317357c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/xivapi.service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@ export class XivapiService {
4444
* Makes a request on a given endpoint with an id.
4545
*
4646
* @param query Text to search inside the lore.
47+
* @param lang
4748
* @param allLanguages should it include Text_*?
4849
* @param dataColumns Additional data you want to fetch.
4950
*/
50-
public searchLore(query: string, allLanguages: boolean = false, dataColumns: string[] = []): Observable<LoreSearchResult> {
51+
public searchLore(query: string, lang: string = 'en', allLanguages: boolean = false,
52+
dataColumns: string[] = []): Observable<LoreSearchResult> {
5153
let httpParams: HttpParams = new HttpParams()
52-
.set('string', query);
54+
.set('string', query)
55+
.set('language', lang);
5356
if (dataColumns && dataColumns.length > 0) {
5457
const columns: string[] = [
5558
'Context',

0 commit comments

Comments
 (0)