Commit dd0fe554 authored by Serafino's avatar Serafino
Browse files

Changed Query Entities and Retrieve Entity By Id in order to take optional local parameter

parent fe187e1b
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ Query Entities
    ...    ${geometry}=${EMPTY}
    ...    ${count}=${EMPTY}
    ...    ${q}=${EMPTY}
    ...    ${local}=${EMPTY}
    ${attrs_length}=    Get Length    ${attrs}
    ${accept_length}=    Get Length    ${accept}
    ${options_length}=    Get Length    ${options}
@@ -83,7 +84,7 @@ Query Entities
    END
    IF    '${count}'!=''    Set To Dictionary    ${params}    count=${count}
    IF    '${q}'!=''    Set To Dictionary    ${params}    q=${q}

    IF    '${local}'!=''    Set To Dictionary    ${params}    local=${local}
    ${response}=    GET
    ...    url=${url}/${ENTITIES_ENDPOINT_PATH}
    ...    headers=${headers}
@@ -222,7 +223,7 @@ Retrieve Attributes
    RETURN    ${response}

Retrieve Entity by Id
    [Arguments]    ${id}    ${accept}=${CONTENT_TYPE_LD_JSON}    ${context}=${EMPTY}
    [Arguments]    ${id}    ${accept}=${CONTENT_TYPE_LD_JSON}    ${context}=${EMPTY}    ${local}=${EMPTY}
    ${headers}=    Create Dictionary
    Set To Dictionary    ${headers}    Accept    ${accept}
    IF    '${context}'!=''
@@ -230,7 +231,11 @@ Retrieve Entity by Id
        ...    ${headers}
        ...    Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json"
    END
    IF    '${local}'=='true'
         ${response}=    GET    url=${url}/${ENTITIES_ENDPOINT_PATH}${id}&local=true    headers=${headers}    expected_status=any
    ELSE
        ${response}=    GET    url=${url}/${ENTITIES_ENDPOINT_PATH}${id}    headers=${headers}    expected_status=any
    END
    Output    ${response}    Retrieve Entity by Id
    RETURN    ${response}