heroku / platform-api

Ruby HTTP client for the Heroku API
MIT License
213 stars 86 forks source link

Update platform API to current schema #56

Closed beccadax closed 7 years ago

beccadax commented 7 years ago

Adds APIs available as of 13 January 2017. Among other things, these include:

I have no idea what the policy is for updating this gem, but since I need one of these APIs (SNI Endpoint), I thought it wouldn't hurt to send a pull request.

This is just a straight rebuild on the current schema.json. I have two concerns about it:

  1. The schema appears to have changed many endpoints from using the spelling addon to add-on. This has caused widespread spelling changes from Addon to AddOn and from addon to add_on. While the new spellings are probably more readable, this will probably break a lot of existing code. Should we add in some sort of compatibility aliasing for the old names? I don't see any indication in the project that this is currently being done.

  2. The old PlatformAPI::Source#create call has been deprecated, which (thanks to a bit of patching by @naaman) turns it into create___deprecated with three underscores. While not an ideal name, this is at least callable, and it’s not going to be mistaken for either its non-deprecated replacement (which takes a different number of parameters, so mixing the two up will cause a runtime error) or anything else that’s currently recommended.

geemus commented 7 years ago

See also: https://github.com/interagent/heroics/pull/78#issuecomment-271997893 (which thanks to schema fixes is probably not absolutely necessary, but would still be nice to have in some capacity).

geemus commented 7 years ago

I believe the newest release(s) included the new stuff, though we lost track of this PR along the way. Apologies for this lingering for so long.