Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Virako opened this issue Dec 27, 2018 · 0 comments
Open

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

Virako opened this issue Dec 27, 2018 · 0 comments
Assignees
Milestone

Comments

@Virako
Copy link
Member

Virako commented Dec 27, 2018

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.

@Virako Virako added this to the v1 milestone Dec 27, 2018
@rarellano rarellano self-assigned this Dec 30, 2018
danigm added a commit that referenced this issue Jan 11, 2019
Implements game status for a player distance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants