Closed ghost closed 3 years ago
Very cool! Some replies to your questions:
How can I create new prompts using the @withorbit/api-client package? Couldn't find a clear way to do this.
I'm sorry that the APIs aren't documented yet. As it happens, they're still in flux and not quite ready for adoption, so—beware!! But if you'd like to keep playing in the meantime, you'd create a new prompt by PATCH
ing /taskData
with the prompt contents and ID (see orbitAPI.ts).
Is there a standardized way to extract the Page title from the current site?
Not that I know. You can see how the web component does this at /packages/api/web-component/src/metadataMonitor.ts.
How should authentication work? For now, I'd be fine with setting an ORBIT_TOKEN and saving it to local storage. (Might be worth waiting for #195?)
This looks like a great candidate for an OAuth client! i.e. so that an Orbit user can indicate that this plugin should be able to read/write their account. Filed: https://github.com/andymatuschak/orbit/issues/216
What should be the license? Not sure if you'd like this to be part of the repo — just putting this out there.
I'm excited that you're experimenting with this! Just for expediency, I'd suggest that you continue iterating on this package in a separate repo. (I'd be happy to keep providing comments / help there) If it evolves into something production-ready, we can figure out what it might mean to make it "official".
Motivation
Whenever I come across something interesting on the web I have the urge to incorporate that concept into my orbit. This browser extension would allow me to do so by making it possible to create Orbit prompts on any website.
For now, I've worked on the code structure and built some basic UI.
Questions
@withorbit/api-client
package? Couldn't find a clear way to do this.ORBIT_TOKEN
and saving it to local storage. (Might be worth waiting for #195?)Caveats
_execute_action
)Not sure if you'd like this to be part of the repo — just putting this out there.