Kong / apiembed

Embeddable API code snippets for your website, blog or API documentation
https://apiembed.com
MIT License
410 stars 52 forks source link

Showing target choices when there is only one target #3

Closed montanaflynn closed 9 years ago

montanaflynn commented 9 years ago

If there is only one implementation for a target then we shouldn't ask.

screen shot 2015-03-11 at 4 27 08 pm

ahmadnassri commented 9 years ago

:+1: was holding back since more are coming ... though for ocaml doubt there will be (didn't even anticipate we'll have that one on launch)

montanaflynn commented 9 years ago

Couldn't we add the logic of "If there's more than one, show up" instead of doing it on a per target basis?

ahmadnassri commented 9 years ago

yeah, that's what i'll be doing ...

SGrondin commented 9 years ago

There won't be another one for OCaml, you can just remove the All checkbox, but I think it's important to keep the "Cohttp" somewhere because it's important information.

ahmadnassri commented 9 years ago

I think a design update is needed, I wanna be able to show the "library" info somewhere, link to source ... @jitachi

montanaflynn commented 9 years ago

Should still remove it for now because it's really weird. That OCaml uses a library needs to be apparent inside the code or embedded widget since people will be seeing it embedded in another website. A code comment at the top would be sufficient, just like we do with Unirest on mashape.

ahmadnassri commented 9 years ago

@montanaflynn yeah, I think we're saying the same thing, I mean for inside the widget, not the site, be nice to give credit to the library source & even the contributing author for each target converter

something along the lines of:

Unirest support by @therebelrobot

ahmadnassri commented 9 years ago

something along those lines:

image

ahmadnassri commented 9 years ago

maybe for libraries the text would be: COhttp support by ... since the language name is already obvious in the tab

montanaflynn commented 9 years ago

I was mostly replying to @SGrondin to make sure the library is mentioned inside the embedded widget.

So in the top of his code he would put something like:

(* Requires https://github.com/mirage/ocaml-cohttp *)

and we would do the same for Unirest and other non-native targets.

ahmadnassri commented 9 years ago

ah, code comments, yes those are good.

SGrondin commented 9 years ago

I'll add a comment.