1fichier-api 中文文档教程
1fichier API
此库专为与 1fichier API 交互而设计。
Installation
npm install 1fichier-api
Usage
API1fichier
constructor(token: string)
配置库以使用指定的设置。
token
- string : The user private token.
downloadFile(settings: DownloadFileInputInterface)
返回指定文件的下载链接
settings
- DownloadFileInputInterface:文件规范。returns
- DownloadFileOuputInterfacethrow
API1FichierResponseNotOk(statusCode: number, message: string):如果 api 返回错误。
copyFile(settings: CopyFileInputInterface)
将文件导入您的个人帐户
settings
- CopyFileInputInterface:要导入的文件及其存储位置。returns
- CopyFileOutputInterfacethrow
API1FichierResponseNotOk(statusCode: number, message: string):如果 api 返回错误。
editFile(settings: EditFileInputInterface)
编辑文件属性
settings
- EditFileInputInterface:要更改的属性和相关文件。返回
- EditFileOuputInterface*throw
API1FichierResponseNotOk(statusCode: number, message: string):如果 api 返回错误。
TODO
- [ ] Add missing routes
- [ ] Add tests
不要犹豫,为存储库做贡献!
1fichier API
This library is designed for interactions with the 1fichier API.
Installation
npm install 1fichier-api
Usage
API1fichier
constructor(token: string)
Configure the library to use the specified settings.
token
- string : The user private token.
downloadFile(settings: DownloadFileInputInterface)
Returns the download link for the specified file
settings
- DownloadFileInputInterface: The file specification.returns
- DownloadFileOuputInterfacethrow
API1FichierResponseNotOk(statusCode: number, message: string): If the api returns an error.
copyFile(settings: CopyFileInputInterface)
Imports the file to your personnal account
settings
- CopyFileInputInterface: The files to import and where to store them.returns
- CopyFileOutputInterfacethrow
API1FichierResponseNotOk(statusCode: number, message: string): If the api returns an error.
editFile(settings: EditFileInputInterface)
Edits the file attributes
settings
- EditFileInputInterface: The attributes to be changed and the files concerned.returns
- EditFileOuputInterface*throw
API1FichierResponseNotOk(statusCode: number, message: string): If the api returns an error.
TODO
- [ ] Add missing routes
- [ ] Add tests
Don't hesitate to contribute to the repository!