-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[新功能] 能否将凭据类与凭据操作类的命名分开 #870
Comments
之前想回复你来着,最近忙小组作业搞忘了。 总的来说,只需要使用 不知道你想做区分是什么原因? |
说来就是我很蠢了,当时我在参考教程写一个视频下载器,因为实例化videoDownload需要用到credential类,所以我就按照教程实例化credential,结果在实例化时没有添加进ac_time_value参数,导致检测credential是否要刷新失败,提示没有这个方法,我以为是类名重合,其实是我没有按要求去做。后面干脆把实例化credential类的参数全部填上 |
明白了,之所以分出两个类是为了解决循环引用的问题,因为发送请求的函数和凭据类不在一个文件,而发送请求需要用到凭据,所以凭据类必须被发送请求的那个文件引入。但是后面又新加了刷新凭据的接口,不得已才新增了现在这个凭据类。本质是它们两者没有很好解耦的问题,可能之后会修改。 |
谢谢解惑 |
这两者的类名都叫做Credential,容易引起混乱和用法错误
The text was updated successfully, but these errors were encountered: