Sailthru_Client::pushContent PHP Method

pushContent() public method

Push a new piece of content to Sailthru, triggering any applicable alerts.
public pushContent ( String $title, String $url, String $date = null, Mixed $tags = null, $vars = [], $options = [] ) : array
$title String
$url String
$date String
$tags Mixed Null for empty values, or String or arrays
return array API result
    public function pushContent($title, $url, $date = null, $tags = null, $vars = [], $options = [])
    {
        $data = $options;
        $data['title'] = $title;
        $data['url'] = $url;
        if (!is_null($tags)) {
            $data['tags'] = is_array($tags) ? implode(",", $tags) : $tags;
        }
        if (!is_null($date)) {
            $data['date'] = $date;
        }
        if (!empty($vars)) {
            $data['vars'] = $vars;
        }
        return $this->apiPost('content', $data);
    }