Party API

Purpose

The New York Social Diary is a website that tracks the parties of New York's well-to-do. Each party has a page, for example this party from 2014. The captions of these images give a view into their social network - two people that appear in a picture together are connected. Given the unreliability and slowness of the Internet Archive that hosts these pages, this API has been created to provide the captions without having to scrape the pages in the Archive.

The API is a set of endpoints that will take query parameters and return the requested information as JSON

Endpoints

List of parties

Each page is a different party. The full list of party names can be retrieved by a GET request to /parties. This endpoint takes two paramters

As an example, to get the first 20 parties, send the GET request to /parties?limit=20

To get the next 20 parties after that, send a request to /parties?limit=20&offset=20

It returns a JSON of the form:


      {
        "message": "Reports issues",
        "next": "optional string, indicates url for next set of parties",
        "parties": [
          {
            "date": "date of first party",
            "name": "name of first party"
          },
          {
            "date": "date of second party",
            "name": "name of second party"
          },
          ...
        ]
      }

Party captions

The list of captions for an individual party can be retrieved by a GET request to /captions. This endpoint takes one parameter

As an example, to get the captions for the party named "2007-friends-and-tastemakers", send the request to /captions?party=2007-friends-and-tastemakers

It returns a JSON of the form:


    {
      "message": "Reports issues",
      "name": "name of party requested",
      "captions": [
        "first caption",
        "second caption",
        ...
      ]
    }