mirror of
https://github.com/rooyca/obsidian-api-request.git
synced 2026-07-22 07:50:27 +00:00
ref(docs): simpler readmes
This commit is contained in:
parent
1175cfb358
commit
a44a2ca23b
3 changed files with 15 additions and 160 deletions
55
README.es.md
55
README.es.md
|
|
@ -19,7 +19,6 @@ Este plugin implementa medidas de seguridad completas que incluyen:
|
|||
- Prevención de XSS mediante sanitización de HTML
|
||||
- Protección contra ataques de directory traversal
|
||||
- Evaluación segura de expresiones JSONPath
|
||||
- Manejo seguro de localStorage
|
||||
|
||||
## 🚀 Instalación
|
||||
|
||||
|
|
@ -33,60 +32,10 @@ Este plugin se puede instalar desde Obsidian.
|
|||
- Busca `APIRequest`
|
||||
- Haz clic en `Instalar` y luego en `Activar`
|
||||
|
||||
## 🛠️ Uso
|
||||
|
||||
### [Leer la documentación](https://rooyca.github.io/obsidian-api-request/)
|
||||
|
||||

|
||||
|
||||
## ✅ Por hacer
|
||||
|
||||
> Consulta todos los cambios en [TODOS-v2.md](TODOS-v2.md)
|
||||
|
||||
- [x] Traducir (y actualizar) documentación
|
||||
- [x] Reutilización de datos (sintaxis `{{ls.UUID>JSONPath}}`, donde `ls` significa `localStorage`)
|
||||
- [x] Soporte para comentarios usando sintaxis `#` o `//`
|
||||
- [x] Consulta en línea desde la respuesta (usando **Dataview**)
|
||||
- [ ] Añadir pruebas (!!!)
|
||||
- [ ] Re-implementar flag `repeat` (repetir solicitudes X veces o cada X segundos)
|
||||
- [x] Mejoras de seguridad (validación de entradas, prevención de XSS, protección contra directory traversal)
|
||||
- [x] Mejoras de seguridad de tipos TypeScript
|
||||
- [x] Manejo completo de errores
|
||||
|
||||
## 🤝 Contribuir
|
||||
|
||||
¡Las contribuciones son bienvenidas! Por favor, lee nuestras [Guías de Contribución](CONTRIBUTING.md) antes de enviar un pull request.
|
||||
|
||||
### Desarrollo
|
||||
|
||||
```bash
|
||||
# Instalar dependencias
|
||||
npm install
|
||||
|
||||
# Compilar
|
||||
npm run build
|
||||
|
||||
# Modo desarrollo (auto-recompilación)
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Para más detalles, consulta [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## 🔒 Mejores Prácticas de Seguridad
|
||||
|
||||
Al usar este plugin:
|
||||
|
||||
1. **Usa HTTPS**: Siempre usa URLs HTTPS para solicitudes API
|
||||
2. **Protege las Claves API**: Almacena las claves API en variables globales, nunca en las notas
|
||||
3. **Revisa Datos en Caché**: Limpia regularmente respuestas antiguas en caché
|
||||
4. **Valida Fuentes**: Solo conéctate a endpoints API de confianza
|
||||
|
||||
## ❤️ Patrocinadores
|
||||
|
||||
<a href="https://github.com/tlwt"><img src="https://github.com/tlwt.png" width="40px" /></a>
|
||||
|
||||
## ✍️ Comentarios y Contribuciones
|
||||
## 🤝 Contribuir
|
||||
|
||||
Si encuentras algún problema o tienes comentarios sobre el plugin, no dudes en abrir un issue en el [repositorio de GitHub](https://github.com/Rooyca/obsidian-api-request).
|
||||
|
||||
¡Las contribuciones también son bienvenidas!
|
||||
¡Las contribuciones son bienvenidas! Por favor, lee nuestras [Guías de Contribución](CONTRIBUTING.md) antes de enviar un pull request.
|
||||
|
|
|
|||
62
README.md
62
README.md
|
|
@ -8,17 +8,18 @@
|
|||
[](README.es.md)
|
||||
[](README.zh.md)
|
||||
|
||||
|
||||
This [Obsidian](https://obsidian.md/) plugin enables users to make API requests directly within their notes and display the response in a code-block.
|
||||
|
||||
## 🔒 Security
|
||||
|
||||
This plugin implements comprehensive security measures including:
|
||||
- Input validation for URLs, paths, and user data
|
||||
- XSS prevention through HTML sanitization
|
||||
- Protection against directory traversal attacks
|
||||
- Safe JSONPath expression evaluation
|
||||
- Secure localStorage handling
|
||||
- XSS prevention
|
||||
|
||||
## 🛠️ Usage
|
||||
|
||||
### [Read documentation here](https://rooyca.github.io/obsidian-api-request/)
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
|
|
@ -32,59 +33,10 @@ The plugin can be installed from within Obsidian.
|
|||
- Search for `APIRequest`
|
||||
- Click `Install` and then `Enable`
|
||||
|
||||
## 🛠️ Usage
|
||||
|
||||
### [Read documentation here](https://rooyca.github.io/obsidian-api-request/)
|
||||
|
||||
## ✅ To-do
|
||||
|
||||
> Check all changes on [TODOS-v2.md](TODOS-v2.md)
|
||||
|
||||
- [x] Translate (& update) documentation
|
||||
- [x] Data re-usage (`{{ls.UUID>JSONPath}}` syntax, where `ls` stands for `localStorage`)
|
||||
- [x] Support for comments using `#` or `//` syntax
|
||||
- [x] Inline query from response (using **Dataview**)
|
||||
- [ ] Add tests (!!!)
|
||||
- [ ] Re-implement `repeat` flag (repeat requests X times or every X seconds)
|
||||
- [x] Security improvements (input validation, XSS prevention, path traversal protection)
|
||||
- [x] TypeScript type safety improvements
|
||||
- [x] Comprehensive error handling
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request.
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Build
|
||||
npm run build
|
||||
|
||||
# Development mode (auto-rebuild)
|
||||
npm run dev
|
||||
```
|
||||
|
||||
For more details, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## 🔒 Security Best Practices
|
||||
|
||||
When using this plugin:
|
||||
|
||||
1. **Use HTTPS**: Always use HTTPS URLs for API requests
|
||||
2. **Protect API Keys**: Store API keys in global variables, not in notes
|
||||
3. **Review Cached Data**: Regularly clear old cached responses
|
||||
4. **Validate Sources**: Only connect to trusted API endpoints
|
||||
|
||||
|
||||
## ❤️ Sponsors
|
||||
|
||||
<a href="https://github.com/tlwt"><img src="https://github.com/tlwt.png" width="40px" /></a>
|
||||
|
||||
## ✍️ Feedback and Contributions
|
||||
## 🤝 Contributing
|
||||
|
||||
If you encounter any issues or have feedback on the plugin, feel free to open an issue on the [GitHub repository](https://github.com/Rooyca/obsidian-api-request).
|
||||
|
||||
Contributions are also welcome!
|
||||
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request.
|
||||
|
|
|
|||
58
README.zh.md
58
README.zh.md
|
|
@ -18,7 +18,10 @@
|
|||
- 通过 HTML 清理防止 XSS 攻击
|
||||
- 防止目录遍历攻击
|
||||
- 安全的 JSONPath 表达式评估
|
||||
- 安全的 localStorage 处理
|
||||
|
||||
## 🛠️ 使用
|
||||
|
||||
### [阅读文档](https://rooyca.github.io/obsidian-api-request/)
|
||||
|
||||
## 🚀 安装
|
||||
|
||||
|
|
@ -32,59 +35,10 @@
|
|||
- 搜索 `APIRequest`
|
||||
- 点击 `安装`,然后点击 `启用`
|
||||
|
||||
## 🛠️ 使用
|
||||
|
||||
### [阅读文档](https://rooyca.github.io/obsidian-api-request/)
|
||||
|
||||
## ✅ 待办事项
|
||||
|
||||
> 查看 [TODOS-v2.md](TODOS-v2.md) 中的所有更改
|
||||
|
||||
- [x] 翻译(和更新)文档
|
||||
- [x] 数据重用(`{{ls.UUID>JSONPath}}` 语法,其中 `ls` 代表 `localStorage`)
|
||||
- [x] 支持使用 `#` 或 `//` 语法的注释
|
||||
- [x] 从响应中进行内联查询(使用 **Dataview**)
|
||||
- [ ] 添加测试(!!!)
|
||||
- [ ] 重新实现 `repeat` 标志(重复请求 X 次或每 X 秒)
|
||||
- [x] 安全改进(输入验证、XSS 防护、目录遍历保护)
|
||||
- [x] TypeScript 类型安全改进
|
||||
- [x] 全面的错误处理
|
||||
|
||||
## 🤝 贡献
|
||||
|
||||
欢迎贡献!在提交 pull request 之前,请阅读我们的[贡献指南](CONTRIBUTING.md)。
|
||||
|
||||
### 开发
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 构建
|
||||
npm run build
|
||||
|
||||
# 开发模式(自动重建)
|
||||
npm run dev
|
||||
```
|
||||
|
||||
有关更多详细信息,请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
||||
|
||||
## 🔒 安全最佳实践
|
||||
|
||||
使用此插件时:
|
||||
|
||||
1. **使用 HTTPS**:进行 API 请求时始终使用 HTTPS URL
|
||||
2. **保护 API 密钥**:将 API 密钥存储在全局变量中,而不是在笔记中
|
||||
3. **审查缓存数据**:定期清除旧的缓存响应
|
||||
4. **验证来源**:仅连接到受信任的 API 端点
|
||||
|
||||
|
||||
## ❤️ 赞助商
|
||||
|
||||
<a href="https://github.com/tlwt"><img src="https://github.com/tlwt.png" width="40px" /></a>
|
||||
|
||||
## ✍️ 反馈和贡献
|
||||
## 🤝 贡献
|
||||
|
||||
如果您遇到任何问题或对插件有反馈,请随时在 [GitHub 仓库](https://github.com/Rooyca/obsidian-api-request)上提出问题。
|
||||
|
||||
也欢迎贡献!
|
||||
欢迎贡献!在提交 pull request 之前,请阅读我们的[贡献指南](CONTRIBUTING.md)。
|
||||
|
|
|
|||
Loading…
Reference in a new issue