From a902fda782e493c4793f29da1e709c1eac61c934 Mon Sep 17 00:00:00 2001 From: Matt Sharpe Date: Sat, 15 Sep 2018 20:30:23 +1000 Subject: [PATCH] fix: fix missing search options * Add Columns and Tags support to global options * Remove overlapping Columns field * Update Column+Tag global option docs #3 --- src/model/xivapi-options.ts | 29 +++++++++++++++++++++++++++++ src/model/xivapi-request-options.ts | 19 ------------------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/model/xivapi-options.ts b/src/model/xivapi-options.ts index fdfdc3f..abd8586 100644 --- a/src/model/xivapi-options.ts +++ b/src/model/xivapi-options.ts @@ -8,4 +8,33 @@ export interface XivapiOptions { * for example: language=fr&string=LeAwsome will search for LeAwesome on the field Name_fr. */ language?: string; + + /** + * Pull specific columns from the data. By default the list just provides the ID, and result provides every column. + * You can request specific pieces of information from a list or result by plugging in the column names. + * For extended content you use dot notation to access it, for example: + * + * To access the data in Items or a search on the Items index, you could request with these columns: + * + * columns=Items.0.Name,Items.1.Name + * If you imagine an array having 50 items, this could be tedious and will eat into your maximum column count. + * You can therefore use a count format, eg: + * + * columns=Items.*50.Name + * This will return 50 rows from the column Items using the index Name + * + * There are restrictions on the number of columns you can query, the column character length and the maximum items. + * By default these are pretty strict so it is recommended to create a Developer App to be provided a key to increase your limits. + */ + columns?: string[]; + + /** + * You can add tracking counters to your app for whatever purpose using "tags". Tags will appear in your dashboard with a counter + * next to them. You can have as many tags you would like and counts will store for a period of 30 days before taping off + * and being removed if they become inactive. + * + * A tag must be alpha numeric and allows dashes and underscores, however this is not checked or validated until it hits XivAPI. + * A GitHub issue to add support for this to TypeScript can be found at https://github.com/Microsoft/TypeScript/issues/6579 + */ + tags?: string[]; } diff --git a/src/model/xivapi-request-options.ts b/src/model/xivapi-request-options.ts index c375402..40ea160 100644 --- a/src/model/xivapi-request-options.ts +++ b/src/model/xivapi-request-options.ts @@ -27,25 +27,6 @@ export interface XivapiRequestOptions extends XivapiOptions { */ ids?: number[]; - /** - * Pull specific columns from the data. By default the list just provides the ID. - * You can request specific pieces of information from a list by plugging in the column names. - * For extended content you use dot notation to access it, for example: - * - * To access the data in Items these you would request the columns: - * - * columns=Items.0.Name,Items.1.Name - * If you imagine an array having 50 items, this could be tedious and will eat into your maximum column count. - * You can therefore use a count format, eg: - * - * columns=Items.*50.Name - * This will return 50 rows from the column Items using the index Name - * - * There are restrictions on the number of columns you can query, the column character length and the maximum items. - * By default these are pretty strict so it is recommended to create a Developer App to be provided a key to increase your limits. - */ - columns?: string[]; - /** * View the current column and schema information of the content. This will provide 2 objects: columns and schema. *