https://github.com/codeforboston/ma-laws
The General Laws of the Commonwealth of Massachusetts
https://github.com/codeforboston/ma-laws
Last synced: 3 months ago
JSON representation
The General Laws of the Commonwealth of Massachusetts
- Host: GitHub
- URL: https://github.com/codeforboston/ma-laws
- Owner: codeforboston
- License: apache-2.0
- Created: 2013-07-28T02:27:29.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-12-05T12:56:39.000Z (over 12 years ago)
- Last Synced: 2025-10-08T18:46:17.067Z (8 months ago)
- Language: JavaScript
- Homepage: http://macode.org
- Size: 13.8 MB
- Stars: 18
- Watchers: 9
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
ma-laws
=======
laws of Massachusetts as JSON, there is also a [version in couchdb](https://cloudant.com/futon/database.html?kublai%2Flaw/_all_docs) feel free to replicate it and a [work in progress web app](http://macode.org/)
or just query the web api each list is available as a page or as JSON, the JSON is also available as JSONP by appending `?callback=callback`
get a section as JSON
```
http://macode.org/db/c{{chapter}}s{{section}}
```
as JSONP
```
http://macode.org/db/c{{chapter}}s{{section}}?callback={{callback}}
```
as HTML
```
http://macode.org/c{{chapter}}s{{section}}
```
e.g. section 2 of chapter 276 is http://macode.org/db/c276s2 for JSON, http://macode.org/db/c276s2?callback=cb for JSONP and http://macode.org/c276s2 for HTML
you can use the web app to find them as HTML, the JSON formulae are as follows
- chapter: `http://macode.org/api/chapter/{{chapter}}` e.g. http://macode.org/api/chapter/276
- title: `http://macode.org/api/{{part}}/{{title}}` e.g. http://macode.org/api/IV/II note the upper case roman numerals
- part: `http://macode.org/api/part/{{part}}` e.g. http://macode.org/api/part/IV note the upper case roman numerals
- chapter of session law: `http://macode.org/db/y{{year}}c{{chapter}}` e.g. http://macode.org/db/y2013c2
- year of session law: `http://macode.org/api/year/{{year}}` e.g. http://macode.org/api/year/2003
- all general law: http://macode.org/api/general
- all session law: http://macode.org/api/session
- search: http://macode.org/api/search/{{term}} e.g. http://macode.org/api/search/cranberry