Skip to content

SantiMunin/open311simplewrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open311simplewrapper

This is an example of a possible GSoC project related to the Open311 API.

It contains a basic functionallity which allows the wrapper user to get services from a city he wants.

Configuration

In order to test this project you should have Maven installed in your system. You can find it in any repository you use (brew, apt...).

IMPORTANT: Before you start using the library you need to add some certificates to your java keystore (those certificates are in /certificates). Your keystore probably is in $JAVA_HOME/lib/security/cacerts or $JAVA_HOME/jre/lib/security/cacerts. The password should be changeit (try changeme if you are on a Mac and changeit doesn't work).

sudo sh add_certificates.sh <path/to/your/key/store>
# Compile the project (and download dependencies)
mvn compile

# Execute tests
mvn test

Usage

If you compile the project you will find the .jar in /target. Just import it in your application and start hacking!

To start using the library you need to use is the JReport class.

// Get the JReport single instance
JReport jreport = JReport.getInstance();

// Get all supported cities (this will return a String[] containing {"San Francisco, CA", "Chicago, IL, ..."})
jreport.getCities();

// Get a city wrapper
JWrapper sfWrapper = jreport.getCityWrapper(City.SAN_FRANCISCO);

// Get a list of services
List<Service> sfWrapper.getServices();

IMPORTANT: This is just a quick approach to the problem, the whole idea can be found here.

About

This is an example of a possible GSoC project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages