From 89031ec04f9acf965366b36c359e97033ec0c7f7 Mon Sep 17 00:00:00 2001 From: James Bell <64555268+james3304@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:08:48 -0500 Subject: [PATCH 1/2] Adding FCRANK members selector --- freecompany.go | 1 + internal/selectors/freecompany.go | 1 + records.go | 1 + 3 files changed, 3 insertions(+) diff --git a/freecompany.go b/freecompany.go index 204e05d..2166e20 100644 --- a/freecompany.go +++ b/freecompany.go @@ -225,6 +225,7 @@ func (s *Scraper) buildFreeCompanyMembersCollector(output chan *FreeCompanyMembe Name: membersSelectors.Entry.Name.ParseThroughChildren(e)[0], Rank: gcrank.Parse(membersSelectors.Entry.Rank.ParseThroughChildren(e)[0]), RankIcon: membersSelectors.Entry.RankIcon.ParseThroughChildren(e)[0], + FcRank: membersSelectors.Entry.FcRank.ParseThroughChildren(e)[0], } worldDC := membersSelectors.Entry.Server.ParseThroughChildren(e) diff --git a/internal/selectors/freecompany.go b/internal/selectors/freecompany.go index bbef8cf..3d9ff33 100644 --- a/internal/selectors/freecompany.go +++ b/internal/selectors/freecompany.go @@ -45,6 +45,7 @@ type FreeCompanyMemberSelectors struct { ID SelectorInfo `json:"ID"` Name SelectorInfo `json:"NAME"` Rank SelectorInfo `json:"RANK"` + FcRank SelectorInfo `json:"FC_RANK"` RankIcon SelectorInfo `json:"RANK_ICON"` Server SelectorInfo `json:"SERVER"` } `json:"ENTRY"` diff --git a/records.go b/records.go index 4dbba98..a1facdb 100644 --- a/records.go +++ b/records.go @@ -283,6 +283,7 @@ type FreeCompanyMember struct { ID uint32 Name string Rank gcrank.GCRank + FcRank string RankIcon string World string DC string From 422510f785cfd27b7c58c4cc2c24c0089ebfe010 Mon Sep 17 00:00:00 2001 From: James Bell <64555268+james3304@users.noreply.github.com> Date: Fri, 2 Aug 2024 19:24:51 -0500 Subject: [PATCH 2/2] Fix casing --- freecompany.go | 2 +- internal/selectors/freecompany.go | 2 +- records.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freecompany.go b/freecompany.go index 2166e20..7f3cd8b 100644 --- a/freecompany.go +++ b/freecompany.go @@ -225,7 +225,7 @@ func (s *Scraper) buildFreeCompanyMembersCollector(output chan *FreeCompanyMembe Name: membersSelectors.Entry.Name.ParseThroughChildren(e)[0], Rank: gcrank.Parse(membersSelectors.Entry.Rank.ParseThroughChildren(e)[0]), RankIcon: membersSelectors.Entry.RankIcon.ParseThroughChildren(e)[0], - FcRank: membersSelectors.Entry.FcRank.ParseThroughChildren(e)[0], + FCRank: membersSelectors.Entry.FCRank.ParseThroughChildren(e)[0], } worldDC := membersSelectors.Entry.Server.ParseThroughChildren(e) diff --git a/internal/selectors/freecompany.go b/internal/selectors/freecompany.go index 3d9ff33..fd18be9 100644 --- a/internal/selectors/freecompany.go +++ b/internal/selectors/freecompany.go @@ -45,7 +45,7 @@ type FreeCompanyMemberSelectors struct { ID SelectorInfo `json:"ID"` Name SelectorInfo `json:"NAME"` Rank SelectorInfo `json:"RANK"` - FcRank SelectorInfo `json:"FC_RANK"` + FCRank SelectorInfo `json:"FC_RANK"` RankIcon SelectorInfo `json:"RANK_ICON"` Server SelectorInfo `json:"SERVER"` } `json:"ENTRY"` diff --git a/records.go b/records.go index a1facdb..fe0bf2f 100644 --- a/records.go +++ b/records.go @@ -283,7 +283,7 @@ type FreeCompanyMember struct { ID uint32 Name string Rank gcrank.GCRank - FcRank string + FCRank string RankIcon string World string DC string