Class Event


public class Event extends ImageHolder
Bean for Events.
Author:
Janni Kovacs
  • Method Details

    • getArtists

      public Collection<String> getArtists()
    • getAttendance

      public int getAttendance()
    • getDescription

      public String getDescription()
    • getHeadliner

      public String getHeadliner()
    • getId

      public int getId()
    • getReviews

      public int getReviews()
    • getStartDate

      public Date getStartDate()
      Returns the start date and time of this event. Note that the time might not be correct, but instead a random time, if not set to a proper value on last.fm (happens often).
      Returns:
      start date
    • getEndDate

      public Date getEndDate()
      Returns the event's end date, or null if not available. End dates are only supplied for events such as festivals, which last longer than one day.
      Returns:
      end date
    • getTitle

      public String getTitle()
    • getUrl

      public String getUrl()
      Returns the last.fm event url, i.e. http://www.last.fm/event/event-id
      Returns:
      last.fm url
    • getWebsite

      public String getWebsite()
      Returns the event website url, if available.
      Returns:
      event website url
    • getTicketSuppliers

      public Collection<Event.TicketSupplier> getTicketSuppliers()
    • getVenue

      public Venue getVenue()
    • getInfo

      public static Event getInfo(String eventId, String apiKey)
      Get the metadata for an event on Last.fm. Includes attendance and lineup information.
      Parameters:
      eventId - The numeric last.fm event id
      apiKey - A Last.fm API key.
      Returns:
      Event metadata
    • attend

      public static Result attend(String eventId, Event.AttendanceStatus status, Session session)
      Set a user's attendance status for an event.
      Parameters:
      eventId - The numeric last.fm event id
      status - The attendance status
      session - A Session instance
      Returns:
      the Result of the operation.
      See Also:
    • share

      public static Result share(String eventId, String recipients, String message, Session session)
      Share an event with one or more Last.fm users or other friends.
      Parameters:
      eventId - An event ID
      recipients - A comma delimited list of email addresses or Last.fm usernames. Maximum is 10.
      message - An optional message to send with the recommendation.
      session - A Session instance
      Returns:
      the Result of the operation
    • getAttendees

      public static Collection<User> getAttendees(String eventId, String apiKey)
      Get a list of attendees for an event.
      Parameters:
      eventId - The numeric last.fm event id
      apiKey - A Last.fm API key
      Returns:
      a list of users who attended the given event