diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2014-07-15 14:15:46 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2014-10-16 16:56:27 +0000 |
commit | 56eab366fc60fe83024abb6819c146bc9bd47adc (patch) | |
tree | a12aa26e01855c297ebcaf6232319f3e41b1e669 /perllib/Open311/Endpoint/Integration/Warwick.pm | |
parent | f47e9d48a2d26e92723ae96d3d65a1ba005f426f (diff) |
Open311 Warwick (Exor) Integration
::Integration::Warwick subclasses ::Integration::Exor
refactor request_class and new_request
Exor service
Warwickshire updates retrieval, with datetimes
stubbing out of Oracle constants, for local testing
We also edit FMS's core PopulateServiceList routine to hide system
fields from FMS:
Bromley/Warwickshire send metadata in their services/FOO.xml
advising that you can pass, e.g. attributes[easting].
FMS by default shows all of these to the user to fill in, however
we don't *want* the user to supply these, rather they are added
by the cobrand.
Bromley had an exception for this (keyed by $body->areas->id).
We write this more generally for Warwickshire too, keying instead
by $body->name (as this is far less likely to be overridden for
installs using global or custom Mapit's)
Diffstat (limited to 'perllib/Open311/Endpoint/Integration/Warwick.pm')
-rw-r--r-- | perllib/Open311/Endpoint/Integration/Warwick.pm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/perllib/Open311/Endpoint/Integration/Warwick.pm b/perllib/Open311/Endpoint/Integration/Warwick.pm new file mode 100644 index 000000000..0680f7ba1 --- /dev/null +++ b/perllib/Open311/Endpoint/Integration/Warwick.pm @@ -0,0 +1,47 @@ +package Open311::Endpoint::Integration::Warwick; +use Web::Simple; +extends 'Open311::Endpoint::Integration::Exor'; +use Open311::Endpoint::Service::Exor; + +has '+default_service_notice' => ( + default => 'Warwickshire Open311 Endpoint', +); + +sub services { + # TODO, get this from ::Exor + my @services = ( + [ BR => 'Bridges' ], + [ CD => 'Carriageway Defect' ], + [ CD => 'Roads/Highways' ], + [ DR => 'Drainage' ], + [ DS => 'Debris/Spillage' ], + [ FE => 'Fences' ], + [ 'F D' => 'Pavements' ], + [ GC => 'Gully & Catchpits' ], + [ IS => 'Ice/Snow' ], + [ MD => 'Mud & Debris' ], + [ MH => 'Manhole' ], + [ OS => 'Oil Spillage' ], + [ OT => 'Other' ], + [ PO => 'Pothole' ], + [ PD => 'Property Damage' ], + [ RM => 'Road Marking' ], + [ SN => 'Road traffic signs' ], + [ SP => 'Traffic' ], + [ UT => 'Utilities' ], + [ VG => 'Vegetation' ], + ); + return map { + my ($code, $name) = @$_; + Open311::Endpoint::Service::Exor->new( + service_code => $code, + service_name => $name, + description => $name, + type => 'realtime', + keywords => [qw/ /], + group => 'highways', + ), + } @services; +} + +1; |