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

Create API response #2

Open
marcelometal opened this issue Nov 2, 2020 · 1 comment
Open

Create API response #2

marcelometal opened this issue Nov 2, 2020 · 1 comment

Comments

@marcelometal
Copy link
Member

The Politicos API v0 has the following response data:

{
    "meta":{
        "limit":20,
        "next":"/api/v0/political-parties/?limit=20&offset=20",
        "offset":0,
        "previous":null,
        "total_count":1
    },
    "objects":[
        {
            "founded_date":null,
            "id":1,
            "logo":null,
            "name":"Heavy Metal",
            "resource_uri":"/api/v0/political-parties/1/",
            "siglum":"HV",
            "tse_number":666,
            "website":null,
            "wikipedia":null
        }
    ]
}

Now we can think about the new response data or keep the current response.

@luccamendonca
Copy link
Collaborator

What if we follow the json-LD spec for the response metadata?

This way we don't need to try and reinvent the wheel, and there's even a go lib that could help us out.

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