Class Socialveo\WebApi\Controllers\LocationsController

InheritanceSocialveo\WebApi\Controllers\LocationsController » Socialveo\WebApi\Controllers\RestApiController » Phalcon\Mvc\Controller
Uses TraitsSocialveo\Core\Translatable

Class LocationsController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
_handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
_t() Gets translations Socialveo\Core\Translatable
afterExecuteRoute() After execute route, change return value to json Socialveo\WebApi\Controllers\RestApiController
beforeExecuteRoute() Before execute route, remove extra params Socialveo\WebApi\Controllers\RestApiController
checkClientCredentials() Checks client credentials Socialveo\WebApi\Controllers\RestApiController
decrypt() Decrypt value Socialveo\WebApi\Controllers\RestApiController
encrypt() Encrypt value Socialveo\WebApi\Controllers\RestApiController
getArrayFromParam() Returns array from params Socialveo\WebApi\Controllers\RestApiController
getCountryAction() Retrieve a location country Socialveo\WebApi\Controllers\LocationsController
getLanguage() Gets language code Socialveo\WebApi\Controllers\RestApiController
getLocalityAction() Retrieve a location locality Socialveo\WebApi\Controllers\LocationsController
getLocationAction() Retrieve a location Socialveo\WebApi\Controllers\LocationsController
getParams() Gets request params for Socialveo::filteredFind() Socialveo\WebApi\Controllers\RestApiController
getRegionAction() Retrieve a location region Socialveo\WebApi\Controllers\LocationsController
getRequestData() Returns request data Socialveo\WebApi\Controllers\RestApiController
getRequiredParam() Get required param Socialveo\WebApi\Controllers\RestApiController
getToken() Get token Socialveo\WebApi\Controllers\RestApiController
getTranslation() Gets translations Socialveo\WebApi\Controllers\RestApiController
handleError() Handle errors Socialveo\WebApi\Controllers\RestApiController
handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
initialize() Initialize controller Socialveo\WebApi\Controllers\RestApiController
invalidMethodAction() Action trigger when invalid action tried run Socialveo\WebApi\Controllers\RestApiController
notFoundAction() Not found action Socialveo\WebApi\Controllers\RestApiController
posts() Gets posts Socialveo\WebApi\Controllers\RestApiController
replaceParam() Replace param Socialveo\WebApi\Controllers\RestApiController
respondWithItem() Response with item // * @deprecated Socialveo\WebApi\Controllers\RestApiController
sendJsonContent() Send response as json content and exit Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRaw() Send json content Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRawStatic() Send json content static Socialveo\WebApi\Controllers\RestApiController
setDefaultParam() Set default option Socialveo\WebApi\Controllers\RestApiController
t() Gets translations Socialveo\Core\Translatable
unsetParam() Unset get param Socialveo\WebApi\Controllers\RestApiController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkAccess() Checks during the init of controller whether user is a guest. Socialveo\WebApi\Controllers\RestApiController
log() Log full request data for debug Socialveo\WebApi\Controllers\RestApiController
objectsToArray() Convert objects to arrays Socialveo\WebApi\Controllers\RestApiController

Method Details

getCountryAction() public method

Retrieve a location country

/locations/countries/{country_uuid}

Method: GET

Access: Public

Parameters:

{location_uuid} required string location uuid
language optional string language code

Returns: LocationCountry

Sample response:

{
    "status": "OK",
    "data":{
        "type": "location_country",
        "uuid": "1f93aa2e-66a7-11e7-a996-54bef75c7a3f",
        "name": "France",
        "name_crc32": 1493835906,
        "name_locale":{
            "de_DE": "Frankreich",
            "es_ES": "Francia"
        }
    },
    "timestamp": 1234567890
}

public mixed getCountryAction ( $country_uuid )
$country_uuid string
getLocalityAction() public method

Retrieve a location locality

/locations/localities/{locality_uuid}

Method: GET

Access: Public

Parameters:

{location_uuid} required string location uuid
language optional string language code

Returns: LocationLocality

Sample response:

{
    "status": "OK",
    "data":{
        "type": "location_locality",
        "uuid": "e9e3f66a-66a9-11e7-b82b-54bef75c7a3f",
        "country_uuid": "628e0cf4-66a5-11e7-a3e3-54bef75c7a3f",
        "region_uuid": "e9e00050-66a9-11e7-a429-54bef75c7a3f",
        "name": "Los Angeles",
        "name_locale":{
            "es_ES": "Los Ángeles"
        },
        "locale_name": "Los Angeles"
    },
    "timestamp": 1234567890
}

public mixed getLocalityAction ( $locality_uuid )
$locality_uuid string
getLocationAction() public method

Retrieve a location

/locations/{location_uuid}

Method: GET

Access: Public

Parameters:

{location_uuid} required string location uuid
language optional string language code

Returns: Location

Sample response:

{
    "status": "OK",
    "data":[
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed getLocationAction ( $location_uuid )
$location_uuid string
getRegionAction() public method

Retrieve a location region

/locations/regions/{region_uuid}

Method: GET

Access: Public

Parameters:

{location_uuid} required string location uuid
language optional string language code

Returns: LocationRegion

Sample response:

{
    "status": "OK",
    "data":{
        "type": "location_region",
        "uuid": "948756a2-66aa-11e7-bd91-54bef75c7a3f",
        "country_uuid": "8502b4c8-66a6-11e7-b74e-54bef75c7a3f",
        "name": "Berlin",
        "name_locale":{
            "es_ES": "Berlín",
            "de_DE": "Berlin",
            "fr_FR": "Berlin"
        },
        "locale_name": "Berlin"
    },
    "timestamp": 1234567890
}

public mixed getRegionAction ( $region_uuid )
$region_uuid string