Use /api instead of /proxy in trampoline examples
This commit is contained in:
1 parent
ce0882372c
commit
e83b0a0b8b
3 files changed
+3
-3
No files matched your search
@@ -62,7 +62,7 @@ const projectData = fs.readFileSync('project.sb3');
|
||||
// or fetch a shared Scratch project:
|
||||
const fetch = require('cross-fetch').default; // or whatever your favorite HTTP library is
|
||||
const id = '437419376';
|
||||
const projectMetadata = await (await fetch(`https://trampoline.turbowarp.org/proxy/projects/${id}`)).json();
|
||||
const projectMetadata = await (await fetch(`https://trampoline.turbowarp.org/api/projects/${id}`)).json();
|
||||
const token = projectMetadata.project_token;
|
||||
const projectData = await (await fetch(`https://projects.scratch.mit.edu/${id}?token=${token}`)).arrayBuffer();
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ const Packager = require('../dist/packager');
|
||||
const run = async () => {
|
||||
// Example of how to fetch() a project from Scratch:
|
||||
const id = '437419376';
|
||||
const projectMetadata = await (await fetch(`https://trampoline.turbowarp.org/proxy/projects/${id}`)).json();
|
||||
const projectMetadata = await (await fetch(`https://trampoline.turbowarp.org/api/projects/${id}`)).json();
|
||||
const token = projectMetadata.project_token;
|
||||
const projectData = await (await fetch(`https://projects.scratch.mit.edu/${id}?token=${token}`)).arrayBuffer();
|
||||
|
||||
|
||||
Reference in new issue
Block a user