Event Calendar

Last Updated 7/1/2015

Conventions in this Document:

Text inbold is required. Text initalics should be substituted with the value of a parameter.

All URIs are relative to https://apps.illinoisworknet.com/.

API interfaces

Events

Gets list of all events meeting the search criteria. All parameters are optional except radius, which is required if you specify a zip. NOTE: You will never find a grade level of "All" (id 1) or "Not Applicable" (id 19) in the database. "All" exists for the convenience of the user entering the event, and selects "Pre-Kindergarten" through "Technical" (ids 2-18). "Not Applicable" exists for validation purposes, to require that the user select at least one grade level. It is not stored in the database.
id
integer ID of the Calendar.
searchCalendars
CSV list of calendar IDs (all integers).
eventType
CSV list of event type IDs (all integers).
keyword
Keyword to search on.
zipcode
A single zipcode to use as a starting point for a search (specifying this requires also specifying miles).
miles
Radius from zipcode to search within (required if zipcode is specified).
zipcodelist
CSV of zipcodes to search near - useful for searching by LWIA or county.
interval
Number of events to return.
skip
Number of matches to skip before returning results.
approvalStatus
Approved, Unapproved, or All
createdby
Name of the account that created the event
start
Start date for the events
end
End date for the events
audienceType
CSV of Audience IDs (all integers)
gradeLevel
CSV of Grade Level IDs (all integers)
interest
CSV of Interest IDs (all integers)

Audience

MethodURIParametersDescription
GET/CalendarAPI/api/Audience/NoneGets list of all Audiences
GET/CalendarAPI/api/Audience/ididRetrieves the audience whose Id = id.

Bad Words

MethodURIParametersDescription
GET/CalendarAPI/api/Badwords/?inputtext=texttextChecks text for bad words.

Calendar

MethodURIParametersDescription
GET/CalendarAPI/api/Calendar/NoneGets list of all available calendars
GET/CalendarAPI/api/Calendar/?defaultcalendar=truedefaultcalendarRetrieves the default calendar
GET/CalendarAPI/api/Calendar/ididRetrieves the calendar with Id = id.
POST/CalendarAPI/api/Calendar/CalendarDTOCreates the calendar specified in the CalendarDTO in the body of the request. CalendarDTO is a JSON object. Requires authentication.

City

MethodURIParametersDescription
GET/CalendarAPI/api/City/city=city&take=nbrcity is the start of a city name. take is the number of results to return.Lookup city from first few characters.
GET/CalendarAPI/api/City/zipcode=zipZipLookup city by zipcode.

Event Details

MethodURIParametersDescription
GET/CalendarAPI/api/EventDetails/ididGets Event details of the event whose Id = id.
DELETE/CalendarAPI/api/EventDetails/ididRetrieves the audience whose Id = id. Requires authentication.
POST/CalendarAPI/api/EventDetails/EventDTOCreates the event specified in the EventDTO in the body of the request. EventDTO is a JSON object. Requires authentication.
PUT/CalendarAPI/api/EventDetails/EventDTOUpdates the event specified in the EventDTO in the body of the request. EventDTO is a JSON object. Requires authentication.

Event Types

MethodURIParametersDescription
GET/CalendarAPI/api/EventTypesNoneGets list of all Event Types
GET/CalendarAPI/api/EventTypes/ididRetrieves the event type whose Id = id.
POST/CalendarAPI/api/EventTypes/EventTypeDTOCreates the event type specified in EventTypeDTO in the body of the request. EventTypeDTO is a JSON object. Requires authentication.

Fields of Interest

MethodURIParametersDescription
GET/CalendarAPI/api/FieldOfInterest/NoneGets list of all fields of interest.
GET/CalendarAPI/api/FieldOfInterest/ididRetrieves the field of interest whose Id = id.

Grade Level

MethodURIParametersDescription
GET/CalendarAPI/api/GradeLevel/NoneGets list of all grade levels.
GET/CalendarAPI/api/GradeLevel/ididRetrieves the grade level whose Id = id.

iCal

MethodURIParametersDescription
GET/CalendarAPI/api/iCal/ididRetrieves the event whose Id = id in iCal format, suitable for importing into Outlook or other calendars.

Luminosity

MethodURIParametersDescription
GET

/CalendarAPI/api/Luminosity/

?pColor1=color1

&pColor2=color2

color1 and color2Calculates luminosity ratio for two colors, expressed as standard color names (e.g. Blue) or as hex codes. Useful for determining if two colors are accessible or not. Returns a float.

Spell Check

MethodURIParametersDescription
POST/CalendarAPI/api/SpellCheck/SpellDTOReturns JSON object with list of incorrect words or suggested words based on the action parameter.
GET/CalendarAPI/api/SpellCheck/SpellDTOReturns JSON object with list of incorrectly spelled words.

ZIP Code

MethodURIParametersDescription
GET

/CalendarAPI/api/Zipcode/?zipcode=zip &take=take

zip – zip code fragment takenumber of results to return

Gets list of zipcodes based on partial string value of a zipcode. Used for autocomplete features for a zipcode field.
GET/CalendarAPI/api/FieldOfInterest/?city=citycityRetrieves a list of zipcodes for a city name.

Data Transfer Object (DTO) classes

CalendarDTO

  public class CalendarDTO 
  {    
    public int Id;  
    public string Name; 
    public bool Default; 
    public string Description; 
  } 
  

EventDTO

  public class EventDTO 
  { 
    public int Id; 
    public string Title; 
    public DateTime Start; 
    public DateTime StartUTC;  
    public DateTime End; 
    public DateTime EndUTC;  
    public string Code; 
    public string Description; 
    public string DescriptionHtml;  
    public bool Active; 
    public bool Virtual;  
    public string Url; 
    public bool AllDay;  
    public string Address;  
    public string City;  
    public string Zipcode; 
    public decimal Latitude; 
    public decimal Longitude;  
    public string ContactInfo; 
    public bool ApprovalRequired; 
    public bool Approved; 
    public DateTime ApprovalDate;  
    public string ApprovedById; 
    public DateTime RegistrationCloseDate; 
    public int EventTypeId; 
    public string EventTypeName; 
    public string CreatedById; 
    public DateTime CreatedDateUTC; 
    public string UpdatedById; 
    public string RemainingDates; 
    public string AllEventDates; 
    public bool ApproveAllEvents;
    public bool IsInOccurrence;
    public bool EditAsSingleEvent; 
    public int OccurrenceId; 
    public OccurrenceDTO Occurrence;
    public int CalendarId; 
    public string CalendarName;
    public virtual ICollection<AudienceDTO> Audiences; 
    public virtual ICollection<GradeLevelDTO> GradeLevels; 
    public virtual ICollection<FieldOfInterestDTO> FieldsOfInterest; 
    public ICollection<int> AudienceIDs; 
    public ICollection<int> GradeLevelIDs; 
    public ICollection<int> FieldsOfInterestIDs;
    public string GoogleCalendarURL; 
    public string LiveCalendarURL; 
    public string YahooCalendarURL; 
  }
  

EventType DTO

  public class EventTypeDTO 
  { 
    public string Name; 
  } 
  

SpellDTO

  public class EventTypeDTO 
  { 
    public string Name; 
  }