Last active
March 21, 2017 12:45
-
-
Save x1unix/498a1d2608b1a0eccb86661d34e748b0 to your computer and use it in GitHub Desktop.
Moonwalker example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.x1unix.moonwalker; | |
import okhttp3.OkHttpClient; | |
class MyClass { | |
private static final String MOVIE_KINOPOISK_ID = "502838"; | |
public static void main() { | |
Moonwalker moonwalker = new Moonwalker('http://mysite.com/'); | |
moonwalker.getMovieByKinopoiskId(MOVIE_KINOPOISK_ID, | |
new Listener() { | |
@Override | |
public void onSuccess(final MoonVideo video, final OkHttpClient client) { | |
System.out.printLn('Video url:' + video.getPlaylist().getM3u8Manifest()); | |
} | |
@Override | |
public void onError(Exception exception) { | |
final Exception ex = exception; | |
System.out.printLn('Failed to get video: '+ ex.getMessage()); | |
} | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment