Skip to content
blobaugh edited this page Dec 26, 2011 · 2 revisions

Meetup Events

This object handles interaction with the events grouping of Meetup API endpoints.

Please visit http://www.meetup.com/meetup_api/docs for more information about the events endpoints

Methods

The following methods are provided for developer use

getOpenEvents( $Parameters)

Returns a listing of all open events fitting the given parameters.

Parameters

The getOpenEvents() method takes as a parameter an associative array of values to pass to the Meetup API.

All possible parameters as well as response values are listed at http://www.meetup.com/meetup_api/docs/2/open_events

at least one of the following parameters is required

  • city
  • country
  • lat
  • lon
  • state
  • text
  • topic
  • zip

Example usage

$m = new MeetupEvents();
$events = $m->getOpenEvents( array( 'zip' => '98115' ));

foreach($events as $e) {
    echo $e['name'] . " at " . date(DATE_W3C, $e['time']/1000) . "<br>";
}

getEvents( $Parameters)

Returns a listing of all events fitting the given parameters.

Parameters

The getEvents() method takes as a parameter an associative array of values to pass to the Meetup API.

All possible parameters as well as response values are listed at http://www.meetup.com/meetup_api/docs/2/events

at least one of the following parameters is required

  • event_id
  • group_id
  • group_urlname
  • member_id
  • venue_id

Example usage

$m = new MeetupEvents();
$events = $m->getEvents( array( 'member_id' => '14508967' ));

foreach($events as $e) {
    echo $e['name'] . " at " . date(DATE_W3C, $e['time']/1000) . "<br>";
}

getEvent( $Id, $Parameters)

Return information on a specific event by id

Parameters

The getEvent() method takes two parameters, and event id and annassociative array of values to pass to the Meetup API.

All possible values for $Parameters as well as response values are listed at http://www.meetup.com/meetup_api/docs/2/event/#get

Example usage

$m = new MeetupEvents();
$event = $m->getEvent('qdjdfcyqcbqb') ;
echo $event['name'] . " at " . $event['venue']['name'];

getEventComments( $Parameters)

Returns a listing of all events comments fitting the given parameters.

Parameters

The getEventComments() method takes as a parameter an associative array of values to pass to the Meetup API.

All possible parameters as well as response values are listed at http://www.meetup.com/meetup_api/docs/2/event_comments/

at least one of the following parameters is required

  • event_id
  • group_id
  • member_id

Example usage

$m = new MeetupEvents();
$comments = $m->getEventComments( array( 'event_id' => 'qdjdfcyqcbqb' ) ) ;

foreach($comments as $c) {
    echo $c['member_name'] . " - " . $c['comment'] . "<br>";
}

getEventRatings( $Parameters)

Returns a listing of all event ratings fitting the given parameters.

Parameters

The getEventRatings() method takes as a parameter an associative array of values to pass to the Meetup API.

All possible parameters as well as response values are listed at http://www.meetup.com/meetup_api/docs/2/event_ratings/

at least one of the following parameters is required

  • event_id

Example usage

$m = new MeetupEvents();
$ratings = $m->getEventRatings( array( 'event_id' => '37429832' ) ) ;

foreach($ratings as $r) {
    echo $r['rating'] . " - " . $r['review'] . "<br>";
}

Development Needed

To conform to the full Meetup API spec the following changes are required:

  • Support POST with postEvent() to allow user to create events from the application
  • Support POST with postEvent( $Id ) to allow user to update events from th application
  • Support DELETE with deleteEvent( $Id ) to all user to delete events
  • Support POST with postComment() to allow user to post event comments
  • Support POST with postEventRating() to allow user to post event ratings
Clone this wiki locally