[seagrant-dev] Fwd: New api endpoint

Evan Tschuy tschuy at osuosl.org
Fri Oct 3 22:27:14 UTC 2014


---------- Forwarded message ----------
From: Freeman, Michael <Michael.Freeman at oregonstate.edu>
Date: Fri, Oct 3, 2014 at 3:22 PM
Subject: RE: New api endpoint
To: Evan Tschuy <tschuy at osuosl.org>


So I'm having a slight problem, the locations endpoint gives me data
in the form:
{
        "locations":  ["Gold Beach", "Corvallis", "Florence",
"Newport", "Waldport"],
        "error": {"status": false, "text": null, "name": null,
"debug": null, "level": null}
}

So when I load locations and print it out I get one item like so: Gold
Beach, Corvallis, Florence, Newport, Waldport.
What I want to get is a print out like this:
Gold Beach
Corvallis
Florence
Newport
Waldport

This format should get the necessary print out.
{
        "locations": [
                {
                        "name": "Gold Beach",
                        "id": 1
                },
                {
                        "name": "Corvallis",
                        "id": 2
                },
                {
                        "name": "Florence",
                        "id": 3
                },
                {
                        "name": "Newport",
                        "id": 4
                },
                {
                        "name": "Waldport",
                        "id": 5
                }
        ],
        "error": {"status": false, "text": null, "name": null,
"debug": null, "level": null}
}
Note: The separate names for each location.

Thanks,
Michael

-----Original Message-----
From: Evan Tschuy [mailto:tschuy at osuosl.org]
Sent: Thursday, October 2, 2014 5:47 PM
To: Freeman, Michael
Subject: Re: New api endpoint

OK, I've updated the chef cookbook and all is well in the world.

http://seagrant-staging-api.osuosl.org/1/locations

We've added the version to the API, so you'll need to add /1/ to all
your API calls.

On Thu, Oct 2, 2014 at 5:04 PM, Freeman, Michael
<Michael.Freeman at oregonstate.edu> wrote:
> Sweet, can't wait. Thanks for getting on that so fast.
>
> Michael
>
> -----Original Message-----
> From: Evan Tschuy [mailto:tschuy at osuosl.org]
> Sent: Thursday, October 2, 2014 4:58 PM
> To: Freeman, Michael
> Subject: Re: New api endpoint
>
> I've already written it, and it's been approved for merging. I've got another few things to merge, and I may have broken the auto deploy (again :), but it'll be up soon.
>
> Evan


More information about the seagrant-dev mailing list