You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lastfmapi/api/event.php
+96-41Lines changed: 96 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,48 @@
1
1
<?php
2
-
2
+
/**
3
+
* File that stores api calls for event api calls
4
+
* @package apicalls
5
+
*/
6
+
/**
7
+
* Allows access to the api requests relating to events
8
+
* @package apicalls
9
+
*/
3
10
class lastfmApiEvent extends lastfmApi {
4
-
public$info;
11
+
/**
12
+
* Stores the config values set in the call
13
+
* @access public
14
+
* @var array
15
+
*/
5
16
public$config;
6
-
17
+
/**
18
+
* Stores the auth variables used in all api calls
19
+
* @access private
20
+
* @var array
21
+
*/
7
22
private$auth;
23
+
/**
24
+
* States if the user has full authentication to use api requests that modify data
25
+
* @access private
26
+
* @var boolean
27
+
*/
8
28
private$fullAuth;
9
29
30
+
/**
31
+
* @param array $auth Passes the authentication variables
32
+
* @param array $fullAuth A boolean value stating if the user has full authentication or not
33
+
* @param array $config An array of config variables related to caching and other features
34
+
*/
10
35
function__construct($auth, $fullAuth, $config) {
11
36
$this->auth = $auth;
12
37
$this->fullAuth = $fullAuth;
13
38
$this->config = $config;
14
39
}
15
40
41
+
/**
42
+
* Set a user's attendance status for an event. (Requires full auth)
43
+
* @param array $methodVars An array with the following required values: <i>eventId</i>, <i>status (0=Attending, 1=Maybe attending, 2=Not attending)</i>
44
+
* @return boolean
45
+
*/
16
46
publicfunctionattend($methodVars) {
17
47
// Only allow full authed calls
18
48
if ( $this->fullAuth == TRUE ) {
@@ -48,6 +78,11 @@ public function attend($methodVars) {
48
78
}
49
79
}
50
80
81
+
/**
82
+
* Get a list of attendees for an event
83
+
* @param array $methodVars An array with the following required values: <i>eventId</i>
84
+
* @return array
85
+
*/
51
86
publicfunctiongetAttendees($methodVars) {
52
87
// Check for required variables
53
88
if ( !empty($methodVars['eventId']) ) {
@@ -58,20 +93,20 @@ public function getAttendees($methodVars) {
0 commit comments