Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

[TAAS-18] A maximally viable countries API. #20

Merged
merged 3 commits into from
Apr 6, 2017
Merged

[TAAS-18] A maximally viable countries API. #20

merged 3 commits into from
Apr 6, 2017

Conversation

pjf
Copy link
Contributor

@pjf pjf commented Apr 4, 2017

Example record:

{
    "admin_level": "0", 
    "geolocation": {
        "lat": "32.57533772", 
        "lon": "54.2973284"
    }, 
    "hrinfo_id": "285", 
    "id": "105", 
    "iso2": "IR", 
    "iso3": "IRN", 
    "label": {
        "default": "Iran (Islamic Republic of)", 
        "humanitarianresponse": "Iran, Islamic Republic of", 
        "m49": "Iran (Islamic Republic of)", 
        "reliefweb-api": "Iran (Islamic Republic of)", 
        "reliefweb-short": "Iran"
    }, 
    "m49": "364", 
    "reliefweb_id": "121", 
    "x-alpha-2": "IR", 
    "x-alpha-3": "IRN"
}

This includes PR #18 (the minimal API).

Discussions to be linked to on JIRA when I open a ticket there shortly.

pjf added 2 commits April 4, 2017 21:47
In line with the discussion on JIRA, this *only* exports fields that are
in the current API.
This exports all relevant data from our spreadsheet.
taas/config.yml Outdated

# Unofficial but generally used fields. These
# default to the ISO code where it exists.
x-alpha-2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These default sounds like an automated defaulting. Is that the case? If not, perhaps this comment could be: "Where there is an ISO code, these fields will contain the same value as the ISO code."

taas/config.yml Outdated
x-alpha-2:
field:
- x Alpha2 codes
- ISO 3166-2:2013 Alpha 2-Codes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks like an automated "failover" if blank...?

taas/config.yml Outdated
field: HRinfo ID
optional: True

# Ditto ReliefWeb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "Ditto" with the full explanation: The old ReliefWeb ID, in case people want to match.

@pjf
Copy link
Contributor Author

pjf commented Apr 6, 2017

@emmajane : Comments updated in 2099c36! Merge imminent. :)

@pjf pjf merged commit 08d77b8 into master Apr 6, 2017
@pjf pjf deleted the taas-18-tng branch April 6, 2017 11:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants