Valencia’s Traffic CCTV API Client
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec/fixtures
.gitignore
.rvmrc
Gemfile
README.textile
Rakefile
camaras_valencia_es.gemspec

README.textile

camaras_valencia_es: Valencia’s Traffic CCTV API Client

This is just a Ruby client to http://camaras.valencia.es which allows to access the public data related to the CCTV monitoring Valencia’s streets.
This library aims to make easier to gather and work with public data released by the Spanish Regional Goverment.

Installation

  $ gem install camaras_valencia_es

Or if you are using bundler:

  gem 'camaras_valencia_es'

Usage

Docs are a work in progress.

  posts = CamarasValenciaEs::SurveillancePosts.all
  posts.each do |post|
    puts post.id
    puts post.x # UTM coordinates properly parsed to Float
    puts post.y

    post.cameras.each do |camera|
      puts camera.id
      puts camera.x
      puts camera.y
      puts camera.source
      puts camera.target
    end
  end

Software License

Copyright © 2012 Vicente Reig Rincón de Arellano

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.