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

Species Endpoint #7

Closed
Vanethos opened this issue Aug 14, 2019 · 0 comments · Fixed by #62
Closed

Species Endpoint #7

Vanethos opened this issue Aug 14, 2019 · 0 comments · Fixed by #62
Assignees

Comments

@Vanethos
Copy link
Contributor

Description
Create all the classes and functions needed to access the GET endpoint {{base_url}}/occurrences/species

File Location

- data
|__ remote
- domain
|_ mamagers

Requirements

  • A endpoints class where the endpoint is declared must be created
  • A services class where the mapping from Response to Species must be created

Example Response

{
    "links": {
        "first": "https://api.vost.pt/v1/occurrences/species?page=1",
        "last": "https://api.vost.pt/v1/occurrences/species?page=14",
        "next": "https://api.vost.pt/v1/occurrences/species?page=2"
    },
    "data": [
        {
            "type": "occurrence_species",
            "id": "14",
            "attributes": {
                "code": 9900,
                "name": "Estados de Alerta",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            },
            "relationships": {
                "family": {
                    "data": {
                        "type": "occurrence_families",
                        "id": "5"
                    }
                }
            }
        }
    ],
    "included": [
        {
            "type": "occurrence_families",
            "id": "5",
            "attributes": {
                "code": 9000,
                "name": "Operações e Estados de Alerta",
                "created_at": "2019-07-02 13:31:18",
                "updated_at": "2019-07-02 13:31:18"
            }
        }
    ],
    "meta": {
        "items": 1,
        "total": 14
    }
}
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

Successfully merging a pull request may close this issue.

2 participants