https://github.com/howdoicomputer/junar
Junar is an API wrapper for the Junar open data platform.
https://github.com/howdoicomputer/junar
Last synced: 11 months ago
JSON representation
Junar is an API wrapper for the Junar open data platform.
- Host: GitHub
- URL: https://github.com/howdoicomputer/junar
- Owner: howdoicomputer
- License: gpl-2.0
- Created: 2014-07-28T14:53:48.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T21:56:55.000Z (over 10 years ago)
- Last Synced: 2023-08-15T10:35:51.495Z (almost 3 years ago)
- Language: Ruby
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/howdoicomputer/junar)
[](https://codeclimate.com/github/howdoicomputer/junar)
junar
====
Junar is an API wrapper for any government data platform that was built using the Junar open data solution.
### Installation
Until the gem is released
gem build junar.gemspec
gem install
### Documentation
The git wiki should be up to date and contain all that is needed.
Yardoc support is available as well.
yard
The above command will generate a doc directory filled with static content.
yard server
Yard can serve up the static content on port 8808 for browsing.
### Authentication
You can obtain an API token from any of the city owned and Junar built open data portals.
The San Jose registration page, for example:
http://data.sanjoseca.gov/developers/
### Testing
rspec spec
Prepare for timed out connections, bad request errors, etc. The builds will fail often because of this. I am depending heavily on caching to side-step this problem. I am planning on introducing more graceful failures and better mocking in the future to help with the dependendability of testing.
### Setup
Constructing a client object is fairly straight forward.
```ruby
junar = Junar::Client.new ({
token: your_token_here,
uri: 'http://api.data.sanjoseca.gov'
})
```
You can then make requests using this object.
### Usage
Usage is fairly simple at this early stage of development. The only functionality that is available is searching.
#### Search
```ruby
junar.search category: 'datastreams', query: 'FIRE'
junar.search category: 'dashboards', query: 'FIRE'
```
As functionality expands, it's always good to check out the unit tests to see more examples.
### Support
This wrapper supports Junar API v1.0 and is tested using Ruby 2.1.1. I have no plans to support the 1.9.X version of Ruby.