VBValenciaOpenData is available through CocoaPods, to install it simply add the following line to your Podfile:
pod "VBValenciaOpenData"
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.
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>
[VODParking findAllByCoordinates:coordinates // User location
completion:^(NSArray *elements, // Completion handler
NSError *error)) {
/** Handle results or error */
}];
[VODTaxi findAllByCoordinates:coordinates // User location
completion:^(NSArray *elements, // Completion handler
NSError *error)) {
/** Handle results or error */
}];
[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 */
}];
[VODWifi findAllByCoordinates:coordinates // User location
completion:^(NSArray *elements, // Completion handler
NSError *error)) {
/** Handle results or error */
}];
[VODTraffic findAllByCoordinates:coordinates // User location
completion:^(NSArray *elements, // Completion handler
NSError *error)) {
/** Handle results or error */
}];
[VODContainer findAllByType:VODOilContainer // Container's type
coordinates:coordinates // User location
ompletion:^(NSArray *elements, // Completion handler
NSError *error)) {
/** Handle results or error */
}];
VBValenciaOpenData is available under the MIT license. See the LICENSE file for more info.