server icon indicating copy to clipboard operation
server copied to clipboard

[FR] Server API

Open andrewcrook opened this issue 3 years ago • 5 comments

Any plans to offer an API for the server to allow makers integrate into other tools?

andrewcrook avatar May 27 '22 11:05 andrewcrook

Nothing in particular. The code is all open so it's possible to run it easily on your own servers. Of course figuring out the environment stuff does take time.

What kind of problems are you looking to solve with an API? Maybe I can open up stuff based on the usecase.

aalemayhu avatar May 28 '22 10:05 aalemayhu

Command line tool, wrapper libraries for other languages, automation scripts, Apple Shortcuts/Applescript , plugins to other markdown applications. I would be wanting to use an API on self hosted anyway.

andrewcrook avatar May 28 '22 10:05 andrewcrook

I have been thinking about this and one approach we can do is to turn the create_deck script into a web server. It's already using JSON for configuring so exposing that, refactoring and providing more flexibility should be good. I am not really a Python guy so open to hear your thoughts if you have any suggestions on tools / frameworks to use. I want to play with FastAPI but codegen using OpenAPI spec is also tempting.

aalemayhu avatar Oct 09 '22 06:10 aalemayhu

rought notes from talking with @alpkaanaksu on what to expose

{
	title: string;
	description: string;
	explanation: {
		title: string;
		logo: string;
		description: string;
		externalLink: string;
	}
	
	connection: unknown;
	
	// Where does the input come from
	// How is it handled
}

aalemayhu avatar Nov 20 '23 18:11 aalemayhu