GithubHelp home page GithubHelp logo

imclab / node-open311 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mheadd/node-open311

0.0 2.0 0.0 76 KB

A Node.js module for interacting with the Open311 API.

Home Page: http://civic.io

node-open311's Introduction

Overview

A Node.js module for interacting with the Open311 API (version 2). See Open311.org

Installation

npm install open311

Usage

var util = require('util');
var Open311 = require('./lib/open311').Open311;

//Options for the City of Baltimore (see http://311test.baltimorecity.gov/open311).
var options = {
        'endpoint': '311test.baltimorecity.gov',
        'service_path': '/open311/v2/',
        'jurisdiction_id': 'baltimorecity.gov'
        };

// Create a new Open311 object.
var report = new Open311(options);

// Call getServiceRequest to get the status of a specific request.
report.getServiceRequest('json', '4e6cbd2a9dc2f112940000bc', function(error, data) {	
	util.puts(util.inspect(data));	
});

Output

[
    {
        "token": "4e6cbd2a9dc2f112940000bc",
        "status": "submitted",
        "service_name": "Graffiti Removal",
        "service_code": "4e39a3aad3e2c20ed800000c",
        "requested_datetime": "2011-09-11T09:52:43-04:00",
        "updated_datetime": "2011-09-11T09:52:43-04:00",
        "lat": 39.3257703014457,
        "long": -76.5906496206646,
        "media_url": "http://311test.baltimorecity.gov/attachments/report/4e6cbd2a9dc2f112940000bc/photo/395284434.jpg"
    }
]

node-open311's People

Contributors

mheadd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.