Projects > Visuals


Index

GET : /api/designnest/v1/projects/{projectID}/visuals

projectID : the ID of the current project

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "list" : {
            "paginate" : {
                "total" : 0 ,
                "has_more_page" : 0 / 1
            } ,
            "data" : [
                {
                    "id": 0,
                    "url": "",
                    "url_type" : 1 / 2  (1:image ; 2:video)
                    "name": "",
                    "account_image": "",
                    "location": "",
                    "content": {
                        "title": "",
                        "description": ""
                    },
                    "created_time": "" ,
                    "vote" : {
                        "up" : 0 , 
                        "down" : 0
                    }
                }
            ]
        }
    ]
}

Show

GET : /api/designnest/v1/projects/{projectID}/visuals/{visualID}

projectID : the ID of the current project

visualID : the ID of the current visual

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "detail" : [
            "id": 0,
            "url": url ,
            "name": "",
            "account_image": url ,
            "location": "",
            "content": {
                "title": "",
                "description": ""
            },
            "created_time": ""
        ]
    ]
}

Store

POST : /api/designnest/v1/projects/{projectID}/visuals

projectID : the ID of the current project

Request :

{
    "project" : {
        "visual" : {
            "url" : '' , 
            "title" : '' ,
            "content" : '' ,
            "location" : 0 ,
            "tags" : [name1 , name2 , ...] ,
            "type" : 1 / 2
        }
    }
}

url : url

title : Title of visual image

content : Content of visual image

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "id": 0,
        "url": "",
        "name": "",
        "account_image": "",
        "location": "",
        "content": {
            "title": "",
            "description": ""
        },
        "created_time": ""
    ]
}

Update

PATCH : /api/designnest/v1/projects/{projectID}/visuals/{visualID}

projectID : the ID of the current project

visualID : the ID of the current visual

Request :

{
    "project" : {
        "visual" : {
            "url" : '' , 
            "title" : '' ,
            "content" : '' ,
            "location" : 0
        }
    }
}

url : url

title : Title of visual image

content : Content of visual image

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "id" => 0 ,
        "url" => ''
    ]
}

Destroy

DELETE : /api/designnest/v1/projects/{projectID}/visuals/{visualID}

projectID : the ID of the current project

visualID : the ID of the current visual

Response :

{
    "code" : 1 ,
    "message" : "" ,
}