swagger: "2.0"
host: www.refugerestrooms.org
basePath: /api
info:
  description: REFUGE is a web application that seeks to provide safe restroom access for transgender, intersex, and gender nonconforming individuals.
  title: Refuge Restrooms API
  version: 0.0.1
  x-apisguru-categories:
    - open_data
  x-logo:
    backgroundColor: "#4C4C4C"
    url: https://api.apis.guru/v2/cache/logo/https_pbs.twimg.com_profile_images_432717338270380032_BZWevLrA.jpeg
  x-origin:
    - format: swagger
      url: https://www.refugerestrooms.org/api/swagger_doc.json
      version: "2.0"
  x-providerName: refugerestrooms.org
  x-tags:
    - lgbt
produces:
  - application/xml
  - application/json
  - application/octet-stream
  - text/plain
tags:
  - description: Operations about restrooms
    name: restrooms
paths:
  /v1/restrooms:
    get:
      description: Get all restroom records ordered by date descending.
      operationId: getV1Restrooms
      parameters:
        - default: 1
          description: Page offset to fetch.
          format: int32
          in: query
          name: page
          required: false
          type: integer
        - default: 10
          description: Number of results to return per page.
          format: int32
          in: query
          name: per_page
          required: false
          type: integer
        - default: 0
          description: Pad a number of results.
          format: int32
          in: query
          name: offset
          required: false
          type: integer
        - description: Only return restrooms that are ADA accessible.
          in: query
          name: ada
          required: false
          type: boolean
        - description: Only return restrooms that are unisex.
          in: query
          name: unisex
          required: false
          type: boolean
      produces:
        - application/json
      responses:
        "200":
          description: Get all restroom records ordered by date descending.
      tags:
        - restrooms
  /v1/restrooms/by_date:
    get:
      description: Search for restroom records updated or created on or after a given date
      operationId: getV1RestroomsByDate
      parameters:
        - default: 1
          description: Page offset to fetch.
          format: int32
          in: query
          name: page
          required: false
          type: integer
        - default: 10
          description: Number of results to return per page.
          format: int32
          in: query
          name: per_page
          required: false
          type: integer
        - default: 0
          description: Pad a number of results.
          format: int32
          in: query
          name: offset
          required: false
          type: integer
        - description: Only return restrooms that are ADA accessible.
          in: query
          name: ada
          required: false
          type: boolean
        - description: Only return restrooms that are unisex.
          in: query
          name: unisex
          required: false
          type: boolean
        - description: Return restroom records updated (rather than created) since given date
          in: query
          name: updated
          required: false
          type: boolean
        - description: Day
          format: int32
          in: query
          name: day
          required: true
          type: integer
        - description: Month
          format: int32
          in: query
          name: month
          required: true
          type: integer
        - description: Year
          format: int32
          in: query
          name: year
          required: true
          type: integer
      produces:
        - application/json
      responses:
        "200":
          description: Search for restroom records updated or created on or after a given date
      tags:
        - restrooms
  /v1/restrooms/by_location:
    get:
      description: Search by location.
      operationId: getV1RestroomsByLocation
      parameters:
        - default: 1
          description: Page offset to fetch.
          format: int32
          in: query
          name: page
          required: false
          type: integer
        - default: 10
          description: Number of results to return per page.
          format: int32
          in: query
          name: per_page
          required: false
          type: integer
        - default: 0
          description: Pad a number of results.
          format: int32
          in: query
          name: offset
          required: false
          type: integer
        - description: Only return restrooms that are ADA accessible.
          in: query
          name: ada
          required: false
          type: boolean
        - description: Only return restrooms that are unisex.
          in: query
          name: unisex
          required: false
          type: boolean
        - description: latitude
          format: float
          in: query
          name: lat
          required: true
          type: number
        - description: longitude
          format: float
          in: query
          name: lng
          required: true
          type: number
      produces:
        - application/json
      responses:
        "200":
          description: Search by location.
      tags:
        - restrooms
  /v1/restrooms/search:
    get:
      description: Perform full-text search of restroom records.
      operationId: getV1RestroomsSearch
      parameters:
        - default: 1
          description: Page offset to fetch.
          format: int32
          in: query
          name: page
          required: false
          type: integer
        - default: 10
          description: Number of results to return per page.
          format: int32
          in: query
          name: per_page
          required: false
          type: integer
        - default: 0
          description: Pad a number of results.
          format: int32
          in: query
          name: offset
          required: false
          type: integer
        - description: Only return restrooms that are ADA accessible.
          in: query
          name: ada
          required: false
          type: boolean
        - description: Only return restrooms that are unisex.
          in: query
          name: unisex
          required: false
          type: boolean
        - description: Your search query.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Perform full-text search of restroom records.
      tags:
        - restrooms
