From f46b2f68f40a2734313fa74007aa46467062bbc6 Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 4 Jul 2016 17:01:20 -0400 Subject: [PATCH] updated all api examples with rebranded account url- confirmed by luis --- doc/demographic_functions.md | 6 +++--- doc/geocoding_functions.md | 6 +++--- doc/isoline_functions.md | 2 +- doc/segmentation_functions.md | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/demographic_functions.md b/doc/demographic_functions.md index 3e698bb..8df164d 100644 --- a/doc/demographic_functions.md +++ b/doc/demographic_functions.md @@ -40,7 +40,7 @@ obs_getdemographicsnapshot: { ### Examples ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetDemographicSnapshot({{point geometry}}) ``` @@ -49,14 +49,14 @@ OBS_GetDemographicSnapshot({{point geometry}}) __Get the Demographic Snapshot at Camp David__ ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetDemographicSnapshot(CDB_LatLng(39.648333, -77.465)) ``` __Get the Demographic Snapshot in the Upper West Side__ ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetDemographicSnapshot(CDB_LatLng(40.80, -73.960)) ``` diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 36fe3ba..0450ff1 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -7,19 +7,19 @@ _**This service is subject to quota limitations and extra fees may apply**. View Here is an example of how to geocode a single country: ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('USA')&api_key={api_key} +https://{username}.carto.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('USA')&api_key={api_key} ``` In order to geocode an existent CARTO dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Data Services API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: ```bash -https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon('USA')&api_key={api_key} +https://{username}.carto.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon('USA')&api_key={api_key} ``` Notice that you can make use of Postgres or PostGIS functions in your Data Services API requests, as the result is a geometry that can be handled by the system. For example, suppose you need to retrieve the centroid of a specific country, you can wrap the resulting geometry from the geocoder functions inside the PostGIS `ST_Centroid` function: ```bash -https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={api_key} +https://{username}.carto.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={api_key} ``` diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index 63660f2..791f73d 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -7,7 +7,7 @@ _**This service is subject to quota limitations and extra fees may apply**. View You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing and inserts them into a table. ```bash -https://{username}.cartodb.com/api/v2/sql?q=INSERT INTO {table} (the_geom) SELECT the_geom FROM cdb_isodistance('POINT(-3.70568 40.42028)'::geometry, 'car', ARRAY[300, 600, 900]::integer[])&api_key={api_key} +https://{username}.carto.com/api/v2/sql?q=INSERT INTO {table} (the_geom) SELECT the_geom FROM cdb_isodistance('POINT(-3.70568 40.42028)'::geometry, 'car', ARRAY[300, 600, 900]::integer[])&api_key={api_key} ``` The following functions provide an isoline generator service, based on time or distance. This service uses the isolines service defined for your account. The default service limits the usage of displayed polygons represented on top of [HERE](https://developer.here.com/coverage-info) maps. diff --git a/doc/segmentation_functions.md b/doc/segmentation_functions.md index 47b6d91..7a92e00 100644 --- a/doc/segmentation_functions.md +++ b/doc/segmentation_functions.md @@ -158,7 +158,7 @@ The possible segments are: ### Examples ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetSegmentSnapshot({{point geometry}}) ``` @@ -168,7 +168,7 @@ __Get the Segmentation Snapshot around the MGM Grand__ ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetSegmentSnapshot(CDB_LatLng(36.10222, -115.169516)) ``` @@ -176,6 +176,6 @@ __Get the Segmentation Snapshot at CARTO's NYC HQ__ ```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT * FROM +https://{username}.carto.com/api/v2/sql?q=SELECT * FROM OBS_GetSegmentSnapshot(CDB_LatLng(40.704512, -73.936669)) ```