diff --git a/bridges/AwwwardsBridge.php b/bridges/AwwwardsBridge.php new file mode 100644 index 00000000000..c1d1d320e57 --- /dev/null +++ b/bridges/AwwwardsBridge.php @@ -0,0 +1,55 @@ +find('li[data-model]') as $site) { + $decode = html_entity_decode($site->attr['data-model'], + ENT_QUOTES, 'utf-8'); + $decode = json_decode($decode, true); + $this->sites[] = $decode; + } + } + + public function collectData() { + $this->fetchSites(); + + Debug::log('Building RSS feed'); + foreach($this->sites as $site) { + $item = array(); + $item['title'] = $site['title']; + $item['timestamp'] = $site['createdAt']; + $item['categories'] = $site['tags']; + + $item['content'] = ''; + $item['uri'] = self::SITEURI . $site['slug']; + + $this->items[] = $item; + + if(count($this->items) >= 10) + break; + } + } +}