Skip to content

Game status for a Player: api call: GET /game/{game_pk}/status/ #17

@Virako

Description

@Virako

GET /game/{game_pk}/status/

This call return everycontents of game that is near player. You can look at more info here (https://github.com/wadobo/socializa/blob/dev/backend/player/views.py#L47)

data = {
            'position': {
                'longitude': 37.201421,
                'latitude': -6.9447224
            }
}

return: list of contents, similar to this:

{
                    'players': [
                        {
                            'username': 'test',
                            'description': ''
                            'position': {
                                'longitude': 37.201421,
                                'latitude': -6.9447224
                            }
                        }
                    ],
                    'npcs': [
                        {
                            'username': 'test',
                            'description': ''
                            'position': {
                                'longitude': 37.201421,
                                'latitude': -6.9447224
                            }
                        }
                    ],
                    'items': [
                        {
                            'name': 'key',
                            'description': 'key number 1',
                            'position': {
                                'longitude': 37.201421,
                                'latitude': -6.9447224
                            }
                        },
                        {
                            'name': 'Confidential information',
                            'description': 'This information is private and important.',
                            'position': {
                                'longitude': 37.201421,
                                'latitude': -6.9447224
                            }
                        }
                    ],
                }

Create several test for check near and far position. Far position shouldn't appear.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions