Class Event

Description

Represents an event and provides different methods to query event information.

Located in /src/Event.php (line 9)


	
			
Class Constant Summary
Method Summary
static void attend (integer $event, integer $status, Session $session)
static Event fromSimpleXMLElement ( $xml)
static mixed getInfo (integer $event)
static mixed getPlaylist (integer $event)
static array getShouts (integer $event)
static void share (integer $event,  $recipients, [string $message = null], Session $session)
Event __construct (integer $id, string $title,  $artists, Venue $venue, integer $startDate, string $description, array $images, string $url, integer $attendance, integer $reviews, string $tag)
array getArtists ()
integer getAttendance ()
string getDescription ()
integer getId ()
string getImage (integer $size)
integer getReviews ()
integer getStartDate ()
Tag getTag ()
string getTitle ()
string getUrl ()
Methods
static method attend (line 238)

Set a user's attendance status for an event.

  • throws: Error
  • access: public
static void attend (integer $event, integer $status, Session $session)
  • integer $event: The numeric last.fm event ID. (Required)
  • integer $status: The attendance status (ATTENDING, MAYBE_ATTENDING, NOT_ATTENDING). (Required)
  • Session $session: A session obtained by getSession or getMobileSession. (Required)
static method fromSimpleXMLElement (line 330)

Create a Event object from a SimpleXMLElement.

  • return: A Event object.
  • access: public
static Event fromSimpleXMLElement ( $xml)
  • SimpleXMLElement $xml: A SimpleXMLElement.
static method getInfo (line 254)

Get the metadata for an event on last.fm. Includes attendance and lineup information.

  • return: An Event object.
  • throws: Error
  • access: public
static mixed getInfo (integer $event)
  • integer $event: The numeric last.fm event ID. (Required)
static method getPlaylist (line 313)

Get an event playlist for streaming.. INOFFICIAL.

  • return: A Playlist object.
  • throws: Error
  • access: public
static mixed getPlaylist (integer $event)
  • integer $event: An event ID. (Required)
static method getShouts (line 271)

Get shouts for this event.

  • return: An array of Shout objects.
  • throws: Error
  • access: public
static array getShouts (integer $event)
  • integer $event: The numeric last.fm event id (Required)
static method share (line 296)

Share an event with one or more last.fm users or other friends.

  • throws: Error
  • access: public
static void share (integer $event,  $recipients, [string $message = null], Session $session)
  • integer $event: An event ID. (Required)
  • array $recipients: An array of email addresses or last.fm usernames. Maximum is 10. (Required)
  • string $message: An optional message to send with the recommendation. If not supplied a default message will be used. (Optional)
  • Session $session: A session obtained by getSession or getMobileSession. (Required)
Constructor __construct (line 112)

Create an event object.

  • access: public
Event __construct (integer $id, string $title,  $artists, Venue $venue, integer $startDate, string $description, array $images, string $url, integer $attendance, integer $reviews, string $tag)
  • integer $id: Event ID.
  • string $title: Event title.
  • array $artists: An array of Artist objects.
  • Venue $venue: A Venue object.
  • integer $startDate: A start date (unix timestamp).
  • string $description: An event description.
  • array $images: An array of cover art images of different sizes.
  • string $url: A last.fm event URL.
  • integer $attendance: The Number of users attending this event.
  • integer $reviews: The Number of reviews of this event.
  • string $tag: Tag of this event.
getArtists (line 151)

Returns the artists of this event.

  • return: An array of Artist objects.
  • access: public
array getArtists ()
getAttendance (line 206)

Returns number of users attending this event.

  • return: Number of users attending.
  • access: public
integer getAttendance ()
getDescription (line 178)

Returns the description of this event.

  • return: A description string.
  • access: public
string getDescription ()
getId (line 133)

Returns the ID of this event.

  • return: ID of this event.
  • access: public
integer getId ()
getImage (line 188)

Returns an image URL of the specified size.

  • return: An image URL.
  • access: public
string getImage (integer $size)
  • integer $size: Image size constant.
getReviews (line 215)

Returns number of reviews of this event.

  • return: Number of reviews.
  • access: public
integer getReviews ()
getStartDate (line 169)

Returns the start date of this event.

  • return: A unix timestamp.
  • access: public
integer getStartDate ()
getTag (line 224)

Returns the tag of this event.

  • return: A Tag object.
  • access: public
Tag getTag ()
getTitle (line 142)

Returns the title of this event.

  • return: Title of this event.
  • access: public
string getTitle ()
getUrl (line 197)

Returns the last.fm URL of this event.

  • return: A last.fm URL.
  • access: public
string getUrl ()
getVenue (line 160)

Returns the venue of this event.

  • return: A Venue object.
  • access: public
Venue getVenue ()
Class Constants
ATTENDING = 0 (line 92)

Possible attendance statuses.

  • access: public
MAYBE_ATTENDING = 1 (line 93)
NOT_ATTENDING = 2 (line 94)

Documentation generated on Mon, 22 Dec 2008 16:57:36 +0100 by phpDocumentor 1.4.1