Sebastian Marcet 7bd426fac9 Added new endpoints to add locations per summit
POST /api/v1/summits/{id}/locations
POST /api/v1/summits/{id}/locations/venues
POST /api/v1/summits/{id}/locations/external-locations
POST /api/v1/summits/{id}/locations/hotels
POST /api/v1/summits/{id}/locations/airports

Required Scopes

'%s/summits/write'
'%s/locations/write'

Payload For SummitVenue

* class_name = SummitVenue
* name (required|string:max:255)
* description (sometimes|string)
* address1 (string|required_without:lng,lat)
* address2 (sometimes|string)
* zip_code (sometimes|string)
* city (string|required_without:lng,lat)
* state (string|required_without:lng,lat)
* country (string|required_without:lng,lat)
* lng (geo_longitude|required_with:lat|required_without:address1,city,state,country)
* lat (geo_latitude|required_with:lng|required_without:address1,city,state,country)
* website_url (sometimes|url)
* display_on_site (sometimes|boolean)
* details_page (sometimes|boolean)
* location_message (sometimes|string)
* is_main (sometimes|boolean)

Payload For SummitHotel

* class_name = SummitHotel
* name (required|string:max:255)
* description (sometimes|string)
* address1 (string|required_without:lng,lat)
* address2 (sometimes|string)
* zip_code (sometimes|string)
* city (string|required_without:lng,lat)
* state (string|required_without:lng,lat)
* country (string|required_without:lng,lat)
* lng (geo_longitude|required_with:lat|required_without:address1,city,state,country)
* lat (geo_latitude|required_with:lng|required_without:address1,city,state,country)
* website_url (sometimes|url)
* display_on_site (sometimes|boolean)
* details_page (sometimes|boolean)
* location_message (sometimes|string)
* capacity (sometimes|integer:min:0)
* hotel_type (sometimes|in:Primary,Alternate)
* sold_out (sometimes|boolean)
* booking_link (sometimes|url)

Payload For SummitAirport

* class_name = SummitAirport
* name (required|string:max:255)
* description (sometimes|string)
* address1 (string|required_without:lng,lat)
* address2 (sometimes|string)
* zip_code (sometimes|string)
* city (string|required_without:lng,lat)
* state (string|required_without:lng,lat)
* country (string|required_without:lng,lat)
* lng (geo_longitude|required_with:lat|required_without:address1,city,state,country)
* lat (geo_latitude|required_with:lng|required_without:address1,city,state,country)
* website_url (sometimes|url)
* display_on_site (sometimes|boolean)
* details_page (sometimes|boolean)
* location_message (sometimes|string)
* capacity (sometimes|integer:min:0)
* airport_type (sometimes|in:International,Domestic)

Payload For SummitExternalLocation

* class_name = SummitExternalLocation
* name (required|string:max:255)
* description (sometimes|string)
* address1 (string|required_without:lng,lat)
* address2 (sometimes|string)
* zip_code (sometimes|string)
* city (string|required_without:lng,lat)
* state (string|required_without:lng,lat)
* country (string|required_without:lng,lat)
* lng (geo_longitude|required_with:lat|required_without:address1,city,state,country)
* lat (geo_latitude|required_with:lng|required_without:address1,city,state,country)
* website_url (sometimes|url)
* display_on_site (sometimes|boolean)
* details_page (sometimes|boolean)
* location_message (sometimes|string)
* capacity (sometimes|integer:min:0)

Change-Id: Ie52d6e4864e2cdb1af100e2c325e02e92f1de9bd
2018-03-01 16:19:28 -03:00

67 lines
2.1 KiB
PHP

<?php namespace App\Services\Apis;
/**
* Copyright 2018 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/**
* Interface IGeoCodingAPI
* @package App\Services\Apis
*/
interface IGeoCodingAPI
{
/**
* indicates that no errors occurred; the address was successfully parsed
* and at least one geocode was returned.
*/
const ResponseStatusOK = 'OK';
/**
* indicates that the geocode was successful but returned no results.
* This may occur if the geocoder was passed a non-existent address
*/
const ResponseStatusZeroResults = 'ZERO_RESULTS';
/**
* indicates that you are over your quota.
*/
const ResponseStatusOverQueryLimit = 'OVER_QUERY_LIMIT';
/**
* indicates that your request was denied.
*/
const ResponseStatusRequestDenied = 'REQUEST_DENIED';
/**
* generally indicates that the query (address, components or latlng) is missing.
*/
const ResponseStatusInvalidRequest = 'INVALID_REQUEST';
/**
* indicates that the request could not be processed due to a server error.
* The request may succeed if you try again.
*/
const ResponseStatusUnknownError = 'UNKNOWN_ERROR';
/**
* @param AddressInfo $address_info
* @return GeoCoordinatesInfo
* @throws GeoCodingApiException
*/
public function getGeoCoordinates(AddressInfo $address_info);
/**
* @param GeoCoordinatesInfo $coordinates
* @return AddressInfo
* @throws GeoCodingApiException
*/
public function getAddressInfo(GeoCoordinatesInfo $coordinates);
}