https://github.com/baudev/1fichier-api
TypeScript API for https://1fichier.com/api.html
https://github.com/baudev/1fichier-api
1fichier api
Last synced: 10 months ago
JSON representation
TypeScript API for https://1fichier.com/api.html
- Host: GitHub
- URL: https://github.com/baudev/1fichier-api
- Owner: baudev
- License: mit
- Created: 2021-03-16T19:08:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-24T16:22:05.000Z (about 5 years ago)
- Last Synced: 2025-02-10T21:47:49.080Z (over 1 year ago)
- Topics: 1fichier, api
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 1fichier API
 
This library is designed for interactions with the [1fichier API](https://1fichier.com/api.html).
# 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!