This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

open-cloud.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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"
        })
    );
    // Oh hey! Roblox still have 750 cash!

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

Package Sidebar

Install

npm i open-cloud.js

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

29.1 kB

Total Files

23

Last publish

Collaborators

  • xhayper