-
Notifications
You must be signed in to change notification settings - Fork 1
ReplDB interfacing options for ReplAPI.it #25
Comments
Pushed an update (2.0.8 on 4/25/2021) with the Database as an Experimental Feature. To use it, turn on Experimental Features. The Database class will support ReplDB functions or the new ReplDB+ setup for ReplDB (in development by me). What is ReplDB+? Current usage:
Current Database Functions
More to come! |
Some (hopefully) planned features:
Security
Ease of life Functions
|
Here are the database options, except easier on the eyes: {
password: '', // <String> (required) A password to use to access the database
type: '', // <String> (required) The type of database; options include "repldb" or "plus"
collaborators: {}, // <Object> (optional) The collaborators on a database (see below)
encrypted: [], // <Array> (optional) Whether to use encryption automatically (see below)
'max-items': 0, // <Integer> (optional)
} In the background, these are the options that are coded into the database: {
id: String(dbToken).split('/')[4] || process.env.REPLIT_DB_URL.split('/')[4],
owner: process.env.REPL_OWNER,
collaborators: { ...options.collaborators } || {},
password: {
hashedpassword: '',
salt: ''
},
type: '',
encrypted: options.encrypted || [false],
'max-items': options['max-items'] || 10,
} What do you put in the collaborator field? collaborators: {
'name-of-collaborator': {
'access': 'read'
}
} or: collaborators: {
'name-of-collaborator': {
'access': ['read', 'write']
}
} What do you put in the encrypted field? encrypted: [true, 'name-of-encryption'] or: encrypted: [false] |
Added deletion features :)
|
One idea no Replit API package has managed so far (to my knowledge), is an interfacing option with ReplDB. I don't quite mean enveloping the ReplDB package with ReplAPI.it, but rather sending requests to the endpoint.
Ideas:
This doesn't do much with just the basic functions and it could possibly be easier for users if there are utilities...
The text was updated successfully, but these errors were encountered: