Advertisement
Guest User

Untitled

a guest
Feb 7th, 2014
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public class NowPlaying
  2. {
  3. private static RadioContent radioContent = new RadioContent();
  4.  
  5. public static void fetchContent( String url )
  6. {
  7. radioContent.setURL( url );
  8. radioContent.loadContent();
  9. radioContent.convertToJson();
  10. }
  11.  
  12. public static void print( String find )
  13. {
  14. Object value = radioContent.getValue( find );
  15.  
  16. System.out.println( value );
  17. }
  18.  
  19. public static void main( String[] args )
  20. {
  21. NowPlaying.fetchContent( "http://api.soundrop.fm/spaces/XJTt3mXTOZpvgmOc" );
  22.  
  23. NowPlaying.print( "title" );
  24. NowPlaying.print( "display_name" );
  25. NowPlaying.print( "length" );
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement