forked from mheadd/node-open311
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreaterequest.js
More file actions
25 lines (21 loc) · 743 Bytes
/
createrequest.js
File metadata and controls
25 lines (21 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
*
*/
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'
};
var parameters = {
'address_string':'210 East Centre Street, Baltimore, MD',
'media_url':'http://twitpic.com/1n6s2k'
};
// Create a new Open311 object.
var report = new Open311(options);
// Call postSericeRequest to create a new service request.
report.postSericeRequest('json', '4e39a3abd3e2c20ed8000016', 'your-api-key-here', parameters, function(error, data) {
util.puts(util.inspect(data));
});