aboutsummaryrefslogtreecommitdiff
path: root/bridges/HotUKDealsBridge.php
blob: 7450c6f03b32e2db02dde984f6324d13f9486e9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php

class HotUKDealsBridge extends PepperBridgeAbstract
{
    const NAME = 'HotUKDeals bridge';
    const URI = 'https://www.hotukdeals.com/';
    const DESCRIPTION = 'Return the HotUKDeals search result using keywords';
    const MAINTAINER = 'sysadminstory';
    const PARAMETERS = [
        'Search by keyword(s))' => [
            'q' => [
                'name' => 'Keyword(s)',
                'type' => 'text',
                'exampleValue' => 'lamp',
                'required' => true
            ],
            'hide_expired' => [
                'name' => 'Hide expired deals',
                'type' => 'checkbox',
            ],
            'hide_local' => [
                'name' => 'Hide local deals',
                'type' => 'checkbox',
                'title' => 'Hide deals in physical store',
            ],
            'priceFrom' => [
                'name' => 'Minimal Price',
                'type' => 'text',
                'title' => 'Minmal Price in Pounds',
                'required' => false
            ],
            'priceTo' => [
                'name' => 'Maximum Price',
                'type' => 'text',
                'title' => 'Maximum Price in Pounds',
                'required' => false
            ],
        ],

        'Deals per group' => [
            'group' => [
                'name' => 'Group',
                'type' => 'text',
                'exampleValue' => 'broadband',
                'title' => 'Group name in the URL : The group name that must be entered is present after "https://www.hotukdeals.com/tag/" and before any "?".
Example: If the URL of the group displayed in the browser is :
https://www.hotukdeals.com/tag/broadband?sortBy=temp
Then enter :
broadband',
            ],
            'subgroups' => [
                'name' => 'category',
                'type' => 'text',
                'exampleValue' => '343563',
                'title' => 'Category number in the URL : The category number that must be entered is present after "groups=" and before any "&".
Example: If the URL of the group displayed in the browser is :
https://www.hotukdeals.com/tag/broadband?groups=343563&sortBy=new
Then enter :
343563',
            ],
            'order' => [
                'name' => 'Order by',
                'type' => 'list',
                'title' => 'Sort order of deals',
                'values' => [
                    'From the most to the least hot deal' => '-hot',
                    'From the most recent deal to the oldest' => '-new',
                ]
            ]
        ],
        'Discussion Monitoring' => [
            'url' => [
                'name' => 'Discussion URL',
                'type' => 'text',
                'required' => true,
                'title' => 'Discussion URL to monitor. Ex: https://www.hotukdeals.com/discussions/title-123',
                'exampleValue' => 'https://www.hotukdeals.com/discussions/the-hukd-lego-thread-3599357',
                ],
            'only_with_url' => [
                'name' => 'Exclude comments without URL',
                'type' => 'checkbox',
                'title' => 'Exclude comments that does not contains URL in the feed',
                'defaultValue' => false,
                ]
            ]


    ];

    public $lang = [
        'bridge-uri' => self::URI,
        'bridge-name' => self::NAME,
        'context-keyword' => 'Search by keyword(s))',
        'context-group' => 'Deals per group',
        'context-talk' => 'Discussion Monitoring',
        'uri-group' => 'tag/',
        'uri-deal' => 'deals/',
        'uri-merchant' => 'search/deals?merchant-id=',
        'image-host' => 'https://images.hotukdeals.com/',
        'request-error' => 'Could not request HotUKDeals',
        'thread-error' => 'Unable to determine the thread ID. Check the URL you entered',
        'currency' => '£',
        'price' => 'Price',
        'shipping' => 'Shipping',
        'origin' => 'Origin',
        'discount' => 'Discount',
        'title-keyword' => 'Search',
        'title-group' => 'Group',
        'title-talk' => 'Discussion Monitoring',
        'deal-type' => 'Deal Type',
        'localdeal' => 'Local deal',
        'context-hot' => '-hot',
        'context-new' => '-new',
    ];
}