psolbach / iconbin

Beautiful favicons API
27 stars 2 forks source link

API call on website does not work #22

Closed graypegg closed 8 years ago

graypegg commented 8 years ago

The example API call on the website is:

request({
   url: "https://iconbin.com/api/instagram.com,
   json: true
}, cb)

It doesn't explain the purpose very well (cb isn't synonymous with call back functions), and doesn't offer any useable code. (nvm, realized this is the Request API could be better explained though, possible as an option in a language selector like checkbox 3?)

Postmark API Example

psolbach commented 8 years ago

I agree about 1. Reasoning about 2, 3: The example call is sufficiently abstract as to allow developers to get the point, sort of like pseudo-code would. We're only dealing with a simple request here, so I think language tabs are overkill. Also, since the fetch API isn't available yet in Node we need to enable CORS first #21 for that to make sense.

tschoffelen commented 8 years ago

Agreed, the current example makes it sufficiently clear how to use the API, so no need to execute points 2 or 3 I think.

psolbach commented 8 years ago

@toish I added a rudimentary webserver just for the API as per your request. Cross-domain fetch() is now implemented by @tschoffelen. While icons are continuously delivered to server, these changes will be reflected later during the day.