Git Product home page Git Product logo

jmusixmatch's Introduction

#jMusixMatch Build Status

A Java wrapper for the MusixMatch API

##How to use ?

  • Declaring the MusixMatch Instance
String apiKey = "Your MusixMatch API Key";
MusixMatch musixMatch = new MusixMatch(apiKey);
  • Fuzzy Search
String trackName = "Don't stop the Party";
String artistName = "The Black Eyed Peas";

// Track Search [ Fuzzy ]
Track track = musixMatch.getMatchingTrack(trackName, artistName);
TrackData data = track.getTrack();

System.out.println("AlbumID : "    + data.getAlbumId());
System.out.println("Album Name : " + data.getAlbumName());
System.out.println("Artist ID : "  + data.getArtistId());
System.out.println("Album Name : " + data.getArtistName());
System.out.println("Track ID : "   + data.getTrackId());
  • Getting Lyrics
int trackID = data.getTrackId();

Lyrics lyrics = musixMatch.getLyrics(trackID);

System.out.println("Lyrics ID       : "     + lyrics.getLyricsId());
System.out.println("Lyrics Language : "     + lyrics.getLyricsLang());
System.out.println("Lyrics Body     : "     + lyrics.getLyricsBody());
System.out.println("Script-Tracking-URL : " + lyrics.getScriptTrackingURL());
System.out.println("Pixel-Tracking-URL : "  + lyrics.getPixelTrackingURL());
System.out.println("Lyrics Copyright : "    + lyrics.getLyricsCopyright());
  • Search Tracks
// The following will search for tracks with matching artist_name 'Eminem'
List<Track> tracks = musixMatch.searchTracks("", "Eminem", "", 10, 10, true);

for (Track trk : tracks) {
    TrackData trkData = trk.getTrack();
 
    System.out.println("AlbumID : "     + trkData.getAlbumId());
    System.out.println("Album Name : "  + trkData.getAlbumName());
    System.out.println("Artist ID : "   + trkData.getArtistId());
    System.out.println("Artist Name : " + trkData.getArtistName());
    System.out.println("Track ID : "    + trkData.getTrackId());
    System.out.println();
}

##Maven

<dependency>
  <groupId>com.sachinhandiekar</groupId>
  <artifactId>jMusixMatch</artifactId>
  <version>1.1.3</version>
</dependency>

##Dependencies

##About me

jmusixmatch's People

Contributors

sachin-handiekar avatar kyledhebert avatar rmeertens avatar ugurk avatar

Watchers

Andy avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.