IRestCustomPlaceService Interface Reference

Inherited by IRestService.

Public Member Functions

List< PlaceSet GetPlaceSets (string setID, string tag, bool includePlaces, string placeName, int? catId, string catName, double[] corner1, double[] corner2)
  The /CustomPlaceSets/{setID} GET operation retrieves custom place sets. More...
 
int  AddCustomPlaceSet (string setName, string setTag)
  The /CustomPlaceSets POST operation creates a new custom place set. More...
 
int  UpdateCustomPlaceSet (string setID, string newName, string newTag)
  The /CustomPlaceSets/{setID} PUT modifies an existing custom place set. More...
 
int  DeleteCustomPlaceSet (string setID)
  The /CustomPlaceSets DELETE removes an existing custom place set. More...
 
int  AddCustomPlace (string setID, AddPlace placeToAdd)
  The /CustomPlaceSets/CustomPlace POST operation creates a new custom place within the specified Custom Place Set. More...
 
int  UpdateCustomPlace (string setID, Place placeToUpdate)
  The /CustomPlaceSets/CustomPlace PUT operation updates an existing custom place within the specified Custom Place Set. More...
 
int  DeleteCustomPlace (string setID, string placeID)
  The /CustomPlaceSets/{setID}/CustomPlace/{placeID} DELETE removes an existing custom place set from the specified Custom Place Set. More...
 
List< PlaceCategory GetCustomCategories (string catID, string tag, string catName)
  The /CustomCategories/{catID} GET operation retrieves custom categories. More...
 
int  AddCustomCategory (PlaceCategory category)
  The /CustomCategories POST operation creates a new custom category. More...
 
int  UpdateCustomCategory (PlaceCategory category)
  The /CustomCategories PUT operation modifies an existing custom category. More...
 

Detailed Description

This interface defines the Custom Place Service.

Member Function Documentation

◆ GetPlaceSets()

List<PlaceSet> GetPlaceSets ( string  setID,
string  tag,
bool  includePlaces,
string  placeName,
int?  catId,
string  catName,
double[]  corner1,
double[]  corner2 
)

The /CustomPlaceSets/{setID} GET operation retrieves custom place sets.

REST METHOD: GET
REST URI:

/customPlaceSets/{setID=-1}?tag={tag}&includePlaces={includePlaces} &placeName={placeName}&catId={catId}&catName={catName} &corner1={corner1}&corner2={corner2}


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
setID The setID is the numeric identifier of the Custom Place Set. The default value is "-1" and that searches against all custom place sets.
tag This parameter contains the tag of a Custom Place Set.

Examples:

&tag=CatTag1
includePlaces Indicates whether the result should contain the set's Custom Places. Possible values are boolean:

  • true
  • false

Default is false.

Example:

&includPlaces=true
placeName This parameter contains the name of a Custom Place in a Custom Place Set. It refines the search. It is only effective with the includePlaces set to true.

Examples:

&placeName=A%20Place%20Name
catId This parameter contains the Custom Place Category ID. It refines the search. It is only effective with the includePlaces set to true.

Its format is an integer.

Examples:

&catId=3214
catName This parameter contains the Custom Place Category name. It refines the search. It is only effective with the includePlaces set to true.

Examples:

&catName=FireHydrants
corner1 This parameter contains geographic coordinates used to be the bounding box top left corner.The coordinates are represented by a comma separated pair of floating point numbers representing longitude and latitude respectively in the Web Mercator ESPG:3857 projection.

There must be at least two numbers.

Example:

&corner1=-76.12345,42.12345
corner2 This parameter contains geographic coordinates used to be the bounding box bottom right corner.The coordinates are represented by a comma separated pair of floating point numbers representing longitude and latitude respectively in the Web Mercator ESPG:3857 projection.

There must be at least two numbers.

Example:

&corner2=-76.12345,42.12345
Returns
A JSON formatted response containing the matched Custom Place Sets.

Example of a JSON formatted array of ALK.Common.Model.PlaceSet.

 [
    {
       "Name": "1501102696277",
       "Tag": "a-tag",
       "Id": 262133,
       "Places": [
           {
               "Address": {
                   "StreetAddress": "1 Main St",
                   "City": "Trenton",
                   "State": "NJ",
                   "Zip": "08832",
                   "County": null,
                   "Country": "USA",
                   "SPLC": "0933397177234",
                   "CountryPostalFilter": 0,
                   "AbbreviationFormat": 0
               },
               "Coords": {
                   "Lat": "41.6",
                   "Lon": "-76.2"
               },
               "Region": 4,
               "Label": "A Label",
               "PlaceName": "Test_placeName",
               "CategoryId": 34323,
               "Heading": null,
               "Info": null,
               "Phone": "123-36-7890",
               "PlaceType": null,
               "SetId": 262133,
               "Speed": null,
               "SiteId": null,
               "Id": 192148421
           }
       ]
   }
 ]

◆ AddCustomPlaceSet()

int AddCustomPlaceSet ( string  setName,
string  setTag 
)

The /CustomPlaceSets POST operation creates a new custom place set.

REST METHOD: POST
REST URI:

/CustomPlaceSets?name={setName}&tag={setTag}


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
setName This parameter contains the name of a Custom Place Set.

Examples:

&name=FireHydrants
setTag This parameter contains the tag of a Custom Place Set.

Examples:

&tag=CatTag1
Returns
An integer representing the Custom Place Set Id.

◆ UpdateCustomPlaceSet()

int UpdateCustomPlaceSet ( string  setID,
string  newName,
string  newTag 
)

The /CustomPlaceSets/{setID} PUT modifies an existing custom place set.

REST METHOD: PUT
REST URI:

/CustomPlaceSets/{setID}?name={newName}&tag={newTag}


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
setID The setID is the numeric identifier of the Custom Place Set.
newName This parameter contains the name of a Custom Place Set.

Examples:

&name=FireHydrants
newTag This parameter contains the tag of a Custom Place Set.

Examples:

&tag=CatTag1
Returns
The integer "1" if the update was successful.

◆ DeleteCustomPlaceSet()

int DeleteCustomPlaceSet ( string  setID )

The /CustomPlaceSets DELETE removes an existing custom place set.

REST METHOD: DELETE
REST URI:

/CustomPlaceSets/{setID}

The setID is the numeric identifier of the Custom Place Set.

Parameters
setID The setID is the numeric identifier of the Custom Place Set.
Returns
The integer "1" if the deletion was successful.

◆ AddCustomPlace()

int AddCustomPlace ( string  setID,
AddPlace  placeToAdd 
)

The /CustomPlaceSets/CustomPlace POST operation creates a new custom place within the specified Custom Place Set.

REST METHOD: POST
REST URI:

/CustomPlaceSets/{setID}/CustomPlace

Parameters
setID The setID is the numeric identifier of the Custom Place Set.
placeToAdd Contains a structure to add a Custom Place to a Custom Place Set.
See ALK.Common.Model.AddPlace.

Example:

{
  "placeToAdd": {
      "Address" : {
          "State" : "NJ",
          "City" : "Trenton"
      },
      "Coords" : {
          "Lat" : "41.6",
          "Lon" : "-76.2"
      },
      "Region" : 4,
      "Label" : null,
      "PlaceName" : "A Store",
      "Phone" : "609-555-1212"
  }
}
Returns
An JSON formatted response.

Example of a result returned from ALK.PCM.PortalService.IRestCustomPlaceService.AddCustomPlace

{
   "AddCustomPlaceResult": 19234332344
}

◆ UpdateCustomPlace()

int UpdateCustomPlace ( string  setID,
Place  placeToUpdate 
)

The /CustomPlaceSets/CustomPlace PUT operation updates an existing custom place within the specified Custom Place Set.

REST METHOD: PUT
REST URI:

/CustomPlaceSets/{setID}/CustomPlace

Parameters
setID The setID is the numeric identifier of the Custom Place Set.
placeToUpdate Contains a structure to update a Custom Place in a Custom Place Set. The Id specified in the structure refers to the existing custom place.
See ALK.Common.Model.Place.

Example:

{
  "placeToUpdate": {
      "Id" : 234234,
      "Address" : {
          "State" : "NJ",
          "City" : "Trenton"
      },
      "Coords" : {
          "Lat" : "41.6",
          "Lon" : "-76.2"
      },
      "Region" : 4,
      "Label" : null,
      "PlaceName" : "A Store",
      "Phone" : "609-555-1212"
  }
}
Returns
The integer "1" if the update was successful.

◆ DeleteCustomPlace()

int DeleteCustomPlace ( string  setID,
string  placeID 
)

The /CustomPlaceSets/{setID}/CustomPlace/{placeID} DELETE removes an existing custom place set from the specified Custom Place Set.

REST METHOD: DELETE
REST URI:

/CustomPlaceSets/{setID}/CustomPlace/{placeID}

Parameters
setID The setID is the numeric identifier of the Custom Place Set.
placeID The placeID is the numeric identifier of the Custom Place.
Returns
The integer "1" if the deletion was successful.

◆ GetCustomCategories()

List<PlaceCategory> GetCustomCategories ( string  catID,
string  tag,
string  catName 
)

The /CustomCategories/{catID} GET operation retrieves custom categories.

REST METHOD: GET
REST URI:

/CustomCategories/{catID=-1}?tag={tag}&catName={catName}


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
catID The catID is the numeric identifier of the Custom Category. The default value is "-1" and that searches against all custom categories.
tag This parameter contains the tag of a Custom Category.

Examples:

&tag=CatTag1
catName This parameter contains the Custom Place Category name. It refines the search. It is only effective with the includePlaces set to true.

Examples:

&catName=FireHydrants
Returns
A JSON formatted response containing the Custom Categories that matched the search critera.

Example of a JSON formatted array of ALK.Common.Model.PlaceCategory.

 [
    {
       "Icon": "Food",
       "IconURL" : null,
       "Name" : "Asian Fusion Restaurants",
       "Tag": "a-tag",
       "Id": 262133
    }
 ]

◆ AddCustomCategory()

int AddCustomCategory ( PlaceCategory  category )

The /CustomCategories POST operation creates a new custom category.

REST METHOD: POST
REST URI:

/CustomCategories


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
category A JSON formatted data for a category.

Example of a JSON formatted ALK.Common.Model.PlaceCategory.

    {
       "Icon": "Food",
       "IconURL" : null,
       "Name" : "Asian Fusion Restaurants",
       "Tag": "a-tag",
       "Id": 262133
    }
Returns
A JSON response:
Example of a result returned from ALK.PCM.PortalService.IRestCustomPlaceService.AddCustomCategory

{
   "AddCustomCategoryResult": 30014
}

◆ UpdateCustomCategory()

int UpdateCustomCategory ( PlaceCategory  category )

The /CustomCategories PUT operation modifies an existing custom category.

REST METHOD: POST
REST URI:

/CustomCategories


Parameters are of the form &qname={pname}, where qname is the URI query parameter name, and pname is the corresponding parameter name. The parameters are listed below by their pname.

Parameters
category A JSON formatted data for a category.

Example of a JSON formatted ALK.Common.Model.PlaceCategory.

    {
       "Icon": "Food",
       "IconURL" : null,
       "Name" : "Asian Fusion Restaurants",
       "Tag": "a-tag",
       "Id": 262133
    }
Returns
A JSON response.
Example of a result returned from ALK.PCM.PortalService.IRestCustomPlaceService.UpdateCustomCategory

{
   "UpdateCustomCategoryResult": 1
}