Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API #63

Open
gampleman opened this issue Oct 10, 2018 · 3 comments
Open

API #63

gampleman opened this issue Oct 10, 2018 · 3 comments

Comments

@gampleman
Copy link

It would be nice if one could create and update Ellies programatically.

Let me elaborate on my usecase for this. Elm-visualization has a companion website that shows a bunch of examples of using the library. This works well, but if a user wants to start experimenting with one of the examples, they need to do a fair amount of setup to get to a place where they can even compile one of the examples. Ideally, there would be a link to an Ellie version of the example, so they could start hacking right away.

Now the example website it built using this tool. I would like to add a command to the tool that would go and publish all the examples as ellies and add the links into the generated website.

@gampleman
Copy link
Author

An alternative to this would be a way to prefill an Ellie. See this page for what codepen.io does here.

@supermacro
Copy link

Bumping this feature request. I am working on a documentation site and I would like to generate ellie's programmatically. Althought I wasn't really thinking of an API, but rather being able to load an ellie with a base64 encoded elm program as part of the url:

i.e.

https://ellie-app.com?program=<base64EncodedProgram>

@gampleman
Copy link
Author

So turns out there are 2 existing ways to proceed with this.

  1. You can use the GraphQL API that Ellie itself uses. You can play with it here. For an example that illustrates publishing, see here.

  2. According to @lukewestby:

...there’s a little-known feature where you can prefill a new Ellie without having to save

https://ellie-app.com/a/example/v1?title=hello%20world&elmcode=hello&htmlcode=world&packages=elm%2Fbrowser%401.0.2&elmversion=0.19.0

(Small thing - the percent decoder doesn’t handle + correctly so you have to use %20 for spaces)

So the main thing missing is some documentation on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants