1fichier-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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 - DownloadFileOuputInterface

  • throw 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 - CopyFileOutputInterface

  • throw 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!

Readme

Keywords

none

Package Sidebar

Install

npm i 1fichier-api

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

12.6 kB

Total Files

27

Last publish

Collaborators

  • baudev