/VBValenciaOpenData

VBValenciaOpenData is a client library written in objective-c to retrieve data from the "Valencia Datos Abiertos" service.

Primary LanguageObjective-CMIT LicenseMIT

VBValenciaOpenData

Build Status Version Platform

Installation

VBValenciaOpenData is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "VBValenciaOpenData"

Configure your 'Authorization.plist' file

In order to make requests to the offical service, you should provide an username and passowrd. See more info from here.

  1. Get an scaffolded version from here.
  2. Fill with your username/password (request permissions using this form).
  3. Rename it from Authorization.plist.distribution to Authorization.plist
  4. Add Authorization.plist to your app's main bundle.

Usage

How to find information near the user.

Based on the documentation provided by Valencia's city hall all services returns three results. Get more information from this PDF (in spanish).

Import main header file:

#import <VODValenciaOpenData/VODValencia.h>

Request information based on user location

Parkings
[VODParking findAllByCoordinates:coordinates   // User location
              completion:^(NSArray *elements,  // Completion handler
                           NSError *error)) {
	/** Handle results or error */                           
}];
Taxi stops
[VODTaxi findAllByCoordinates:coordinates   // User location
                   completion:^(NSArray *elements,  // Completion handler
                                NSError *error)) {
	/** Handle results or error */                           
}];
Valenbisi's parkings and bikes
[VODValenbisiParking findAllByCoordinates:coordinates   // User location
                               completion:^(NSArray *elements,  // Completion handler
                                            NSError *error)) {
	/** Handle results or error */                           
}];	

[VODValenbisiBike findAllByCoordinates:coordinates   // User location
                            completion:^(NSArray *elements,  // Completion handler
                                         NSError *error)) {
	/** Handle results or error */                           
}];	    
Wifi points
[VODWifi findAllByCoordinates:coordinates   // User location
                   completion:^(NSArray *elements,  // Completion handler
                                NSError *error)) {
	/** Handle results or error */                           
}];	
Traffic status
[VODTraffic findAllByCoordinates:coordinates   // User location
                      completion:^(NSArray *elements,  // Completion handler
                                   NSError *error)) {
	/** Handle results or error */                           
}];	
Trash Containers
[VODContainer findAllByType:VODOilContainer // Container's type
                coordinates:coordinates 	// User location
                  ompletion:^(NSArray *elements,  // Completion handler
                              NSError *error)) {
	/** Handle results or error */                           
}];	

License

VBValenciaOpenData is available under the MIT license. See the LICENSE file for more info.