-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMeetupGroups.class.php
44 lines (40 loc) · 1.46 KB
/
MeetupGroups.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Client for the 'groups' grouping of the Meetup API
*
* @link http://www.meetup.com/meetup_api/docs
*/
class MeetupGroups extends MeetupApiRequest {
/**
* Returns all groups matching the given criteria
*
* Required paramters:
* 'campaign_id' | 'domain' | 'group_id' | 'group_urlname' | 'member_id' | 'organizer_id' | 'sponsor_id'
*
* @link http://www.meetup.com/meetup_api/docs/2/groups
* @param Array $Parameters
* @return Array
*/
public function getGroups( $Parameters ) {
$required_params = array( 'campaign_id', 'domain', 'group_id', 'group_urlname', 'member_id', 'organizer_id', 'sponsor_id');
$url = $this->buildUrl( MEETUP_ENDPOINT_GROUPS, $Parameters, $required_params );
$response = $this->get( $url )->getResponse();
return $response['results'];
}
/**
* Returns all comments associated with the given group
*
* Required paramters:
* 'group_id' | 'group_urlname' | 'topic,groupnum'
*
* @link http://www.meetup.com/meetup_api/docs/comments
* @param Array $Parameters
* @return Array
*/
public function getComments( $Parameters ) {
$required_params = array( 'group_id', 'group_urlname', 'topic,groupnum');
$url = $this->buildUrl( MEETUP_ENDPOINT_GROUP_COMMENTS, $Parameters, $required_params );
$response = $this->get( $url )->getResponse();
return $response['results'];
}
} // end class