Huxley (Darwin JSON proxy) now supports the Staff Version of the API

123 views
Skip to first unread message

James Singleton

unread,
Sep 15, 2016, 5:13:45 AM9/15/16
to openrail...@googlegroups.com
Hi all,

Huxley is my open source project that proxies the Darwin SOAP API to
simple HTTP JSON, for easy use in alternative cross-platform tech
stacks. It now supports a subset of the staff version of the Darwin API,
which provides significantly more detail over the basic one.

This work is currently in a branch
(https://github.com/jpsingleton/huxley/tree/staff-version) but I will
merge this in if I don't get any issues reported. This branch is
currently deployed to the demo server (https://huxley.apphb.com) so that
you can try it out if you like.

For example:
https://huxley.apphb.com/StaffAll/London%20Bridge/to/cry/1?accessToken=DA1C7740-9DA0-11E4-80E6-A920340000B1&expand=true

The client side access token is the same for both APIs and Huxley will
choose the correct Darwin access token to use. If you pass through your
token then you will need to use the correct one for the API being called.

There are a bunch of extra fields on the staff API, some have been
renamed and some have a different type. For example, the times are all
now real DateTime objects, which makes them easier to use, rather than
simply display (or do complex parsing). Something to keep in mind with
the staff service details is that you don't just get calling points. You
get all locations, including passed stations and junctions (for example,
Borough Market Jn. and North Kent East Jn. - but you won't get a proper
location name for these, just a TIPLOC with whitespace trimmed).

There are also some improvements to the service API. Huxley now returns
the service ID in multiple forms (original Base64, percent encoded, GUID
and URL safe Base64). The service endpoint will accept any of these and
it will also attempt to patch up any malformed IDs. Plain Base64 strings
don't always play nicely in URLs (particularly if used in the path,
rather than as a query string parameter).

For example:
https://huxley.apphb.com/all/london%20bridge/to/cry/1?accessToken=DA1C7740-9DA0-11E4-80E6-A920340000B1

I'm planning to move Huxley into maintenance mode (and close all other
issues) after this. Any major enhancements will be made in a new version
targeting .NET Core and the .NET Standard Library (once all the
frameworks have been aligned).

This version will still have bug fixes and minor updates but Huxley is
fairly stable now. ASP.NET Core allows for running on more platforms,
plus I can't really write a book on it and not aim to support it. :)

Let me know if you have any questions or comments.


--


Thanks,
James

Twitter - @shutdownscanner
My Blog - https://unop.uk

ASP.NET Core 1.0 High Performance - https://unop.uk/book

James Singleton

unread,
Sep 19, 2016, 1:00:48 PM9/19/16
to A gathering place for the Open Rail Data community
This is now merged into master. Documentation is at: https://huxley.unop.uk
Reply all
Reply to author
Forward
0 new messages