A set of C# classes for interacting with the Open311 API
Latest commit 5ef5183 Apr 9, 2012 @mheadd * Sample.pidb:
* Open311API.pidb: 

* sample.cs: Clarified sample usage.



A set of C# classes for working with v.2 of the Open311 API (GeoReport API V2). For documentation on the GeoReport API, see http://wiki.open311.org/GeoReport_v2

This project was created using Mono version 2.4.4 (http://mono-project.com) and MonoDevelop 2.2.1 (http://monodevelop.com/).


using System;
using Open311API;
using Open311API.Exception;
using Open311API.Structs;

namespace Sample
    /// <summary>
    /// A simple example that uses the Open311API class library.
    /// </summary>
    class Open311Sample
        // The development endpoint for the Baltimore City Open311 API.
        const string ENDPOINT = "http://311test.baltimorecity.gov/open311/v2/";

        // The jurisdiction ID for Washington DC.
        const string JURISDICTION_ID = "baltimorecity.gov";

        // Sample service request ID.
        const string SERVICE_RQUEST_ID = "4e6cbd2a9dc2f112940000bc";

        // App entry point.
        public static void Main (string[] args)
            // Create a new instance of the Open311 object.
            Open311 report = new Open311(ENDPOINT, JURISDICTION_ID);

                Console.WriteLine(report.GetServiceRequest(ResponseFormat.XML, SERVICE_RQUEST_ID));
            catch (Open311Exception ex) 
                Console.WriteLine("Sorry. An error occured: " + ex.Message);





<?xml version="1.0" encoding="UTF-8"?>
    <service_name>Graffiti Removal</service_name>