Skip to content

Instantly share code, notes, and snippets.

@CookieCookson
Last active October 6, 2016 12:50
Show Gist options
  • Save CookieCookson/3b2783a6b8b1053ea22360428ace6c13 to your computer and use it in GitHub Desktop.
Save CookieCookson/3b2783a6b8b1053ea22360428ace6c13 to your computer and use it in GitHub Desktop.
Returns a json array of all locations for https://plymouthoutdoors.conjured.co.uk

Get Locations

Returns json array of all locations.
  • URL

    https://plymouthoutdoors.conjured.co.uk/wp-json/wp/v2/locations

  • Method:

    GET

  • URL Params

    None

  • Data Params

    None

  • Success Response:

    [{
        id: 12,
        content: {rendered: "Bringing pixels to life."},
        cost: ["Paid", "Unpaid"],
        date: "2016-07-20T16:28:46",
        opening_time: ["Morning", "Afternoon", "Evening"],
        tags: ["badminton", "football", "pokemon go"],
        title: {rendered: "Elixel"},
        wpsl_additionalinfo: "Nearest parking is available in the Mayflower West car park beside the Plymouth Coach Station.",
        wpsl_address:"Elixel Ltd"
        wpsl_address_two:"Royal London House, 153-155 Armada Way"
        wpsl_city:"Plymouth"
        wpsl_country:"United Kingdom"
        wpsl_latitude:"50.37190936137492"
        wpsl_longitude:"-4.142823193440222"
        wpsl_phone:"01752395404"
        wpsl_state:"Devon"
        wpsl_website:"https://www.elixel.co.uk"
        wpsl_zip:"PL1 1HY"
    }]
  • Sample Call:

    $.ajax({
        url: "https://plymouthoutdoors.conjured.co.uk/wp-json/wp/v2/locations",
        dataType: "json",
        type : "GET",
        success : function(r) {
            console.log(r);
        }
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment