Comments (3)
@simonharrer does your mob setup care much about positions like navigator or driver, and is there a rotation? You can certainly not add people to the mob section and just use the timer.
So this is how the internals work, and you might be able to hack something together for now:
- Connect a websocket to
https://mobtime.mrbarry.com/your-timer-id
- It will send a payload that looks something like
{ type: 'token', token: 'YOUR SESSION TOKEN', state: { ...stateOfTimer } }
- take that token - Every minute or so, send a
{ ping: <unix timestamp in milliseconds> }
through the websocket to keep the socket connection alive. - Now you can make API calls via
https://mobtime.mrbarry.com/api/X
withAuthorize: token <token from websocket>
as a header.
The API you're going to care about is:
/api/timer/start/<milliseconds>
- I typically add 999
so the initial second runs without making the timer bump to the next second
/api/timer/pause
/api/timer/resume
And if you care about mob person management:
/api/mob/add/<encoded name of mobber>
/api/mob/remove/<encoded name of mobber>
/api/mob/cycle
to rotate mobber positions if you have a regular/predictable rotation.
But keep in mind that this is sort of shoe-horning how mobtime works. You might find just having a dedicated person in charge of managing the timer to be just as effective without having to introduce new code.
I also opened #35 which an alternative path forward, but I need to think through a lot of implications, and it may require a number of prerequesite features that I may not want.
from mobtime.
@simonharrer does that initial plan work? I can better document the API if that will help. It looks like go has a websocket library - you could temporarily connect a websocket, do a series of api calls with the token, then disconnect to do what you want. There's no current penalties for quick websockets or connections over time.
from mobtime.
Just to let you know that I've currently so much on my plate that I don't know when I can come back to this. Closing this for now, and will reopen when I do have time for this. Thanks for your awesome and quick help already!
from mobtime.
Related Issues (20)
- Mobtime changed from blue to white and buttons changed to link HOT 6
- Cannot deploy to github or netlify HOT 3
- yarn deploy errors with Cannot find module 'postcss'
- UI: Need highlighting for Navigator/Driver HOT 1
- Remove Drag/Drop handle or make it work again
- Dark mode
- mobtime-sdk
- Persist people and team settings permanently HOT 3
- Fix rename-goal dialog styles in dark mode
- Can add blank user names
- Add option in settings to automatically start timer after it beeps HOT 5
- "Share" tab broken HOT 1
- Option to pick members in random order HOT 3
- Feature request: persist completed goals HOT 1
- add mob video chat url HOT 2
- add mob member by url, to reduce friction point, and make it easier to mob with others HOT 2
- Make sure there are no null objects returned from backend HOT 2
- Make mobtimer URL configurable
- Enable "skip" button when the timer is neither running nor on pause and only "start" button is enabled.
- Allow resetting the timer without changing the driver-navigator pair
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobtime.