Permalink
Browse files

Initial import of source

  • Loading branch information...
jkovacs committed Jul 17, 2012
0 parents commit 88513a87085769dbb83e403493727353101bbda3
Showing with 9,439 additions and 0 deletions.
  1. +7 −0 .gitignore
  2. +267 −0 changes.txt
  3. +23 −0 license.txt
  4. +41 −0 pom.xml
  5. +321 −0 src/main/java/de/umass/lastfm/Album.java
  6. +465 −0 src/main/java/de/umass/lastfm/Artist.java
  7. +116 −0 src/main/java/de/umass/lastfm/Authenticator.java
  8. +127 −0 src/main/java/de/umass/lastfm/BuyLink.java
  9. +48 −0 src/main/java/de/umass/lastfm/CallException.java
  10. +386 −0 src/main/java/de/umass/lastfm/Caller.java
  11. +305 −0 src/main/java/de/umass/lastfm/Chart.java
  12. +326 −0 src/main/java/de/umass/lastfm/Event.java
  13. +328 −0 src/main/java/de/umass/lastfm/Geo.java
  14. +121 −0 src/main/java/de/umass/lastfm/Group.java
  15. +130 −0 src/main/java/de/umass/lastfm/Image.java
  16. +79 −0 src/main/java/de/umass/lastfm/ImageHolder.java
  17. +43 −0 src/main/java/de/umass/lastfm/ImageSize.java
  18. +49 −0 src/main/java/de/umass/lastfm/ItemFactory.java
  19. +80 −0 src/main/java/de/umass/lastfm/ItemFactoryBuilder.java
  20. +328 −0 src/main/java/de/umass/lastfm/Library.java
  21. +248 −0 src/main/java/de/umass/lastfm/MusicEntry.java
  22. +91 −0 src/main/java/de/umass/lastfm/PaginatedResult.java
  23. +50 −0 src/main/java/de/umass/lastfm/Period.java
  24. +203 −0 src/main/java/de/umass/lastfm/Playlist.java
  25. +271 −0 src/main/java/de/umass/lastfm/Radio.java
  26. +122 −0 src/main/java/de/umass/lastfm/ResponseBuilder.java
  27. +118 −0 src/main/java/de/umass/lastfm/Result.java
  28. +121 −0 src/main/java/de/umass/lastfm/Session.java
  29. +75 −0 src/main/java/de/umass/lastfm/Shout.java
  30. +285 −0 src/main/java/de/umass/lastfm/Tag.java
  31. +111 −0 src/main/java/de/umass/lastfm/Tasteometer.java
  32. +738 −0 src/main/java/de/umass/lastfm/Track.java
  33. +645 −0 src/main/java/de/umass/lastfm/User.java
  34. +226 −0 src/main/java/de/umass/lastfm/Venue.java
  35. +180 −0 src/main/java/de/umass/lastfm/cache/Cache.java
  36. +190 −0 src/main/java/de/umass/lastfm/cache/DatabaseCache.java
  37. +104 −0 src/main/java/de/umass/lastfm/cache/DefaultExpirationPolicy.java
  38. +48 −0 src/main/java/de/umass/lastfm/cache/ExpirationPolicy.java
  39. +254 −0 src/main/java/de/umass/lastfm/cache/FileSystemCache.java
  40. +97 −0 src/main/java/de/umass/lastfm/cache/MemoryCache.java
  41. +81 −0 src/main/java/de/umass/lastfm/cache/ScrobbleCache.java
  42. +82 −0 src/main/java/de/umass/lastfm/scrobble/IgnoredMessageCode.java
  43. +68 −0 src/main/java/de/umass/lastfm/scrobble/Rating.java
  44. +103 −0 src/main/java/de/umass/lastfm/scrobble/ResponseStatus.java
  45. +216 −0 src/main/java/de/umass/lastfm/scrobble/ScrobbleData.java
  46. +168 −0 src/main/java/de/umass/lastfm/scrobble/ScrobbleResult.java
  47. +285 −0 src/main/java/de/umass/lastfm/scrobble/Scrobbler.java
  48. +80 −0 src/main/java/de/umass/lastfm/scrobble/Source.java
  49. +142 −0 src/main/java/de/umass/lastfm/scrobble/SubmissionData.java
  50. +91 −0 src/main/java/de/umass/util/MapUtilities.java
  51. +189 −0 src/main/java/de/umass/util/StringUtilities.java
  52. +167 −0 src/main/java/de/umass/xml/DomElement.java
