• I really like this plugin, and would like to use it in a project that I am working on. I am having a problem getting it to display the data that I am trying to pull from an API call.

    I am working with the Open States API from the Sunlight Foundation, which can be found at https://www.openstates.org.

    The API String that I am using looks like this:
    https://openstates.org/api/v1//bills/?q=prison&state=pa&apikey=my_api_key

    “q” representing the keyword value being searched for
    “state” representing the state being searched for

    When I run the api call in my browser, I get numerous results, that look like the following:

    {
            "title": "An Act amending Title 18 (Crimes and Offenses) of the Pennsylvania Consolidated Statutes, providing for mandatory prison sentences for arson and related offenses.",
            "created_at": "2013-05-31 07:50:29",
            "updated_at": "2013-05-31 07:50:29",
            "id": "PAB00014186",
            "chamber": "upper",
            "state": "pa",
            "session": "2013-2014",
            "type": [
                "bill"
            ],
            "subjects": [],
            "bill_id": "SB 953"
        },
        {
            "title": "An Act amending Title 61 (Prisons and Parole) of the Pennsylvania Consolidated Statutes, establishing the Prison Industry Enhancement Authority; providing for employment of prisoners by private industry and for subcontracts with correctional agencies; establishing guidelines for prisoner compensation; and providing for location of private sector prison industry.",
            "created_at": "2013-01-11 00:27:03",
            "updated_at": "2013-01-30 01:31:14",
            "id": "PAB00011506",
            "chamber": "upper",
            "state": "pa",
            "session": "2013-2014",
            "type": [
                "bill"
            ],
            "subjects": [],
            "bill_id": "SB 95"
        },

    My problem is that when I use the short code in a post or on a page, it does not display a single result.

    Here is how I am putting the short code on in the editor:
    [json src=”https://www.openstates.org/api/v1//bills/?q=prison&state=pa&apikey=c0f01f795e6447b6ba341580b320b59f” lifetime=”1″][/json]

    This is exactly how I have it in the post and I get no data display.

    Can you please help me figure out how to display this data in a post or page? I really would like to get this working, if it is possible.

    https://www.ads-software.com/plugins/json-data-shortcode/

  • The topic ‘Using the plugin with Open States API – PLEASE HELP’ is closed to new replies.