Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

xhayper/open-cloud.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


open-cloud.js


npm version discord license

About

open-cloud.js is a wrapper around Roblox's Open Cloud API.

Example

import { Client } from "open-cloud.js";

const client = new Client({
    apiKey: "",
    universeId: ""
});

(async () => {
    const dataStoreInstance = client.DataStore.createInstance("Cash");

    // Give "Roblox" 750 cash
    console.log(
        await dataStoreInstance.setEntry({
            entryKey: "1",
            content: "750"
        })
    );
    /*
    Respond:
    {
        version: '', // The entry version
        deleted: false, // Is it deleted?
        contentLength: 3, // The number is 3 letter long!
        createdTime: '', // The time when you set the cash amount
        objectCreatedTime: '' // The time when the key was created
    }
    */

    console.log(
        await dataStoreInstance.getEntry({
            entryKey: "1"
        })
    );
    // 750
    // Oh hey! Roblox still have 750 cash!

    console.log(await dataStoreInstance.listEntries());
    /*
    {
        // Oh hey! only roblox have the cash!
        keys: [ { key: '1' } ],
        nextPageCursor: ''
    }
    */
})();

About

Wrapper around Roblox's Open Cloud API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published