Sha256: 0fc7c9417b41b8f64a5ebca96e7db7a025622cc8c088242bec22ada7ed428669

Contents?: true

Size: 1.97 KB

Versions: 1

Compression:

Stored size: 1.97 KB

Contents

@namespace("Switchboard")

protocol Location {

  /** The main class for this protocol */
  record Location {
    /** The primary key */
    int id;

    /** What type of record this is. (Gnomon::Country, Gnomon::State, Gnomon::County, Gnomon::City, Gnomon::PostalCode, Gnomon::Neighborhood) */
    string type;

    /** Name of the county this location is in (or nil) */
    string county_name;

    /** Name of the state this location is in (or nil) */
    string state_name;

    /** Short name of state **/
    string state_code;

    /** Name of the country this location is in (or nil) */
    string country_name;

    /** Name of the city this location is in (or nil) */
    string city_name;

    /** Name of the neighborhood this location is in (or nil) */
    string neighborhood_name;

    /** Zip code of this location (or nil) */
    string postal_code_name;

    /** Most common description of this location */
    string to_location;

    /** Shorter description of this location */
    string to_short_location;

    /** More verbose description of this location */
    string to_long_location;

    /** More verbose description of this location, usually with 3 levels of detail */
    string to_location_with_region;

    /** Latitude of the center of this location */
    float latitude;

    /** Longitude of the center of this location */
    float longitude;

    /** Approximate population of this location */
    int population;

    /** Datetime string of when this location was last updated */
    string updated_at;
  }

  /** Options you can send for limiting Location results */
  record LocationFetchOption {
    /** Which page of records to fetch */
    int page = 1;

    /** How many records per page */
    int per_page = 30;
  }

  /** Returns a list of Locations */
  array<Location> index(LocationFetchOption options);

  /** Return a single Location */
  array<Location> show(int id);

  /** Try to guess a location from a given string */
  array<Location> resolve(string q);
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
switchboard-contract-1.9.5 contracts/3/source/location.avdl