Comments (2)
首先欢迎贡献修正代码。然后api实现的确在编码规范性上有问题,除以下几个外表示赞同。
- paginate 使用页数作为分页,在增量很快的情况下,会导致数据偏移。采用since_id 没有这个问题。
- pushkey 是专有名词,特指 pushdeer 的 key。
- 9 我没看出来怎么就减少嵌套层级了,$device 为假时不是根本就没进入下一层吗?
from pushdeer.
- 学到了新东西,感谢~
- 专有名词的话这么写就没毛病
- 9 的话并不绝对,可以理解为是 “优先返回原则”,$device 为假的时候直接 continue,整个代码段就只有两个层级:foreach 和
if;如果 $device 为真再处理逻辑,整个代码段就是三个层级:foreach、if、if;两三个层级的话其实没啥大的差别,但是层级多了就会很痛苦,算是最佳实践。但是 2 种写法都没有什么大的毛病,个人是更推荐优先 continue
from pushdeer.
Related Issues (20)
- [Bug] 自己搭建的服务,请求https://api.sandbox.push.apple.com异常报错remote error: tls: expired certificate","t HOT 1
- [Bug]Post方式发送markdown消息时,如何换行? HOT 1
- [Bug]
- #107接入Huawei Push
- DeerESP 方案一 似乎已被下架无法购买 HOT 2
- 有没有适用于WordPress的PushDeer插件?
- [功能] 如何导出已接收到的消息 HOT 1
- [Bug]自架版App登录报错 HOT 2
- ios登录显示错误信息500[Bug] HOT 1
- [Bug] 部署失败 Segmentation fault (core dumped) HOT 2
- [issues]
- 华为出超级push了
- 通过自架服务器ipv6地址获得公网访问
- ios PushDeer 自建版 没有消息提醒 打开app才刷新新消息 HOT 9
- urllib3版本问题
- 自架服务器 HOT 2
- [兼容性]Arm版的服务好像用不了这个docker ,可以做一下适配吗 ?
- 请问安卓无法继续,还会开发鸿蒙版本吗
- 是否支持即时通知
- 【需求】能否将 swagger 文档中的 response 填上
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pushdeer.