diff options
author | Dave Whiteland <dave@mysociety.org> | 2013-01-21 22:46:32 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2013-01-21 22:46:32 +0000 |
commit | 6a8f1a0f959a975bbd263962f70842a48ccf1a5d (patch) | |
tree | abade99bee4444dd9abd0b998eee3ae958584a78 /perllib/Open311 | |
parent | 3d3cbcee61636734200fafb5f91d68e3cbaee20a (diff) |
add Oxfordshire's non-standard endpoint for service request updates
Diffstat (limited to 'perllib/Open311')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index 10c8b07e3..c08d81a8c 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -12,6 +12,8 @@ has end_date => ( is => 'ro', default => undef ); has suppress_alerts => ( is => 'rw', default => 0 ); has verbose => ( is => 'ro', default => 0 ); +Readonly::Scalar my $COUNCIL_ID_OXFORDSHIRE => 2237; + sub fetch { my $self = shift; @@ -32,11 +34,16 @@ sub fetch { jurisdiction => $council->jurisdiction, ); + # custom endpoint URLs because these councils have non-standard paths if ( $council->area_id =~ /2482/ ) { my $endpoints = $o->endpoints; $endpoints->{update} = 'update.xml'; $endpoints->{service_request_updates} = 'update.xml'; $o->endpoints( $endpoints ); + } elsif ($council->area_id =~/$COUNCIL_ID_OXFORDSHIRE/o) { + my $endpoints = $o->endpoints; + $endpoints->{service_request_updates} = 'open311_service_request_update.cgi'; + $o->endpoints( $endpoints ); } $self->suppress_alerts( $council->suppress_alerts ); |