Skip to content

Commit a15834f

Browse files
committed
feat: implement new filters in search request
Also added a bit of docs~
1 parent 2e95b7a commit a15834f

14 files changed

+438
-437
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
[![CircleCI](https://circleci.com/gh/xivapi/angular-client/tree/master.svg?style=shield)](https://circleci.com/gh/xivapi/angular-client/tree/master)
44

5-
## Api documentation
5+
## Documentation
66

77
Visit https://xivapi.com/docs for documentation about the web api mapped by this client.
88

9+
Further documentation for this library available on documentation website: https://xivapi.github.io/angular-client/
10+
11+
912
## Quick start
1013

1114
Add `XivapiClientModule` to your `AppModule` imports:
@@ -43,7 +46,3 @@ export class FooComponent {
4346
}
4447
}
4548
```
46-
47-
## Documentation
48-
49-
Further documentation available on documentation website: https://xivapi.github.io/angular-client/

src/model/pagination.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
export interface Pagination {
2+
/**
3+
* Current page number.
4+
*/
25
page: number;
6+
7+
/**
8+
* Next page number, equals false if there's no next page (when you're on the last one).
9+
*/
310
page_next: number | boolean;
11+
12+
/**
13+
* Previous page number, equals false if there's no previous page (when you're on the first one)
14+
*/
415
page_prev: number | boolean;
16+
17+
/**
18+
* Total amount of pages.
19+
*/
520
page_total: number;
21+
22+
/**
23+
* Total amount of results in the current page.
24+
*/
625
results: number;
26+
27+
/**
28+
* Current maximum amount of results per page.
29+
*/
730
results_per_page: number;
31+
32+
/**
33+
* Total amount of results.
34+
*/
835
results_total: number;
936
}

src/model/search-algo.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export enum SearchAlgo {
2+
/**
3+
* A very basic wild card, for example: ard would match: b-ard-ing or h-ard etc.
4+
*/
25
WILDCARD = 'wildcard',
36
MULTI_MATCH = 'multi_match',
47
QUERY_STRING = 'query_string',

src/model/search-index.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
/**
2+
* Lists all the indexes one can search on /Search endpoint.
3+
*/
14
export enum SearchIndex {
25
ACHIEVEMENT = 'achievement',
36
ACTION = 'action',
4-
BNPCNAME = 'bnpcname', // Enemies
5-
COMPANION = 'companion', // Minions
6-
ENPCRESIDENT = 'enpcresident', // NPCs
7+
/**
8+
* Enemies index.
9+
*/
10+
BNPCNAME = 'bnpcname',
11+
/**
12+
* Minions index.
13+
*/
14+
COMPANION = 'companion',
15+
/**
16+
* NPCs index.
17+
*/
18+
ENPCRESIDENT = 'enpcresident',
719
EMOTE = 'emote',
820
FATE = 'fate',
921
INSTANCECONTENT = 'instancecontent',
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
11
import { XivapiOptions } from './xivapi-options';
22

3+
/**
4+
* Defines the options to be used for /Character endpoint
5+
*/
36
export interface XivapiCharacterOptions extends XivapiOptions {
7+
/**
8+
* Elements you want on the character.
9+
*
10+
* | Parameters | Details |
11+
* | --- | --- |
12+
* | data | Get basic profile information (including Minions and Mounts) |
13+
* | friends | Get a list of the characters friends |
14+
* | achievements | Get the characters achievements (if they're public) |
15+
* | record | Get record information of the character |
16+
* | gear | Get Gearsets |
17+
*/
418
files?: 'data' | 'friends' | 'achievements' | 'record' | 'gea' [];
19+
20+
/**
21+
* Extends profile and gear data
22+
*
23+
* * For profile, this will include information about Grand Companies, full Minion/Mount information etc.
24+
* * For gear, this will include equipment, dye, materia and glamour item details.
25+
*/
526
extend?: 0 | 1;
27+
28+
/**
29+
* Include characters Free Company information
30+
*/
631
fc?: 0 | 1;
732
}

0 commit comments

Comments
 (0)