Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make front page load using API v2.1

  • Loading branch information...
commit ac35bf1183d5a121c449626b3782aefaa6d7028e 1 parent 487158a
@mgdm authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  Controller/Event.php
  2. +4 −4 Model/Collection/Event.php
View
2  Controller/Event.php
@@ -47,4 +47,4 @@ protected function prepareEventData(array $events)
$v->end_date = date('D M dS Y', strtotime($v->end_date));
});
}
-}
+}
View
8 Model/Collection/Event.php
@@ -7,12 +7,12 @@ public function retrieve($filter = 'all', $limit = 10, $page = 1)
{
$events = (array)json_decode(
file_get_contents(
- '../Cache/events.'.$filter.'.json'
-// 'http://api.joind.in/v2/events?format=json&filter='.$filter.'&resultsperpage='.$limit.'&page='.$page
+// '../Cache/events.'.$filter.'.json'
+ 'http://api.joind.in/v2.1/events?format=json&filter='.$filter.'&resultsperpage='.$limit.'&page='.$page
)
);
- $meta = array_pop($events);
+ $meta = array_pop($events);
- return $events;
+ return $events['events'];
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.