public class LiveDanMuSender extends Object
| 构造器和说明 |
|---|
LiveDanMuSender(String url)
Class construction.
|
LiveDanMuSender(URL url)
Class construction.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
cipherPassword(String password)
Cipher password of Bilibili account, use for username and password login which feature is not finished yet.
|
Long |
getRandom()
Get DANMU_RND.
|
Integer |
getRoomId()
Get ROOMID
|
Integer |
getRoomURL()
Get ROOMURL.
|
URL |
getUrl()
Get URL of room.
|
UserInfoEntity |
getUserInfo()
Get user info.
|
static UserInfoEntity |
getUserInfo(String cookies)
Get user info.
|
boolean |
isCookiesSet()
Are cookies set.
|
DanMuResponseEntity |
send(String message)
Send DanMu.
|
DanMuResponseEntity |
send(String color,
String fontSize,
String mode,
String message)
Send DanMu.
|
LiveDanMuSender |
setCookies(String cookies)
Setup cookies.
|
LiveDanMuSender |
setCookies(String DedeUserID,
String DedeUserID__ckMd5,
String SESSDATA)
Setup cookies.
|
boolean |
testLogin()
Validate cookies.
|
static boolean |
testLogin(String cookies)
Validate cookies.
|
public LiveDanMuSender(String url)
url - URL of roompublic LiveDanMuSender(URL url)
public static String cipherPassword(String password) throws Exception
password - password of Bilibili accountExceptionpublic static boolean testLogin(String cookies) throws IOException
cookies - cookies of userIOException - when network errorpublic static UserInfoEntity getUserInfo(String cookies) throws IOException
cookies - cookies of userIOException - when network errorUserInfoEntitypublic boolean testLogin()
throws IOException
IOException - when network errorpublic UserInfoEntity getUserInfo() throws IOException
IOException - when network errorUserInfoEntitypublic LiveDanMuSender setCookies(String cookies)
cookies - all needed cookies in a stringpublic LiveDanMuSender setCookies(String DedeUserID, String DedeUserID__ckMd5, String SESSDATA)
DedeUserID - cookie named 'DedeUserID'DedeUserID__ckMd5 - cookie named 'DedeUserID__ckMd5'SESSDATA - cookie named 'SESSDATA'public boolean isCookiesSet()
public DanMuResponseEntity send(String message) throws IOException, IllegalArgumentException
message - DanMu contentIOExceptionIllegalArgumentExceptionpublic DanMuResponseEntity send(String color, String fontSize, String mode, String message) throws IOException, IllegalArgumentException
color - color of DanMufontSize - font size of DanMumode - DanMu modemessage - DanMu contentIOExceptionIllegalArgumentExceptionpublic URL getUrl()
public Integer getRoomId()
public Long getRandom()
public Integer getRoomURL()
Copyright © 2017. All rights reserved.