Skip to content

Commit

Permalink
fix(character): rename server attribute to be homeWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidWeb committed Nov 7, 2021
1 parent f3bda9e commit c74514c
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 1,346 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*/

module.exports = {
plugins: ['@typescript-eslint', 'prettier', 'notice'],
plugins: ['@typescript-eslint', 'prettier', 'notice', 'jsdoc'],
extends: [
'eslint:recommended',
'airbnb-typescript',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jsdoc/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
4 changes: 2 additions & 2 deletions docs/api/classes/client_LodestoneClient.default.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Client for interfacing with the Final Fantasy XIV Lodestone.

#### Defined in

[LodestoneClient.ts:53](https://github.com/XIVStats/lodestone/blob/463185d/src/client/LodestoneClient.ts#L53)
[LodestoneClient.ts:53](https://github.com/XIVStats/lodestone/blob/f3bda9e/src/client/LodestoneClient.ts#L53)

## Properties

Expand All @@ -43,4 +43,4 @@ An instance will be generated by default, but as a consumer you can provide your

#### Defined in

[LodestoneClient.ts:49](https://github.com/XIVStats/lodestone/blob/463185d/src/client/LodestoneClient.ts#L49)
[LodestoneClient.ts:49](https://github.com/XIVStats/lodestone/blob/f3bda9e/src/client/LodestoneClient.ts#L49)
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^37.0.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-prettier": "^3.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/client/LodestoneClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export type OnSuccessFunction = (id: number, character?: Character) => void
export type OnErrorFunction = (id: number, error: Error) => void

/**
* Client for interfacing with the Final Fantasy XIV Lodestone
* Client for interfacing with the Final Fantasy XIV Lodestone.
*/
export default class LodestoneClient {
/**
Expand All @@ -50,7 +50,7 @@ export default class LodestoneClient {

cheerioInstance: CheerioAPI

constructor(axiosInstance?: AxiosInstance, cheerioInstance?: CheerioAPI) {
public constructor(axiosInstance?: AxiosInstance, cheerioInstance?: CheerioAPI) {
this.axiosInstance =
axiosInstance ||
Axios.create({
Expand Down
2 changes: 1 addition & 1 deletion src/config/DomConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class DomConfig {
useHtml: true,
transformationFunction: (value: string) => value.split('<br>')[1].split('/')[0].trim(),
},
realm: {
homeWorld: {
selector:
'#character > div.frame__chara.js__toggle_wrapper > a > div.frame__chara__box > p.frame__chara__world',
transformationFunction: (value: string) => value.split('(')[0].trim(),
Expand Down
2 changes: 1 addition & 1 deletion src/entity/Character.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import Level from './Level'
export default class Character implements ICharacter {
constructor(readonly id: number, readonly name: string) {}

server?: string
homeWorld?: string

dataCenter?: string

Expand Down
Loading

0 comments on commit c74514c

Please sign in to comment.