@@ -66,22 +66,22 @@ func (bc *BanClient) RegisterSeller(scraper Scraper) {
66
66
}
67
67
}
68
68
69
- // Add a Scraper to the client, enable the Market with the given shorthand
70
- func (bc * BanClient ) RegisterMarket (scraper Market , shorthand string ) {
69
+ // Add a Scraper to the client, enable the Market with the given name
70
+ func (bc * BanClient ) RegisterMarket (scraper Market , name string ) {
71
71
market := & BaseMarket {}
72
72
market .scraper = scraper
73
- market .info = scraper .InfoForScraper (shorthand )
73
+ market .info = scraper .InfoForScraper (name )
74
74
75
75
// Disable the market itself from providing seller data
76
76
bc .sellerDisabled [scraper .Info ().Shorthand ] = true
77
77
// Disable any vendor side of the split market (not the market itself)
78
- _ , found := bc .vendorDisabled [shorthand ]
78
+ _ , found := bc .vendorDisabled [market . info . Shorthand ]
79
79
if ! found {
80
- bc .vendorDisabled [shorthand ] = true
80
+ bc .vendorDisabled [market . info . Shorthand ] = true
81
81
}
82
82
83
83
// Register
84
- bc .scrapers [shorthand ] = market
84
+ bc .scrapers [market . info . Shorthand ] = market
85
85
}
86
86
87
87
// Add a Scraper to the client, enable the vendor side only (if any)
@@ -103,22 +103,22 @@ func (bc *BanClient) RegisterVendor(scraper Scraper) {
103
103
bc .vendorDisabled [scraper .Info ().Shorthand ] = false
104
104
}
105
105
106
- // Add a Scraper to the client, enable the Trader with the given shorthand
107
- func (bc * BanClient ) RegisterTrader (scraper Trader , shorthand string ) {
106
+ // Add a Scraper to the client, enable the Trader with the given name
107
+ func (bc * BanClient ) RegisterTrader (scraper Trader , name string ) {
108
108
trader := & BaseTrader {}
109
109
trader .scraper = scraper
110
- trader .info = scraper .InfoForScraper (shorthand )
110
+ trader .info = scraper .InfoForScraper (name )
111
111
112
112
// Disable the trader itself from providing vendor data
113
113
bc .vendorDisabled [scraper .Info ().Shorthand ] = true
114
114
// Disable any seller side of the split trader (not the trader itself)
115
- _ , found := bc .sellerDisabled [shorthand ]
115
+ _ , found := bc .sellerDisabled [trader . info . Shorthand ]
116
116
if ! found {
117
- bc .sellerDisabled [shorthand ] = true
117
+ bc .sellerDisabled [trader . info . Shorthand ] = true
118
118
}
119
119
120
120
// Register
121
- bc .scrapers [shorthand ] = trader
121
+ bc .scrapers [trader . info . Shorthand ] = trader
122
122
}
123
123
124
124
// Load inventory and buylist content for each scraper registered in the client
0 commit comments