Deogle / helth-service

1 stars 0 forks source link

Add support for Fitbit #23

Open Deogle opened 2 months ago

Deogle commented 2 months ago

In order to support fitbit, a few features need to be built in each service.

Frontend

Need to finish the implementation of oauth for fitbit. Not sure if I have a dev app set up and I do not have a fitbit device which makes setup/testing astronomically more difficult. The oauth flow should be possible without a device since it only requires an account to auth with our app.

Api

I want to say this is mostly built out - the api is responsible for actually fetching tokens / storing tokens / generating redirect URL's for the frontend to consume. Major work here needs to be in hooking up fitbit subscriptions and building adapters to send to our pubsub queue. The remaining work would be

Discord client

Hopefully the first draft of fitbit support won't require any changes to the discord client. The Api should be publishing messages to the pubsub topic that are all shaped the same. We will want to properly type that message as, right now, it is a non-deterministic kv object { [key: string]: any } | null.

augustus6729 commented 1 month ago

@Deogle Was a client ID to represent the helth-app ever generated via https://dev.fitbit.com/apps? It looks like this is one of the required parameters to pass to Fitbit.