azury
Version:
Powerful Javascript SDK for Azury
68 lines (51 loc) • 2.23 kB
Markdown
# Azury's SDK
A powerful [Node.js](https://nodejs.org) package that allows you to easily interact with [Azury's API](https://azury.dev/docs/api).
- asynchronous
- performant
- modular
Want to use Azury directly from your console? Check out our [CLI](https://cli.azury.gg)!
## Overview
- [Installation](#installation)
- [API](#api)
- [Users](#users)
- [Files](#files)
## Installation
Install the SDK using your favorite package manager.
```sh-session
npm i azury
yarn add azury
```
Create a new instance.
```js
import azury from 'azury'
azury({
secret: 'super duper secret token', // keep your api secret hidden from everyone, e.g. in a .env file
new: true, // notify on launch if there's a new version of the sdk
logging: true // logging is only recommended in development
})
```
## API
### Users
- [`getUser(uid)`](../../wiki/api/files#getUser)
- [`getAvatar(uid)`](../../wiki/api/files#getAvatar)
- [`getNickname(uid)`](../../wiki/api/files#getNickname)
- [`getBio(uid)`](../../wiki/api/files#getBio)
- [`getBadges(uid)`](../../wiki/api/files#getBadges)
- [`getUserCreationDate(uid)`](../../wiki/api/files#getUserCreationDate)
- [`getUserCreationTimestamp(uid)`](../../wiki/api/files#getUserCreationTimestamp)
### Files
- [`getFile(id)`](../../wiki/api/files#getFile)
- [`getFileName(id)`](../../wiki/api/files#getFileName)
- [`getFileNote(id)`](../../wiki/api/files#getFileNote)
- [`getDownloadLink(id)`](../../wiki/api/files#getDownloadLink)
- [`getSharableLink(id)`](../../wiki/api/files#getSharableLink)
- [`getAuthor(id)`](../../wiki/api/files#getAuthor)
- [`getUploadDate(id)`](../../wiki/api/files#getUploadDate)
- [`getUploadTimestamp(id)`](../../wiki/api/files#getUploadTimestamp)
- [`getSize(id)`](../../wiki/api/files#getSize)
- [`getReadableSize(id)`](../../wiki/api/files#getReadableSize)
- [`getMimetype(id)`](../../wiki/api/files#getMimetype)
- [`getVisibility(id)`](../../wiki/api/files#getVisibility)
- [`updateFileName(id, name)`](../../wiki/api/files#updateFileName)
- [`updateFileNote(id, note)`](../../wiki/api/files#updateFileNote)
- [`updateVisibility(id, visibility)`](../../wiki/api/files#updateVisibility)