Documentation ¶
Overview ¶
Package `geotrigger` provides API access to the Geotrigger Service, a cloud based system of geofencing and push notifications. The library makes it easier to interact with the Geotrigger API as either a Device or an Application. This assumes you have a developer account on developers.arcgis.com, from which you can create an Application and obtain the necessary credentials to use with this golang library.
For more information about the Geotrigger Service, please see: https://developers.arcgis.com/en/geotrigger-service/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages credentials for an ArcGIS Application or Device based on what you pass in to the provided constructors.
func ExistingDevice ¶
func ExistingDevice(clientID string, deviceID string, accessToken string, expiresIn int64, refreshToken string) *Client
ExistingDevice creates a client using existing device tokens and credentials.
Provided primarily as a way of debugging an active mobile install.
func NewApplication ¶
NewApplication creates and registers a new application associated with the provided client_id and client_secret.
func NewDevice ¶
NewDevice creates and registers a new device associated with the provided client_id.
func (*Client) Info ¶
Info returns information about the current session.
If this is an application session, the following keys will be present: `access_token`, `client_id`, `client_secret`.
If this is a device session, the following keys will be present: `access_token`, `refresh_token`, `device_id`, `client_id`.
func (*Client) Request ¶
Request performs API requests given an endpoint route and parameters.
`response` can be a pointer to a struct modeling the expected JSON, or to an arbitrary JSON map (`map[string]interface{}`) that can then be used with the helper methods `GetValueFromJSONObject` and `GetValueFromJSONArray` provided in the `github.com/Esri/geotrigger-go/geotrigger/json` package.