VBValenciaOpenData
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.
- Get an scaffolded version from here.
- Fill with your username/password (request permissions using this form).
- Rename it from Authorization.plist.distribution to Authorization.plist
- 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.


