There might be more endpoints to the API which might have all these info. Only if they documented the API and officialy released it, now that the ToS contains information regarding the API. Also, some info might need authentication and some might requests like POST and PATCH.
@khalby786 perhaps there could be a wayā¦ Like remixing through the actual project site sends a request to a dashboard which holds the counter
@random when a project is remixed, two POST requests are made:
https://api.glitch.com/projects/PROJECT_ID/edited
https://api.glitch.com/v1/projects/by/domain/PROJECT_NAME
Maybe we can count how many times the requests are made
How do you that? Considering the fact that Glitch API is not oursā¦
Noā¦ But there are packages
What are they? Iām very interested in finding a way to get remixesā¦
If only Team Analytics still existed.
Okay, Iām gonna ask Glitch Staff if an endpoint exists: @glitch_support.
I think @jarvis394 had oneā¦
Would there be a way to manually tell, like some kind of external console.log(window.location.hostname)
?
The NPM package doesnāt have itā¦
There is a env variable for project ids of remixes (if It is useful for at all for you) it is called PROJECT_REMIX_CHAIN
which has something like this for example [b952187a-ea2e-4a1c-9055-f455c996a381,0a59806f-5c0d-468e-84bb-fa5b54ecf500,929980a8-32fc-4ae7-a66f-dddb3ae4912c]
and is something currently being documentated over here https://github.com/youngchief-btw/Glitch-Docs
Thanks for all the info @youngchief!
Thatās nice to know, but how would i convert the string into number of remixes?
@youngchief, I donāt think that solves the issue because as @FlantasticDan said, it only shows the projects which make up the current project. And in all cases (except GitHub import projects, Iām not sure) it is one of the three projects or sometimes all three of them, named static-start
, hello-express
and hello-webpage
. See Idea: Store number of remixes in .env and Idea: Store number of remixes in .env
I believe you could do something like this, but I havenāt tried it before. Iām just assuming this is how the remix chain works:
let remixes = process.env.PROJECT_REMIX_CHAIN
remixes = remixes.replace("[", "").replace("]", "")
let remixarray = remixes.split(",")
let number = remixarray.length
Or a one-liner function:
const getRemixes = () => (process.env.PROJECT_REMIX_CHAIN || "").match(/[0-9-a-f\-]+/gi) || [];
Usage:
getRemixes()
// [
// "b952187a-ea2e-4a1c-9055-f455c996a381",
// "0a59806f-5c0d-468e-84bb-fa5b54ecf500",
// "929980a8-32fc-4ae7-a66f-dddb3ae4912c"
// ]
I knew that used to be a checkbox! When did they remove it?
Iāve been on glitch for 7 months and I canāt remember ever seeing it.
Iāve been on it since October 2019 and havenāt seen it.
Thats when I joined too!