-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMeetupPhotos.class.php
60 lines (56 loc) · 1.93 KB
/
MeetupPhotos.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Client for the 'photos' grouping of the Meetup API
*
* @link http://www.meetup.com/meetup_api/docs
*/
class MeetupPhotos extends MeetupApiRequest {
/**
* This method returns comments on meetup photos.
*
* Required parameters:
* photo_id
*
* @link http://www.meetup.com/meetup_api/docs/2/photo_comments/
* @param Array $Parameters
* @return Array
*/
public function getComments( $Parameters ) {
$required_params = array( 'photo_id');
$url = $this->buildUrl( MEETUP_ENDPOINT_PHOTO_COMMENTS, $Parameters, $required_params );
$response = $this->get( $url )->getResponse();
return $response;
}
/**
* This method returns photo albums associated with Meetup groups.
*
* Required parameters:
* event_id | group_id | photo_album_id
*
* @link http://www.meetup.com/meetup_api/docs/2/photo_albums/
* @param Array $Parameters
* @return Array
*/
public function getAlbums( $Parameters ) {
$required_params = array( 'event_id', 'group_id', 'photo_album_id');
$url = $this->buildUrl( MEETUP_ENDPOINT_PHOTO_ALBUMS, $Parameters, $required_params );
$response = $this->get( $url )->getResponse();
return $response['results'];
}
/**
* Returns photos matching the given criteria
*
* Required parameters:
* event_id | group_id | photo_album_id | member_id | photo_id | tagged
*
* @link http://www.meetup.com/meetup_api/docs/2/photo_albums/
* @param <type> $Parameters
* @return <type>
*/
public function getPhotos( $Parameters ) {
$required_params = array( 'event_id', 'group_id', 'photo_album_id', 'member_id', 'photo_id', 'tagged');
$url = $this->buildUrl( MEETUP_ENDPOINT_PHOTOS, $Parameters, $required_params );
$response = $this->get( $url )->getResponse();
return $response['results'];
}
} // end class