Package de.umass.lastfm
Class Event
- java.lang.Object
-
- de.umass.lastfm.ImageHolder
-
- de.umass.lastfm.Event
-
public class Event extends ImageHolder
Bean for Events.- Author:
- Janni Kovacs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEvent.AttendanceStatusEnumeration for the attendance status parameter of theattendoperation.static classEvent.TicketSupplier
-
Field Summary
-
Fields inherited from class de.umass.lastfm.ImageHolder
imageUrls
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Resultattend(java.lang.String eventId, Event.AttendanceStatus status, Session session)Set a user's attendance status for an event.java.util.Collection<java.lang.String>getArtists()intgetAttendance()static java.util.Collection<User>getAttendees(java.lang.String eventId, java.lang.String apiKey)Get a list of attendees for an event.java.lang.StringgetDescription()java.util.DategetEndDate()Returns the event's end date, ornullif not available.java.lang.StringgetHeadliner()intgetId()static EventgetInfo(java.lang.String eventId, java.lang.String apiKey)Get the metadata for an event on Last.fm.intgetReviews()java.util.DategetStartDate()Returns the start date and time of this event.java.util.Collection<Event.TicketSupplier>getTicketSuppliers()java.lang.StringgetTitle()java.lang.StringgetUrl()Returns the last.fm event url, i.e.VenuegetVenue()java.lang.StringgetWebsite()Returns the event website url, if available.static Resultshare(java.lang.String eventId, java.lang.String recipients, java.lang.String message, Session session)Share an event with one or more Last.fm users or other friends.-
Methods inherited from class de.umass.lastfm.ImageHolder
availableSizes, getImageURL, loadImages
-
-
-
-
Method Detail
-
getArtists
public java.util.Collection<java.lang.String> getArtists()
-
getAttendance
public int getAttendance()
-
getDescription
public java.lang.String getDescription()
-
getHeadliner
public java.lang.String getHeadliner()
-
getId
public int getId()
-
getReviews
public int getReviews()
-
getStartDate
public java.util.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 java.util.Date getEndDate()
Returns the event's end date, ornullif not available. End dates are only supplied for events such as festivals, which last longer than one day.- Returns:
- end date
-
getTitle
public java.lang.String getTitle()
-
getUrl
public java.lang.String getUrl()
Returns the last.fm event url, i.e. http://www.last.fm/event/event-id- Returns:
- last.fm url
-
getWebsite
public java.lang.String getWebsite()
Returns the event website url, if available.- Returns:
- event website url
-
getTicketSuppliers
public java.util.Collection<Event.TicketSupplier> getTicketSuppliers()
-
getVenue
public Venue getVenue()
-
getInfo
public static Event getInfo(java.lang.String eventId, java.lang.String apiKey)
Get the metadata for an event on Last.fm. Includes attendance and lineup information.- Parameters:
eventId- The numeric last.fm event idapiKey- A Last.fm API key.- Returns:
- Event metadata
-
attend
public static Result attend(java.lang.String eventId, Event.AttendanceStatus status, Session session)
Set a user's attendance status for an event.- Parameters:
eventId- The numeric last.fm event idstatus- The attendance statussession- A Session instance- Returns:
- the Result of the operation.
- See Also:
Event.AttendanceStatus,Authenticator
-
share
public static Result share(java.lang.String eventId, java.lang.String recipients, java.lang.String message, Session session)
Share an event with one or more Last.fm users or other friends.- Parameters:
eventId- An event IDrecipients- 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 java.util.Collection<User> getAttendees(java.lang.String eventId, java.lang.String apiKey)
Get a list of attendees for an event.- Parameters:
eventId- The numeric last.fm event idapiKey- A Last.fm API key- Returns:
- a list of users who attended the given event
-
-