ArcGIS.Feature.Service (ArcGIS v1.0.2)

View Source

Feature service acccess.

For fetching data from a feature service, see ArcGIS.Feature.

Summary

Types

t()

Definition of a feature service including the Portal it is hosted on and the Feature Service's ID

Functions

Sends a GET request to a feature service.

Sends a POST request to a feature service.

Returns the access URL for a feature service.

Fetches the schema for a feature servcie and on success assigned it to the schema field of the Service.t()

Types

t()

@type t() :: %ArcGIS.Feature.Service{
  id: String.t(),
  portal: ArcGIS.Portal.t(),
  schema: nil | ArcGIS.Feature.Schema.t()
}

Definition of a feature service including the Portal it is hosted on and the Feature Service's ID

Functions

create(portal, parameters, options)

@spec create(
  ArcGIS.Portal.t(),
  ArcGIS.Feature.Service.CreateParameters.t(),
  options :: ArcGIS.Portal.portal_options()
) :: {:ok, t()} | {:error, reason :: String.t()}

get(service, resource, options \\ [])

@spec get(t(), resource :: String.t(), options :: ArcGIS.Portal.request_options()) ::
  {:ok, ArcGIS.Portal.ResultSet.t()}
  | {:ok, term()}
  | {:error, reason :: String.t()}

Sends a GET request to a feature service.

The resource is path fragment for the rquest (e.g. /applyEdits).

Authentication tokens, etc. can be passed in via the options parameter.

post(service, resource, form_data, options \\ [])

@spec post(
  t(),
  resource :: String.t(),
  form_data :: ArcGIS.Portal.form_data(),
  options :: ArcGIS.Portal.request_options()
) ::
  {:ok, ArcGIS.Portal.ResultSet.t()}
  | {:ok, term()}
  | {:error, reason :: String.t()}

Sends a POST request to a feature service.

The resource is path fragment for the rquest (e.g. /applyEdits).

form_data is a map of content to be sent in the body of the post. If

Authentication tokens and URL parameters can be passed in via the options parameter. Any URL parameters in options that are also inform_data are overriden by the value in form_data.

url(service, options \\ [])

@spec url(t(), ArcGIS.Portal.request_options()) :: {:ok, URI.t()} | {:error, term()}

Returns the access URL for a feature service.

with_schema(service, options \\ [])

@spec with_schema(t(), options :: ArcGIS.Portal.request_options()) :: t()

Fetches the schema for a feature servcie and on success assigned it to the schema field of the Service.t()