/dena

A promise based Deta http api wrapper for deno.

Primary LanguageTypeScript

Dena

A library for intracting with deta API from deno

Getting started

import Dena from  'https://deno.land/x/dena@2.2.0/mod.ts'

  

const  dena  =  new  Dena("API_KEY", "PROJECT_ID")

  

const  users  = dena.Base("users")

const  photos  = dena.Drive("photos")

  

await users.insert({

key : "KEY", // optional

username : "mustafa"

})

  

photos.put("me.png", {

data : new  Uint8Array([0]), //Uint8Array

//OR

path : "./path-to-me.png"

})

Supported methods

Base

  • put Base.put
  • get Base.get
  • delete Base.delete
  • insert Base.insert
  • update Base.update
  • query Base.query

Drive

  • put Drive.put
  • Initialize Chunked Upload
  • Upload Chunked Part
  • End Chunked Upload
  • Abort Chunked Upload
  • Download File Drive.get
  • List Files Drive.list
  • Delete Files Drive.delete