POST data to callback URL does match API spec and is fresher while request to API doesn’t and is stale
|
|
From the documentation: “The data that is posted to your Callback URL is an Unfuddle Changeset object.” It is, indeed: (several lines removed) 2008-11-04T19:17:42Z2008-11-04T19:17:42Z2008-11-04T19:17:42+00:002295But if I call the RESTful API at /api/v1/repositories/[id]/changesets/latest.xml, the XML I get back doesn’t match the data model: (several lines removed) 22912008-11-04T09:27:06-08:002008-11-04T09:27:06-08:002008-11-04T09:27:06-08:00Notably, the date fields don’t include type=“datetime” and the changeset is actually several changesets old. The former problem necessitates an ugly hack where I have to check the type of the date fields before I can use them and the latter makes my script pretty useless. Any ideas? |
|
|
Jim, The types listed in the API documentation (i.e. type=“datetime”) are for programmer reference only and are not included in responses from the API. Regarding your comment about the /recent changeset being a few changesets behind: Occasionally, if our servers are being particularly pounded with commits, it may take a little while for our background processes to catch up. This means that all of your callbacks will be executed, in order, but there may be a delay between the the actual commit and the callback. We are currently to massively parallelize our background process such that this delay will be negligible. |
|
|
What I’m saying is that the type attributes are not included in responses from the API but they are included in the changeset posted to the callback URL, which totally messes up the automatic parsing in ActiveResource. Can’t they at least be consistent? |
