Skip to content

Commit 178e7fe

Browse files
authored
Merge pull request #74 from marcelhamel/content-api-update
Add inventory param to push_content function
2 parents 22aa39b + efc63b0 commit 178e7fe

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sailthru/sailthru_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def push_content(self, title, url,
386386
description=None, location=None, price=None,
387387
tags=None,
388388
author=None, site_name=None,
389-
spider=None, vars=None):
389+
spider=None, vars=None, inventory=None):
390390

391391
"""
392392
Push a new piece of content to Sailthru.
@@ -407,6 +407,7 @@ def push_content(self, title, url,
407407
@param site_name: site name for the content
408408
@param spider: truthy value to force respidering content
409409
@param vars: replaceable vars dictionary
410+
@param inventory: integer value indicating current item inventory
410411
411412
"""
412413
vars = vars or {}
@@ -422,6 +423,8 @@ def push_content(self, title, url,
422423
data['location'] = date
423424
if price is not None:
424425
data['price'] = price
426+
if inventory is not None:
427+
data['inventory'] = inventory
425428
if description is not None:
426429
data['description'] = description
427430
if site_name is not None:
@@ -789,4 +792,4 @@ def get_last_rate_limit_info(self, action, method):
789792
if (action in self.last_rate_limit_info and method in self.last_rate_limit_info[action]):
790793
return self.last_rate_limit_info[action][method]
791794

792-
return None
795+
return None

0 commit comments

Comments
 (0)