7agiven / phigroslibrary Goto Github PK
View Code? Open in Web Editor NEWPhigros云存档解析库
License: GNU General Public License v3.0
Phigros云存档解析库
License: GNU General Public License v3.0
比如获取的信息,全曲的成绩数据,或者修改数据的功能(咕咕
无论是自带jre11还是我电脑上的jre11,运行都会出现这样的报错
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
按照网上说的把相关jar文件放进类路径也无法解决,请问该怎么办
经过我的测试,在上传存档时,请求 /fileCallback
时应携带 sessionToken,否则服务端会返回 401
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 401 for URL: https://rak3ffdi.cloud.tds1.tapapis.cn/1.1/fileCallback
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1997)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
at given.phigros.HttpConnection.json(HttpConnection.java:88)
at given.phigros.SaveManager.uploadZip(SaveManager.java:389)
at given.phigros.PhigrosUser.modify(PhigrosUser.java:92)
at PhigrosServer.main(PhigrosServer.java:18)
经过更多测试,不光 /fileCallback
,其余的几个发送到 https://rak3ffdi.cloud.tds1.tapapis.cn/1.1
的请求也必须携带 sessionToken,否则将会返回401
以下是可以正常请求的代码
response = new HttpConnection(fileCallback)
.header("Content-Type","application/json")
.pigeon(user.session)
.post(String.format("{\"result\":true,\"token\":\"%s\"}",tokenKey))
.json();
Logger.getGlobal().fine(response.toString());
response = new HttpConnection(String.format(baseUrl + "/classes/_GameSave/%s?",saveModel.objectId))
.header("Content-Type","application/json")
.pigeon(user.session)
.put(String.format("{\"summary\":\"%s\",\"modifiedAt\":{\"__type\":\"Date\",\"iso\":\"%s\"},\"gameFile\":{\"__type\":\"Pointer\",\"className\":\"_File\",\"objectId\":\"%s\"},\"ACL\":{\"%s\":{\"read\":true,\"write\":true}},\"user\":{\"__type\":\"Pointer\",\"className\":\"_User\",\"objectId\":\"%s\"}}",saveModel.summary, Instant.ofEpochMilli(System.currentTimeMillis()), newGameObjectId,saveModel.userObjectId,saveModel.userObjectId))
.json();
Logger.getGlobal().fine(response.toString());
response = new HttpConnection(String.format(baseUrl + "/files/%s",saveModel.gameObjectId))
.pigeon(user.session)
.delete()
.json();
Logger.getGlobal().fine(response.toString());
看了许久 java 库代码,gameKey 文件第一个字节应该是文件版本号,我这里新鲜下载的文件的第一个字节变成了 2,大抵是库需要更新了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.