From d517b0f898c1094ecdcf959e4dd21afd6d5a4cd2 Mon Sep 17 00:00:00 2001 From: Remigiusz Dymecki Date: Thu, 20 Oct 2011 02:32:04 +0200 Subject: [PATCH 1/2] support limit --- indeed/indeed.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indeed/indeed.py b/indeed/indeed.py index dd5ce38..327cd2c 100644 --- a/indeed/indeed.py +++ b/indeed/indeed.py @@ -11,13 +11,14 @@ def __init__(self, publisher_id, **kwargs): self.publisher_id = publisher_id self.base_url = 'http://api.indeed.com/ads/' - def search(self, query=None, location='US', country_code='us'): + def search(self, query=None, location='US', country_code='us', limit=10): action = 'apisearch' query_params = { 'q' : query, 'l' : location, 'co': country_code, + 'limit': limit, 'format' : 'json', 'v' : '2', 'publisher' : self.publisher_id From b2f440ede7523877cbdbd19aa3722ffe2dcd412b Mon Sep 17 00:00:00 2001 From: Remigiusz Dymecki Date: Thu, 20 Oct 2011 03:05:01 +0200 Subject: [PATCH 2/2] highlight support --- indeed/indeed.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indeed/indeed.py b/indeed/indeed.py index 327cd2c..0d7ad41 100644 --- a/indeed/indeed.py +++ b/indeed/indeed.py @@ -11,7 +11,7 @@ def __init__(self, publisher_id, **kwargs): self.publisher_id = publisher_id self.base_url = 'http://api.indeed.com/ads/' - def search(self, query=None, location='US', country_code='us', limit=10): + def search(self, query=None, location='US', country_code='us', limit=10, highlight=True): action = 'apisearch' query_params = { @@ -19,6 +19,7 @@ def search(self, query=None, location='US', country_code='us', limit=10): 'l' : location, 'co': country_code, 'limit': limit, + 'highlight': 1 if highlight else 0, 'format' : 'json', 'v' : '2', 'publisher' : self.publisher_id