Class Socialveo\WebApi\Controllers\CirclesController

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

Class CirclesController

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
createAction() Create a circle Socialveo\WebApi\Controllers\CirclesController
decrypt() Decrypt value Socialveo\WebApi\Controllers\RestApiController
deleteAction() Removes a circle Socialveo\WebApi\Controllers\CirclesController
encrypt() Encrypt value Socialveo\WebApi\Controllers\RestApiController
getAction() Returns a circle Socialveo\WebApi\Controllers\CirclesController
getArrayFromParam() Returns array from params Socialveo\WebApi\Controllers\RestApiController
getLanguage() Gets language code Socialveo\WebApi\Controllers\RestApiController
getParams() Gets request params for Socialveo::filteredFind() Socialveo\WebApi\Controllers\RestApiController
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
listAction() Show circles Socialveo\WebApi\Controllers\CirclesController
moveDownAction() Move down circle Socialveo\WebApi\Controllers\CirclesController
moveUpAction() Move up circle Socialveo\WebApi\Controllers\CirclesController
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
updateAction() Updates a circle Socialveo\WebApi\Controllers\CirclesController

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

createAction() public method

Create a circle

/circles/create

Method: POST

Access: Logged

Parameters:

name required string the circle name

Affects: Circle

Returns: Circle

Sample response:

{
    "status": "OK",
    "data":{
        "type": "circle",
        "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f",
        "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "name": "test",
        "translatable": 0,
        "position": 4
    },
    "timestamp": 1234567890
}

public mixed createAction ( )
throws Exception
deleteAction() public method

Removes a circle

/circles/{circle_uuid}/delete

Method: POST

Access: Owner

Parameters:

{circle_uuid} required string circle uuid

Affects: Circle

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed deleteAction ( $circle_uuid )
$circle_uuid string

Circle uuid

getAction() public method

Returns a circle

/circles/{circle_uuid}

Method: GET

Access: Owner

Parameters:

{circle_uuid} required string circle uuid

Returns: Circle

Sample response:

{
    "status": "OK",
    "data":{
        "type": "circle",
        "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f",
        "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "name": "test",
        "translatable": 0,
        "position": 4
    },
    "timestamp": 1234567890
}

public mixed getAction ( $circle_uuid )
$circle_uuid string

Circle uuid

listAction() public method

Show circles

/circles

Method: GET

Access: Logged

Parameters:

{post_uuid} required string circle uuid
page or offset optional integer page start or offset
limit optional integer page limit
sortby[property]=order optional array sort by property value, order either desc or asc
filterby[property][operator]=value optional array filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), ne(<>), like
language optional string language code

Filter by: Circle

Returns: Circle []

Sample response:

{
    "status": "OK",
    "data":[
       {"type": "circle", "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
       {"type": "circle", "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
       {"type": "circle", "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
       {"type": "circle", "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
       ...
    },
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed listAction ( )
moveDownAction() public method

Move down circle

/circles/{circle_uuid}/move-down

Method: POST

Access: Owner

Parameters:

{circle_uuid} required string circle uuid

Affects: Circle

Returns: Circle

Sample response:

{
    "status": "OK",
    "data":{
        "type": "circle",
        "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f",
        "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "name": "test",
        "translatable": 0,
        "position": 4
    },
    "timestamp": 1234567890
}

public mixed moveDownAction ( $circle_uuid )
$circle_uuid string

Circle uuid

throws Exception
moveUpAction() public method

Move up circle

/circles/{circle_uuid}/move-up

Method: POST

Access: Owner

Parameters:

{circle_uuid} required string circle uuid

Affects: Circle

Returns: Circle

Sample response:

{
    "status": "OK",
    "data":{
        "type": "circle",
        "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f",
        "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "name": "test",
        "translatable": 0,
        "position": 4
    },
    "timestamp": 1234567890
}

public mixed moveUpAction ( $circle_uuid )
$circle_uuid string

Circle uuid

throws Exception
updateAction() public method

Updates a circle

/circles/{circle_uuid}/update

Method: POST

Access: Owner

Parameters:

{circle_uuid} required string circle uuid
name required string the circle name

Affects: Circle

Returns: Circle

Sample response:

{
    "status": "OK",
    "data":{
        "type": "circle",
        "uuid": "a5e13bdc-6de6-11e7-aa47-54bef75c7a3f",
        "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "name": "test",
        "translatable": 0,
        "position": 4
    },
    "timestamp": 1234567890
}

public mixed updateAction ( $circle_uuid )
$circle_uuid string

Circle uuid