-
Notifications
You must be signed in to change notification settings - Fork 0
Home
glangho edited this page Oct 22, 2018
·
2 revisions
Welcome to the shopwatchj wiki!
The bot is driven by /resources/conf/properties.json. This file will contain the Shopify storefront you want monitored, general configuration settings, and any WatchListeners. Individual WatchListeners settings will be covered in separate pages.
Example
"shop": {
"site": "shop.example.com",
"siteMaps": [
"sitemap_products_1.xml"
],
"parameters": {
"silent": false,
"cycleTime": "30000",
"stockCycleTime": "3600000",
"connectTimeout": "15000",
"socketTimeout": "60000",
"retryAttempts": "5"
}
},
"listeners": [
{
"name": "ExampleListener",
"class": "fully.qualified.class.ExampleListener",
"parameters": {
"exampleParameter": "value"
}
}
]
Shop Parameters:
- shop.site - Host name of the Shopify storefront to be monitored (must match example's format). Required.
- shop.siteMaps - List of sitemap names to track for changes. Can be found by going to the following URL (replace example with the store's name) https://shop.example.com/sitemap.xml. All Shopify storefronts have some variation of https://shop.example.com/sitemap_products_1.xml. Required.
- parameters - Only parameters marked Required are required. Required. parameters.silent - If true the bot will not notify WatchListeners on the initial pull of current inventory. Optional. Default false.
- parameters.cycleTime - Refresh rate (in milliseconds) of monitoring the storefront. Optional. Default 30000.
- parameters.stockCycleTime - Refresh rate (in milliseconds) bot will alert for basic inventory changes (i.e., inventory has gone up or down by 1). Optional. Default 3600000.
- parameters.connectTimeout - Sets the connection timeout (in milliseconds) for HTTP calls. Optional. Default 15000.
- parameters.socketTimeout - Sets the socket timeout (in milliseconds) for HTTP calls. Optional. Default 60000.
- parameters.retryAttempts - Number of attempts made to retry HTTP calls. This includes bad HTTP status codes and timeouts. Optional. Default 5.
- listeners - List of WatchListeners to be used for this monitor. Required.
Listener Parameters:
- name - Name of the Java class. Required.
- class - Fully qualified class name of the WatchListener. Required.
- parameters - Any parameters the WatchListener requires to operate. Required.