Skip to content

Commit b01b24a

Browse files
Merge pull request #22 from galeone/master
Add Egypt and Poland regions
2 parents 726374a + eebe2db commit b01b24a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

marketplace.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ const (
1616
LocaleAustralia //Australia
1717
LocaleBrazil //Brazil
1818
LocaleCanada //Canada
19+
LocaleEgypt //Egypt
1920
LocaleFrance //France
2021
LocaleGermany //Germany
2122
LocaleIndia //India
2223
LocaleItaly //Italy
2324
LocaleJapan //Japan
2425
LocaleMexico //Mexico
2526
LocaleNetherlands //Netherlands
27+
LocalePoland //Poland
2628
LocaleSingapore //Singapore
2729
LocaleSaudiArabia //SaudiArabia
2830
LocaleSpain //Spain
@@ -38,13 +40,15 @@ var marketplaceMap = map[MarketplaceEnum]string{
3840
LocaleAustralia: "www.amazon.com.au", //Australia
3941
LocaleBrazil: "www.amazon.com.br", //Brazil
4042
LocaleCanada: "www.amazon.ca", //Canada
43+
LocaleEgypt: "www.amazon.eg", //Egypt
4144
LocaleFrance: "www.amazon.fr", //France
4245
LocaleGermany: "www.amazon.de", //Germany
4346
LocaleIndia: "www.amazon.in", //India
4447
LocaleItaly: "www.amazon.it", //Italy
4548
LocaleJapan: "www.amazon.co.jp", //Japan
4649
LocaleMexico: "www.amazon.com.mx", //Mexico
4750
LocaleNetherlands: "www.amazon.nl", //Netherlands
51+
LocalePoland: "www.amazon.pl", //Poland
4852
LocaleSingapore: "www.amazon.sg", //Singapore
4953
LocaleSaudiArabia: "www.amazon.sa", //SaudiArabia
5054
LocaleSpain: "www.amazon.es", //Spain
@@ -59,13 +63,15 @@ var hostMap = map[MarketplaceEnum]string{
5963
LocaleAustralia: "webservices.amazon.com.au", //Australia
6064
LocaleBrazil: "webservices.amazon.com.br", //Brazil
6165
LocaleCanada: "webservices.amazon.ca", //Canada
66+
LocaleEgypt: "webservices.amazon.eg", //Egypt
6267
LocaleFrance: "webservices.amazon.fr", //France
6368
LocaleGermany: "webservices.amazon.de", //Germany
6469
LocaleIndia: "webservices.amazon.in", //India
6570
LocaleItaly: "webservices.amazon.it", //Italy
6671
LocaleJapan: "webservices.amazon.co.jp", //Japan
6772
LocaleMexico: "webservices.amazon.com.mx", //Mexico
6873
LocaleNetherlands: "webservices.amazon.nl", //Netherlands
74+
LocalePoland: "webservices.amazon.pl", //Poland
6975
LocaleSingapore: "webservices.amazon.sg", //Singapore
7076
LocaleSaudiArabia: "webservices.amazon.sa", //SaudiArabia
7177
LocaleSpain: "webservices.amazon.es", //Spain
@@ -80,13 +86,15 @@ var regionMap = map[MarketplaceEnum]string{
8086
LocaleAustralia: "us-west-2", //Australia
8187
LocaleBrazil: "us-east-1", //Brazil
8288
LocaleCanada: "us-east-1", //Canada
89+
LocaleEgypt: "us-west-1", //Egypt
8390
LocaleFrance: "eu-west-1", //France
8491
LocaleGermany: "eu-west-1", //Germany
8592
LocaleIndia: "eu-west-1", //India
8693
LocaleItaly: "eu-west-1", //Italy
8794
LocaleJapan: "us-west-2", //Japan
8895
LocaleMexico: "us-east-1", //Mexico
8996
LocaleNetherlands: "eu-west-1", //Netherlands
97+
LocalePoland: "eu-west-1", //Poland
9098
LocaleSingapore: "us-west-2", //Singapore
9199
LocaleSaudiArabia: "eu-west-1", //SaudiArabia
92100
LocaleSpain: "eu-west-1", //Spain
@@ -101,13 +109,15 @@ var languageMap = map[MarketplaceEnum]string{
101109
LocaleAustralia: "en_AU", //Australia
102110
LocaleBrazil: "pt_BR", //Brazil
103111
LocaleCanada: "en_CA", //Canada
112+
LocaleEgypt: "ar_EG", //Egypt
104113
LocaleFrance: "fr_FR", //France
105114
LocaleGermany: "de_DE", //Germany
106115
LocaleIndia: "en_IN", //India
107116
LocaleItaly: "it_IT", //Italy
108117
LocaleJapan: "ja_JP", //Japan
109118
LocaleMexico: "es_MX", //Mexico
110119
LocaleNetherlands: "nl_NL", //Netherlands
120+
LocalePoland: "pl_PL", //Poland
111121
LocaleSingapore: "en_SG", //Singapore
112122
LocaleSaudiArabia: "en_AE", //SaudiArabia
113123
LocaleSpain: "es_ES", //Spain

marketplace_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ func TestMarketplace(t *testing.T) {
1414
{name: "www.amazon.com.au", marketplace: LocaleAustralia, str: "www.amazon.com.au", hostName: "webservices.amazon.com.au", region: "us-west-2", language: "en_AU"},
1515
{name: "www.amazon.com.br", marketplace: LocaleBrazil, str: "www.amazon.com.br", hostName: "webservices.amazon.com.br", region: "us-east-1", language: "pt_BR"},
1616
{name: "www.amazon.ca", marketplace: LocaleCanada, str: "www.amazon.ca", hostName: "webservices.amazon.ca", region: "us-east-1", language: "en_CA"},
17+
{name: "www.amazon.eg", marketplace: LocaleEgypt, str: "www.amazon.eg", hostName: "webservices.amazon.eg", region: "us-west-1", language: "ar_EG"},
1718
{name: "www.amazon.fr", marketplace: LocaleFrance, str: "www.amazon.fr", hostName: "webservices.amazon.fr", region: "eu-west-1", language: "fr_FR"},
1819
{name: "www.amazon.de", marketplace: LocaleGermany, str: "www.amazon.de", hostName: "webservices.amazon.de", region: "eu-west-1", language: "de_DE"},
1920
{name: "www.amazon.in", marketplace: LocaleIndia, str: "www.amazon.in", hostName: "webservices.amazon.in", region: "eu-west-1", language: "en_IN"},
2021
{name: "www.amazon.it", marketplace: LocaleItaly, str: "www.amazon.it", hostName: "webservices.amazon.it", region: "eu-west-1", language: "it_IT"},
2122
{name: "www.amazon.co.jp", marketplace: LocaleJapan, str: "www.amazon.co.jp", hostName: "webservices.amazon.co.jp", region: "us-west-2", language: "ja_JP"},
2223
{name: "www.amazon.com.mx", marketplace: LocaleMexico, str: "www.amazon.com.mx", hostName: "webservices.amazon.com.mx", region: "us-east-1", language: "es_MX"},
2324
{name: "www.amazon.nl", marketplace: LocaleNetherlands, str: "www.amazon.nl", hostName: "webservices.amazon.nl", region: "eu-west-1", language: "nl_NL"},
25+
{name: "www.amazon.pl", marketplace: LocalePoland, str: "www.amazon.pl", hostName: "webservices.amazon.pl", region: "eu-west-1", language: "pl_PL"},
2426
{name: "www.amazon.sg", marketplace: LocaleSingapore, str: "www.amazon.sg", hostName: "webservices.amazon.sg", region: "us-west-2", language: "en_SG"},
2527
{name: "www.amazon.sa", marketplace: LocaleSaudiArabia, str: "www.amazon.sa", hostName: "webservices.amazon.sa", region: "eu-west-1", language: "en_AE"},
2628
{name: "www.amazon.es", marketplace: LocaleSpain, str: "www.amazon.es", hostName: "webservices.amazon.es", region: "eu-west-1", language: "es_ES"},

0 commit comments

Comments
 (0)