<?php
require_once MVROOT."/aggregation_service/feeds/BaseFeed.class.php";

class TNCFeed extends BaseFeed {

	function __construct() {
		parent::__construct('JSON');
	}
	
	public function request($arg) {
		//$path="http://localhost/beatstore";
		$path="http://www.teknclips.com";
		
		$data = parent::request($path."/feed");
		//print_r($data);
		//exit(0);
		
		foreach($data->nodes as $item) {
			$item=$item->node;
			
			parent::import(array(
				'title'=>$item->title,
				'snippet'=>$item->field_preview,
				'tags'=>$item->field_tags,
				'url'=>$path.'/node/'.$item->nid,
				'form_url'=>$path.'/feed/'.$item->nid.'/form',
				'contains_sample'=>$item->field_contains_sample,
				'products'=>explode(', ',$item->field_product),
				'created'=>intval($item->created),
			));
		}
		
	}
	
}

?>