@@ -0,0 +1,7 @@
# intellij files
*.iml
*.iws
*.ipr
target
@@ -0,0 +1,267 @@
change-log for last.fm bindings. Please read with each new release.
===================================================================
4.5.2012
- added: User.getPersonalTags (issue 45)
- changed: PaginatedResult is now Iterable
24.4.2012
- added: Album#getTracks()
19.4.2012
- added: Event#getAttendanceStatus()
1.4.2012
- added: Radio.search, Radio.getPlaylist parameters (issue 41)
12.2.2012
- changed: some #getEvents methods now return a PaginatedResult instead of a Collection, accept festivalsOnly parameter
25.1.2012
- changed: Playlist#getTracks() now returns a List instead of a Collection
21.12.2011
- changed: made ResponseBuilder public (issue 29)
- fixed: DatabaseCache now works with MySQL 5, fixed text encoding bug (issue 33)
11.12.2011
- added Library.removeXXX methods
04.11.2011
- added support for "chosenByUser" parameter to track.scrobble.
12.10.2011
- added: Geo.getEvents with lat/long and distance (issue 32)
- fixed: Events without a venue specified (issue 35)
5.7.2011
- changed: Geo.getEvents now accepts limit parameter (issue 26)
31.5.2011
- changed: User.getFriends now returns PaginatedResult<User> instead of a Collection<User> (issue 24)
2.5.2011
- fixed: Tracks returned from getSimilarTracks do not include "match" attribute (issue 20)
22.2.2011
- fixed issue with empty duration elements and also different units of measure (issue 17)
27.1.2011
- added XXX.getShouts methods
2.1.2011
- documentation and code cleanup
6.12.2010
- added: Chart.getHypedXXX and Chart.getTopXXX methods
- changed: moved Artist.getPercentageChange to MusicEntry.getPercentageChange
- added: PaginatedResult.isEmpty()
14.11.2010
- added: Geo.getMetroXXXChart methods (issue 8)
- Refactorings, code cleanup, documentation
06.11.2010
- changed: Track.getTopTags() now returns a more general Collection<Tag> instead of a List<Tag>
- Refactorings
05.11.2010
- added: Artist.getCorrection
- fixed: Track.getCorrection failed if supplied artist/track are already correct or Last.fm can't supply a correction
- added: Track.unlove() and Track.unban()
- added: Tag.getInfo()
- changed: Track.getInfo() now takes a Locale parameter
- changed: Artist.getInfo(), Track.getInfo(), Tag.getInfo() now don't pass a language parameter to the webservice if no Locale was specified,
instead of the default Locale
- added: Geo.getMetros() and Geo.Metro class (issue 8)
- added: ItemFactory, ItemFactoryBuilder, ResponseBuilder as well as several implementations of ItemFactory to help remove duplicate code
- changed: Tag.getSimilar() now returns a Collection of Tags instead of Strings
- changed: Tag.getTopTags() now returns a more general Collection<Tag> instead of a List<Tag>
- changed: Tag.search() now returns a Collection of Tags instead of Strings
- Refactorings in various classes to make use of the new ResponseBuilder
- updated ant build script
04.11.2010
- Added trackNumber and streamId params to scrobbling classes.
31.10.2010
- Added license info to all files, updated license.txt
- Some documentation changes
- fixed: StringUtilities.isMD5() where a string was recognized as possible md5 encoded
- added: Scrobbler.setHandshakeURL() (issue 13)
- added: Track.getCorrection() (issue 14)
- added: Group.getHype() and Artist.getPercentageChange() (issue 9)
- added: Album.getTopTags()
- added: User.getNewReleases() and User.getBannedTracks() (issue 15)
- fixed: Result.getContentElement() returned the wrong element on Android (see issue 12)
26.10.2010
- Added support for scrobbling and now playing requests using the new Last.fm Scrobble 2.0 API (Adrian Woodhead).
- Deprecated 1.2.x scrobble protocol classes.
22.4:
- fixed: Event.getStartDate() (issue 7)
- added: Event.getEndDate()
17.3:
- changed: User.getRecentTracks returns PaginatedResult (issue 6)
- added: MusicEntry.getUserPlaycount(): returns user's playcount for Album/Artist/Tracks, when a username was supplied
on the respective new getInfo() calls.
- changed: Session now has private default constructor to precent accidentally instantiation. Use the static methods
provided in the Authenticator class.
- changed: User.getInfo() changed to an unauthenticated call, now takes username parameter
- added: Album.getBuylinks(), Track.getBuylinks() and the BuyLink class
- added: Artist.getPastEvents()
- added: User.getArtistTracks()
- added: Venue.getPhonenumber(), Venue.getWebsite()
- added: Venue.getImageUrl()
10.8:
- fixed: Explicitly using UTF-8 encoding now
31.7:
- changed: User.getLovedTracks now returns a PaginatedResult and accepts a page parameter
15.6:
- fixed: User.getNeighbours(user, key) was not working properly
12.6:
- added: User.getRealname() method (thanks Marko Luther)
26.6:
- added: MEGA size to ImageSize enum
- R.I.P. Michael Jackson
19.6:
- added: Event.getWebsite(), Event.getTicketSuppliers()
18.6:
- fixed: NPE in Track.search() w/o artist parameter
21.5:
- fixed: Library.add methods
14.5:
- changed: some methods in User changed to public
23.4:
- added: Caller.getLastResult
13.4:
- changed: User() constructor now private, was public
- added: Track.getLastFmInfo
11.4:
- added: Track.getPosition (thanks again Marko Luther)
9.4:
- changed: implemented Radio 2.0 API
27.3:
- fixed: User.getInfo
20.3:
- added: Event.getAttendees
- added: Artist.getImages
- added: Image class, ImageHolder.availableSizes()
- added: User.shout, Artist.shout
10.3:
- added: ScrobbleCache.clearScrobbleCache
- fixed: new SubmissionData(String) ArrayIndexOutOfBoundsException
28.2:
- added: ScrobbleCache
- added: SubmissionData.toString() SubmissionData(String)
- added: FileSystemCache now supports caching scrobbles through the ScrobbleCache interface
9.2:
- added: Radio.skipsLeft
5.2:
- added: Session.createSession to restore sessions
- changed: Radio.handshake and Authenticator.getMobileSession now accept 32-character MD5 string as password parameter
5.1:
- added: DatabaseCache - Cache implementation that stores into any jdbc database
- added: DomElement.getTagName method
1.1:
- changed: Cache.createCacheEntryName now returns md5 hashes by default.
30.12:
- fixed: StringUtilities.cleanUp not replacing * lead to caching error (thanks Andrew Collins)
20.12:
- Venue promoted to top level class
- added: Venue.search, Venue.getEvents, Venue.getPastEvents
- added: Venue.getId
11.12:
- added: Track.getInfo recognizes duration if available
- fixed: Track.getInfo for tracks with no album (thanks Robin Fernandes)
- ant build now includes debug information
10.12:
- changed: getTopTags methods now return list of Tag (thanks Rudolf Mayer)
- fixed: FileSystemCache directory is created lazily
- happy birthday yet another K. ;-)
6.12:
- changed license to 2-clause BSD
- fixed: User.getInfo tests if age element is present
5.12:
- added: User.getRecommendedArtists
- added: Group.getMembers
1.12:
- fixed: now playing notification UTF-8 encoding
25.11:
- fixed: caching may fail due to invalid filename characters, added StringUtilities.cleanUp (thanks Jakob Frank)
12.11:
- added: Basic cache implementation in net.roarsoftware.lastfm.cache and Caller.setCache (thanks Martin Chorley for
his cache implementation I built upon)
- added: Rating ability to Scrobbler/SubmissionData (thanks Lukasz Wisniewski)
10.11:
- added: Artist.getEvents (thanks Idan Zohar)
- added: Artist.share
- fixed: Event.getStartDate now contains event's start time if available (thanks Idan Zohar)
5.11:
- added: User.getRecommendedEvents
- added: Library.addArtist, Library.addAlbum, Library.addTrack
24.10:
- added: localised Artist.getInfo method
- fixed: Playlist.create
- warning: Artist.getInfo => getWikiLastChanged may return null if locale neither english nor default.
18.10:
- added: Playlist.create
6.10:
- added: Album.search method
- added: Tag.getWeeklyArtistChart method
- added: internal Chart.getChart, Chart.getWeeklyChartList, Chart.getWeeklyChartListAsCharts methods
- changed: refactored all Chart methods to use the new internal Chart.getXXX methods
28.9:
- fixed: Authenticator.getSession() now sends api_sig (thanks Alex Aranda)
25.9:
- fixed: MusicEntry.getPlaycount() (thanks Henrique Pinto)
17.9:
- changed: ImageSize.EXTRALARGE constant added.
8.9:
- changed: for consistency reasons order of parameters in Track are now always: artist, track/mbid
- changed: biography loading and accessor methods now renamed to getWikiXXX() and made available in MusicEntry
- added: Track.getInfo
- fixed: StringUtilities.isMbid
- added: Event.share
- ps: happy birthday, K. :-)
@@ -0,0 +1,23 @@
Copyright (c) 2012, the Last.fm Java Project and Committers
All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 pom.xml
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<groupId>de.u-mass</groupId>
<artifactId>lastfm-java</artifactId>
<version>0.1.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Last.fm bindings</name>
<description>Java bindings for the Last.fm webservice API</description>
<url>http://code.google.com/p/lastfm-java/</url>
<licenses>
<license>
<name>The BSD 2-Clause License</name>
<url>http://opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:https://code.google.com/p/lastfm-java</connection>
<developerConnection>scm:git:https://code.google.com/p/lastfm-java</developerConnection>
<url>http://code.google.com/p/lastfm-java/</url>
</scm>
<developers>
<developer>
<name>Janni Kovacs</name>
<email>jannikovacs@gmail.com</email>
</developer>
</developers>
</project>
Oops, something went wrong.

0 comments on commit 88513a8

Please sign in to comment.