Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENDPOINT

POST /sign-up/

body = {
    'login': ...,
    'password': ...
}

response = {
    'status': 201,
    'token': ...,
}

POST /sign-in/

body = {
    'login': ...,
    'password': ...
}

response = {
    'status': 202,
    'token': ...,
}

DELETE /logout/

response = {
    'status': 202,
}

GET /users/

response = {
    'status': 200,
    'content': [
        {
            'id': ...,
            'name': ...,
            'surname': ...,
            'patronymic': ...,
        }
    ]
}

PUT /users/

params = {
    'id': ...,
}

body = {
    'name': ...,
    'surname': ...,
    'patronymic': ...,
}

response = {
    'status': 200,
    'content': {
        'id': ...,
        'name': ...,
        'surname': ...,
        'patronymic': ...,
    }
}

POST /collections/

body = {
    'name': ...,
    'description': ...,
    'photos_ids': [...,],
}

response = {
    'status': 201,
    'content': {
        'name': ...,
        'description': ...,
        'photos': [
            {
                'id': ...,
                'name': ...,
                'description': ...,
                'file': ...,
                'rate': ..., 
                'collection_id': ...,
                'author': {
                    'id': ...,
                    'name': ...,
                    'surname': ...,
                    'patronymic': ...,
                },
            }
        ],
    }
}

GET /collections/

params = {
    'order_by': ...,
}

response = {
    'status': 200,
    'content': [
        {
            'name': ...,
            'description': ...,
            'photos': [
                {
                    'id': ...,
                    'name': ...,
                    'description': ...,
                    'file': ...,
                    'rate': ..., 
                    'collection_id': ...,
                    'author': {
                        'id': ...,
                        'name': ...,
                        'surname': ...,
                        'patronymic': ...,
                    },
                }
            ],
        }
    ]
}

PUT /collections/

body = {
    'name': ...,
    'description': ...,
}

response = {
    'status': 200,
    'content': {
        'name': ...,
        'description': ...,
        'photos': [
            {
                'id': ...,
                'name': ...,
                'description': ...,
                'file': ...,
                'rate': ..., 
                'collection_id': ...,
                'author': {
                    'id': ...,
                    'name': ...,
                    'surname': ...,
                    'patronymic': ...,
                },
            }
        ],
    }
}

PATCH /collections/photos/append/

body = {
    'photos': [...,],
}

response = {
    'status': 200,
    'content': {
        'name': ...,
        'description': ...,
        'photos': [
            {
                'id': ...,
                'name': ...,
                'description': ...,
                'file': ...,
                'rate': ..., 
                'collection_id': ...,
                'author': {
                    'id': ...,
                    'name': ...,
                    'surname': ...,
                    'patronymic': ...,
                },
            }
        ],
    }
}

DELETE /collections/photos/pop/

body = {
    'photos': [...,],
}

response = {
    'status': 200,
    'content': {
        'name': ...,
        'description': ...,
        'photos': [
            {
                'id': ...,
                'name': ...,
                'description': ...,
                'file': ...,
                'rate': ..., 
                'collection_id': ...,
                'author': {
                    'id': ...,
                    'name': ...,
                    'surname': ...,
                    'patronymic': ...,
                },
            }
        ],
    }
}

DELETE /collections/

params = {
    'collection_id': ...,
}

response = {
    'status': 204,
}

POST /collections/photos/

body = {
    'id': ...,
    'name': ...,
    'description': ...,
    'file': ...,
    'author_id': ...,
    'collection_id': ...,
}

response = {
    'status': 201,
    'content': {
        'id': ...,
        'name': ...,
        'description': ...,
        'file': ...,
        'rate': ..., 
        'collection_id': ...,
        'author': {
            'id': ...,
            'name': ...,
            'surname': ...,
            'patronymic': ...,
        },
    }
}

GET /collections/photos/

response = {
    'status': 200,
    'content': [
            {
            'id': ...,
            'name': ...,
            'description': ...,
            'file': ...,
            'rate': ..., 
            'collection_id': ...,
            'author': {
                'id': ...,
                'name': ...,
                'surname': ...,
                'patronymic': ...,
            },
        }
    ]
}

PUT /collections/photos/

params = {
    'photo_id': ...,
}

body = {
    'name': ...,
    'description': ...,
    'file': ...,
    'author_id': ...,
}

response = {
    'status': 200,
    'content': [
            {
            'id': ...,
            'name': ...,
            'description': ...,
            'file': ...,
            'rate': ..., 
            'collection_id': ...,
            'author': {
                'id': ...,
                'name': ...,
                'surname': ...,
                'patronymic': ...,
            },
        }
    ]
}

DELETE /collections/photos/

params = {
    'photo_id': ...,
}

response = {
    'status': 204,
}

POST /collections/photos/rate/

body = {
    'photo_id': ...,
    'rate': ...,
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages