[tellico] /: Add Amazon API endpoints for BR, AU, IN, MX, and TR

Robby Stephenson null at kde.org
Thu Jan 3 01:31:02 GMT 2019


Git commit c2bf207ce808b579a9e55ac6948dea2b58c9ed59 by Robby Stephenson.
Committed on 02/01/2019 at 19:15.
Pushed by rstephenson into branch 'master'.

Add Amazon API endpoints for BR, AU, IN, MX, and TR

M  +4    -0    ChangeLog
M  +2    -2    doc/configuration.docbook
M  +24   -3    src/fetch/amazonfetcher.cpp
M  +6    -1    src/fetch/amazonfetcher.h

https://commits.kde.org/tellico/c2bf207ce808b579a9e55ac6948dea2b58c9ed59

diff --git a/ChangeLog b/ChangeLog
index 860edc62..c37c0030 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-02  Robby Stephenson  <robby at periapsis.org>
+
+	* Added Amazon sites for BR, AU, IN, MX, and TR.
+
 2018-12-18  Robby Stephenson  <robby at periapsis.org>
 
 	* Released Tellico 3.1.4.
diff --git a/doc/configuration.docbook b/doc/configuration.docbook
index ccbe1b83..5c11486b 100644
--- a/doc/configuration.docbook
+++ b/doc/configuration.docbook
@@ -404,8 +404,8 @@ The <ulink url="http://www.imdb.com">Internet Movie Database</ulink> provides in
 <title>Amazon.com</title>
 
 <para>
-Using the Amazon Web Services, &appname; can search any of nine different international sites operated by <ulink url="http://amazon.com">Amazon.com</ulink> for information: United States, United Kingdom, Germany, Japan,
-France, Canada, China, Spain, and Italy.
+Using the Amazon Web Services, &appname; can search any of 14 different international sites operated by <ulink url="http://amazon.com">Amazon.com</ulink> for information: United States, United Kingdom, Germany, Japan,
+France, Canada, China, Spain, Italy, Brazil, Australia, India, Mexico, and Turkey.
 </para>
 
 <screenshot>
diff --git a/src/fetch/amazonfetcher.cpp b/src/fetch/amazonfetcher.cpp
index c0284999..e64acbde 100644
--- a/src/fetch/amazonfetcher.cpp
+++ b/src/fetch/amazonfetcher.cpp
@@ -71,9 +71,9 @@ using Tellico::Fetch::AmazonFetcher;
 
 // static
 const AmazonFetcher::SiteData& AmazonFetcher::siteData(int site_) {
-  Q_ASSERT(site_>= 0);
-  Q_ASSERT(site_< 10);
-  static SiteData dataVector[9] = {
+  Q_ASSERT(site_ >= 0);
+  Q_ASSERT(site_ < 15);
+  static SiteData dataVector[14] = {
     {
       i18n("Amazon (US)"),
       QUrl(QLatin1String("http://webservices.amazon.com/onca/xml"))
@@ -101,6 +101,21 @@ const AmazonFetcher::SiteData& AmazonFetcher::siteData(int site_) {
     }, {
       i18n("Amazon (Italy)"),
       QUrl(QLatin1String("http://webservices.amazon.it/onca/xml"))
+    }, {
+      i18n("Amazon (Brazil)"),
+      QUrl(QLatin1String("http://webservices.amazon.com.br/onca/xml"))
+    }, {
+      i18n("Amazon (Australia)"),
+      QUrl(QLatin1String("http://webservices.amazon.com.au/onca/xml"))
+    }, {
+      i18n("Amazon (India)"),
+      QUrl(QLatin1String("http://webservices.amazon.in/onca/xml"))
+    }, {
+      i18n("Amazon (Mexico)"),
+      QUrl(QLatin1String("http://webservices.amazon.com.mx/onca/xml"))
+    }, {
+      i18n("Amazon (Turkey)"),
+      QUrl(QLatin1String("http://webservices.amazon.com.tr/onca/xml"))
     }
   };
 
@@ -963,6 +978,12 @@ AmazonFetcher::ConfigWidget::ConfigWidget(QWidget* parent_, const AmazonFetcher*
   m_siteCombo->addItem(i18n("China"), CN);
   m_siteCombo->addItem(i18n("Spain"), ES);
   m_siteCombo->addItem(i18n("Italy"), IT);
+  m_siteCombo->addItem(i18n("Brazil"), BR);
+  m_siteCombo->addItem(i18n("Australia"), AU);
+  m_siteCombo->addItem(i18n("India"), IN);
+  m_siteCombo->addItem(i18n("Mexico"), MX);
+  m_siteCombo->addItem(i18n("Turkey"), TR);
+
   connect(m_siteCombo, SIGNAL(activated(int)), SLOT(slotSetModified()));
   connect(m_siteCombo, SIGNAL(activated(int)), SLOT(slotSiteChanged()));
   l->addWidget(m_siteCombo, row, 1);
diff --git a/src/fetch/amazonfetcher.h b/src/fetch/amazonfetcher.h
index 4002cfff..8c4b9f68 100644
--- a/src/fetch/amazonfetcher.h
+++ b/src/fetch/amazonfetcher.h
@@ -71,7 +71,12 @@ public:
     CA = 5,
     CN = 6,
     ES = 7,
-    IT = 8
+    IT = 8,
+    BR = 9,
+    AU = 10,
+    IN = 11,
+    MX = 12,
+    TR = 13
   };
 
   enum ImageSize {



More information about the kde-doc-english mailing list