Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yushimatenjin/playcanvas-node
REST API wrapper for Node
https://github.com/yushimatenjin/playcanvas-node
javascript nodejs playcanvas rest-api
Last synced: about 1 month ago
JSON representation
REST API wrapper for Node
- Host: GitHub
- URL: https://github.com/yushimatenjin/playcanvas-node
- Owner: yushimatenjin
- License: mit
- Created: 2019-05-22T05:00:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-06T05:44:15.000Z (over 1 year ago)
- Last Synced: 2024-04-26T15:03:40.983Z (8 months ago)
- Topics: javascript, nodejs, playcanvas, rest-api
- Language: TypeScript
- Homepage: https://yushimatenjin.github.io/playcanvas-node/
- Size: 390 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-playcanvas - playcanvas-node - REST API wrapper for Node.js. (Extensions and Utilities)
README
## Installation
```bash
npm install --save playcanvas-node
```## Documentation
- [REST API - PLAYCANVAS MANUAL](https://developer.playcanvas.com/en/user-manual/api/)
## Example
```javascript
import PlayCanvas from "playcanvas-node";const options = {
accessToken: "xxxxxxxxxxxxxxxx",
scenes: [000000,111111],
projectId: 000000,
branchId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
projectName: "xxxxxx"
};
const playcanvas = new PlayCanvas(options);(async () => {
const res = await playcanvas.listAssets();
console.log(res)
})();```
### Apps
- [x] Download app
- [x] Get primary app
- [x] Get project apps
- [x] Get app### Assets
- [x] Create asset
```javascript
const options = {
name: "index.html",
path: "./dist/index.html"
};
await playcanvas.createNewAsset(options);
```- [x] Delete asset
- [x] Get Asset File
- [x] Get Asset
- [x] List assets
- [x] Update assetUpload
This is the supported type.
`.js`,`.css`,`.txt`,`.json`,`.html`
[https://developer.playcanvas.com/en/user-manual/api/asset-create/](https://developer.playcanvas.com/en/user-manual/api/asset-create/)```javascript
const playcanvas = new PlayCanvas(options);
const remotePath = process.env.NODE_ENV === 'development' ? "dev" : "build"
await playcanvas.updateAssets(dev,"index.html","./dist/index.html");
```### Branches
- [x] List branches
### Jobs
- [x] Get job
### Projects- [x] Archive project
### Scenes
- [x] List scenes