This is a java client to submit issues to Open311 GeoReport v2 compliant systems.
- REST API design
- Image submission
- Compatible platforms:
- Java applications
- Android
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.OneBusAway:open311-client:1.0.10'
}
This is the steps for publishing the open311-client
on jcenter
repository.
1 - Create an account on Bintray.
We need to specify the URL from which to distribute your project.
<distributionManagement>
<repository>
<id>maven-example-id</id>
<url>https://api.bintray.com/maven/testaccount/maven-repo/maven-example/;publish=1</url>
</repository>
</distributionManagement>
We need to provide Bintray username and API Key to the Maven settings.xml
file. This may be under your Maven installation directory (e.g., C:\Program Files\Apache Software Foundation\apache-maven-3.2.5\conf
).
<server>
<id>maven-example-id</id>
<username>testaccount</username>
<password>***testaccount-secret-api-key***</password>
</server>
Finally, we can run mvn deploy
to complete publishing.
// Create an open311 option with api url and api key
Open311Option option = new Open311Option(API_URL, API_KEY, JURISDICTION_ID)
Open311Manager.initOpen311WithOption(option);
// Enable debug logging
Open311Manager.getSettings().setDebugMode(true);
// Don't call post methods
Open311Manager.getSettings().setDryRun(true);
// Set connection timeout to 30 seconds
Open311Manager.getSettings().setConnectionTimeout(30*1000);
Open311 open311 = Open311Manager.getDefaultOpen311();
// Returns service list
ServiceListResponce slr = open311.getServiceList();
// Get service description
ServiceDescription sd = open311.getServiceDescription(serviceListRequest);
// Post a service request
ServiceRequestResponse srr = open311.postServiceRequest(serviceRequest);
/*
* Copyright (C) 2014-2015 University of South Florida (sjbarbeau@gmail.com, cagricetin@mail.usf.edu)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/