Open ProgrammerIn-wonderland opened 3 years ago
i might write that now
wait let me look at github api endpoints
omg
no way what if you could pull discord statuses and update it to your github profile
why is this unironically better than discord api https://docs.github.com/en/rest
ive never used gh api before tbf let me see if theres any libs with the user data endpoint implemented
it looks simple as hell
fuck this
npm init
using this lib (official) Octokit the code is
await octokit.request('PATCH /user', {
bio: 'new status'
})
they call it octokit thats so sick
using this lib (official) Octokit the code is
await octokit.request('PATCH /user', { bio: 'new status' })
thats dead fucking simple
why aren't all libs like this
(and APIs)
because developers are dumb bear with me if i take a while to reply im multitasking with like 4 other things
I understand lol
no way what if you could pull discord statuses and update it to your github profile
either requires self bot or for you to be in a discord server with a bot checking for status updates (priviledged intent)
no way what if you could pull discord statuses and update it to your github profile
either requires self bot or for you to be in a discord server with a bot checking for status updates (priviledged intent)
yeah i feel like thats probably overkill, spotify integration could be cool tho, i would totally just leave it in a container
yeah it would be
although last time i used spotifyapi i wanted to throw my keyboard against a wall, hopefully its a little easier this time
I'm kinda surprised how good the github api is tho
everything is exposed
i kinda want to fuck with it now, ive never used it before
same
is it me or is this new
I think thats new
seems like bio and whatever the fuck status is, are different
nice, gonna try it once i get this done can i see your status?
i can
nice, gonna try it once i get this done can i see your status?
here is shell code (curl)
curl \
-X PATCH \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user \
-d '{"bio":"test"}' \
-u "NyleCohen"
when it asks for password dont put your github password go here https://github.com/settings/tokens/new select this and use the token
agh ik personal access tokens are a 1000x more secure but i just cant use them well
same
kinda sad about the password deprecation, so what if I hate security?
if I'm insecure in real life let me be insecure online too god damn it
hahaha true to be fair im probably the most insecure person online which is super ironic considering i preach internet security all the time literally 2 days ago my vrchat account got a login from the united states, i had to change my password
aww its not real time on phone
fuck come on github you were on to something here
test
test passed
Ok the mobile website is real time
The mobile app isnt
ok cool wait i wonder if fasthub is realtime let me check
Hey at least they have a mobile website unlike discord
lmaooo true then again most of the user base doesnt use web discord so ig there isnt a reason
Test
Here is the discord "mobile website"
I think the reason the mobile app isnt real time is because the github app uses the actual github api (thats also probably why the api is so good) and the api doesn't have realtime issues
you probably could