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

Add an API endpoint that resolves arbitrary URLs into specs #322

Open
yuvipanda opened this issue Dec 3, 2017 · 4 comments
Open

Add an API endpoint that resolves arbitrary URLs into specs #322

yuvipanda opened this issue Dec 3, 2017 · 4 comments
Milestone

Comments

@yuvipanda
Copy link
Collaborator

Riffing off the awesomebar concept that @choldgraf and @betatim (and maybe @mariusvniekerk?) have been talking about, I think it'll be useful to have an API endpoint that takes an arbitrary URL and returns a JSON response with possible spec info.

So if you give it a GitHub url (long or short), it'll return the fact that it's a GitHub URL and a spec that can be fed into the rest of the API. Same for gist, or the specific git URLs, or gitlab (or future providers).

Responding with a JSON response allows clients to provide appropriate UI for this functionality before starting builds. In the mybinder.org UI, we can change an icon or something in the bar as soon as URL is pasted and before launch is clicked.

We can implement this with a 'detect' method on each of the providers that get passed this URL and can return True + a spec...

@yuvipanda
Copy link
Collaborator Author

This would also keep provider code all python rather than split it into Python + JS, at the cost of an extra network request. However, if we're going to support other UI providers, making this be a API endpoint that can be hit rather than JS code to be included sounds great.

@yuvipanda
Copy link
Collaborator Author

/cc @rgbkrk who is developing an awesome alternate UI :)

@rgbkrk
Copy link
Member

rgbkrk commented Dec 3, 2017

I think it'll be useful to have an API endpoint that takes an arbitrary URL and returns a JSON response with possible spec info.

👍

@mariusvniekerk
Copy link
Contributor

mariusvniekerk commented Dec 5, 2017

if @rgbkrk uses the build url directly, we could use it to fully validate the build parts of the new providers without having to have a UI yet. :)

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

No branches or pull requests

4 participants