iot

package module
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 23 Imported by: 5

README

Arduino iot-api Go client

Getting Started

The client requires a valid access token to authenticate, you can use the golang.org/x/oauth2 to easily get one with the Client Credentials OAuth2 flow:

import cc "golang.org/x/oauth2/clientcredentials"

// We need to pass the additional "audience" var to request an access token
additionalValues := url.Values{}
additionalValues.Add("audience", "https://api2.arduino.cc/iot")
// Set up OAuth2 configuration
config := cc.Config{
    ClientID:       clientID,
    ClientSecret:   clientSecret,
    TokenURL:       "https://api2.arduino.cc/iot/v1/clients/token",
    EndpointParams: additionalValues,
}
// Get the access token in exchange of client_id and client_secret
tok, err := config.Token(context.Background())
if err != nil {
    log.Fatalf("Error retrieving access token, %v", err)
}
// Confirm we got the token and print expiration time
log.Printf("Got an access token, will expire on %s", tok.Expiry)

For a working example, see the example folder in this repo.

How to get Arduino IoT Cloud Client Credentials

You can generate Arduino IoT Cloud Client Credentials in the ARDUINO API section in the IoT Cloud things section:

Step 1

IoT Cloud Site

Step 2

IoT Cloud Site

Step 3

IoT Cloud Site

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	DashboardsV2Api *DashboardsV2ApiService

	DevicesV2Api *DevicesV2ApiService

	DevicesV2CertsApi *DevicesV2CertsApiService

	DevicesV2OtaApi *DevicesV2OtaApiService

	DevicesV2PassApi *DevicesV2PassApiService

	DevicesV2TagsApi *DevicesV2TagsApiService

	LoraDevicesV1Api *LoraDevicesV1ApiService

	LoraFreqPlanV1Api *LoraFreqPlanV1ApiService

	PropertiesV2Api *PropertiesV2ApiService

	SeriesV2Api *SeriesV2ApiService

	ThingsV2Api *ThingsV2ApiService

	ThingsV2TagsApi *ThingsV2TagsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Arduino IoT Cloud API API v2.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig added in v1.0.1

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ArduinoCompressedv2 added in v1.3.0

type ArduinoCompressedv2 struct {
	// The Authority Key Identifier of the certificate
	AuthorityKeyIdentifier string `json:"authority_key_identifier,omitempty"`
	// The ending date of the certificate
	NotAfter time.Time `json:"not_after"`
	// The starting date of the certificate
	NotBefore time.Time `json:"not_before"`
	// The serial number of the certificate
	Serial string `json:"serial"`
	// The signature of the certificate
	Signature string `json:"signature"`
	// The ASN1 X component of certificate signature
	SignatureAsn1X string `json:"signature_asn1_x"`
	// The ASN1 Y component of certificate signature
	SignatureAsn1Y string `json:"signature_asn1_y"`
}

ArduinoCompressedv2 compressed contains the info from which to generate the certificate (default view)

type ArduinoDashboardowner added in v1.4.2

type ArduinoDashboardowner struct {
	// The userID of the user who created the dashboard
	UserId string `json:"user_id"`
	// The username of the user who created the dashboard
	Username string `json:"username,omitempty"`
}

ArduinoDashboardowner ArduinoDashboardowner media type (default view)

type ArduinoDashboardshare added in v1.4.0

type ArduinoDashboardshare struct {
	// The userID of the user you want to share the dashboard with
	UserId string `json:"user_id"`
	// The username of the user you want to share the dashboard with
	Username string `json:"username,omitempty"`
}

ArduinoDashboardshare ArduinoDashboardshare media type (default view)

type ArduinoDashboardv2 added in v1.4.0

type ArduinoDashboardv2 struct {
	CreatedBy ArduinoDashboardowner `json:"created_by,omitempty"`
	// The friendly name of the dashboard
	Id string `json:"id"`
	// The friendly name of the dashboard
	Name string `json:"name"`
	// Id of the organization the dashboard belongs to
	OrganizationId string                `json:"organization_id,omitempty"`
	SharedBy       ArduinoDashboardshare `json:"shared_by,omitempty"`
	// ArduinoDashboardshareCollection is the media type for an array of ArduinoDashboardshare (default view)
	SharedWith []ArduinoDashboardshare `json:"shared_with,omitempty"`
	// Last update date
	UpdatedAt time.Time `json:"updated_at"`
	// ArduinoWidgetv2Collection is the media type for an array of ArduinoWidgetv2 (default view)
	Widgets []ArduinoWidgetv2 `json:"widgets,omitempty"`
}

ArduinoDashboardv2 Dashboard is a collection of widgets (default view)

type ArduinoDevicev2

type ArduinoDevicev2 struct {
	// The type of the connections selected by the user when multiple connections are available
	ConnectionType string `json:"connection_type,omitempty"`
	// Creation date of the device
	CreatedAt time.Time `json:"created_at,omitempty"`
	// ArduinoDevicev2SimplePropertiesCollection is the media type for an array of ArduinoDevicev2SimpleProperties (default view)
	Events []ArduinoDevicev2SimpleProperties `json:"events,omitempty"`
	// The fully qualified board name
	Fqbn string `json:"fqbn,omitempty"`
	// The api reference of this device
	Href string `json:"href"`
	// The arn of the device
	Id string `json:"id"`
	// The label of the device
	Label string `json:"label"`
	// Last activity date
	LastActivityAt time.Time `json:"last_activity_at,omitempty"`
	// The latest version of the NINA/WIFI101 firmware available for this device
	LatestWifiFwVersion string `json:"latest_wifi_fw_version,omitempty"`
	// The metadata of the device
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// The friendly name of the device
	Name string `json:"name"`
	// True if the device type can not have an associated sketch
	NoSketch bool `json:"no_sketch,omitempty"`
	// Id of the organization the device belongs to
	OrganizationId string `json:"organization_id,omitempty"`
	// True if the device type is ready to receive OTA updated
	OtaAvailable bool `json:"ota_available,omitempty"`
	// True if the device type is OTA compatible
	OtaCompatible bool `json:"ota_compatible,omitempty"`
	// The required version of the NINA/WIFI101 firmware needed by IoT Cloud
	RequiredWifiFwVersion string `json:"required_wifi_fw_version,omitempty"`
	// The serial uuid of the device
	Serial string `json:"serial"`
	// Tags belonging to the device
	Tags  map[string]interface{} `json:"tags,omitempty"`
	Thing ArduinoThing           `json:"thing,omitempty"`
	// The type of the device
	Type string `json:"type"`
	// The id of the user
	UserId string `json:"user_id"`
	// ArduinoDevicev2WebhookCollection is the media type for an array of ArduinoDevicev2Webhook (default view)
	Webhooks []ArduinoDevicev2Webhook `json:"webhooks,omitempty"`
	// The version of the NINA/WIFI101 firmware running on the device
	WifiFwVersion string `json:"wifi_fw_version,omitempty"`
}

ArduinoDevicev2 ArduinoDevicev2 media type (default view)

type ArduinoDevicev2Cert added in v1.3.0

type ArduinoDevicev2Cert struct {
	// The Certification Authority used to sign the certificate
	Ca         string              `json:"ca,omitempty"`
	Compressed ArduinoCompressedv2 `json:"compressed"`
	// The certificate in DER format
	Der string `json:"der"`
	// The unique identifier of the device
	DeviceId string `json:"device_id"`
	// Whether the certificate is enabled
	Enabled bool `json:"enabled"`
	// The api reference of this cert
	Href string `json:"href"`
	// The unique identifier of the key
	Id string `json:"id"`
	// The certificate in pem format
	Pem string `json:"pem"`
}

ArduinoDevicev2Cert DeviceCertV2 describes a certificate associated to the device (default view)

type ArduinoDevicev2EventProperties added in v1.1.0

type ArduinoDevicev2EventProperties struct {
	// ArduinoDevicev2SimplePropertiesCollection is the media type for an array of ArduinoDevicev2SimpleProperties (default view)
	Events []ArduinoDevicev2SimpleProperties `json:"events"`
	// The device of the property
	Id string `json:"id"`
}

ArduinoDevicev2EventProperties ArduinoDevicev2EventProperties media type (default view)

type ArduinoDevicev2Pass added in v1.3.0

type ArduinoDevicev2Pass struct {
	// Whether the password is set or not
	Set bool `json:"set"`
	// A random suggested password
	SuggestedPassword string `json:"suggested_password,omitempty"`
}

ArduinoDevicev2Pass DeviceCertV2 describes a password associated to a device (default view)

type ArduinoDevicev2SimpleProperties added in v1.1.0

type ArduinoDevicev2SimpleProperties struct {
	// The name of the property
	Name string `json:"name"`
	// Update date of the property
	UpdatedAt time.Time `json:"updated_at"`
	// Value of the property
	Value interface{} `json:"value"`
}

ArduinoDevicev2SimpleProperties ArduinoDevicev2SimpleProperties media type (default view)

type ArduinoDevicev2Webhook

type ArduinoDevicev2Webhook struct {
	// Whether the webhook is active
	Active bool `json:"active,omitempty"`
	// The uuid of the webhook
	Id string `json:"id"`
	// The uri of the webhook
	Uri string `json:"uri"`
}

ArduinoDevicev2Webhook DeviceWebhookV2 describes a webhook associated to the device (default view)

type ArduinoDevicev2properties

type ArduinoDevicev2properties struct {
	// How many days the data will be kept
	DataRetentionDays float64 `json:"data_retention_days"`
	// The device of the property
	DeviceId string `json:"deviceId"`
	// ArduinoPropertyCollection is the media type for an array of ArduinoProperty (default view)
	Properties []ArduinoProperty `json:"properties"`
	// The user id of the owner
	UserId string `json:"user_id"`
}

ArduinoDevicev2properties ArduinoDevicev2properties media type (default view)

type ArduinoDevicev2propertyvalue

type ArduinoDevicev2propertyvalue struct {
	CreatedAt time.Time                         `json:"created_at,omitempty"`
	Value     ArduinoDevicev2propertyvalueValue `json:"value,omitempty"`
}

ArduinoDevicev2propertyvalue ArduinoDevicev2propertyvalue media type (default view)

type ArduinoDevicev2propertyvalueValue

type ArduinoDevicev2propertyvalueValue struct {
	Payload    string                                      `json:"payload,omitempty"`
	Seqno      int64                                       `json:"seqno,omitempty"`
	Statistics ArduinoDevicev2propertyvalueValueStatistics `json:"statistics,omitempty"`
}

ArduinoDevicev2propertyvalueValue struct for ArduinoDevicev2propertyvalueValue

type ArduinoDevicev2propertyvalueValueStatistics

type ArduinoDevicev2propertyvalueValueStatistics struct {
	Adr       float64 `json:"adr,omitempty"`
	Channel   float64 `json:"channel,omitempty"`
	Duplicate float64 `json:"duplicate,omitempty"`
	Freq      float64 `json:"freq,omitempty"`
	ModBW     float64 `json:"modBW,omitempty"`
	Rssi      float64 `json:"rssi,omitempty"`
	Seqno     float64 `json:"seqno,omitempty"`
	Sf        float64 `json:"sf,omitempty"`
	Snr       float64 `json:"snr,omitempty"`
	Time      float64 `json:"time,omitempty"`
}

ArduinoDevicev2propertyvalueValueStatistics struct for ArduinoDevicev2propertyvalueValueStatistics

type ArduinoDevicev2propertyvalues

type ArduinoDevicev2propertyvalues struct {
	Id               string                                        `json:"id"`
	LastEvaluatedKey ArduinoDevicev2propertyvaluesLastEvaluatedKey `json:"last_evaluated_key"`
	Name             string                                        `json:"name"`
	// ArduinoDevicev2propertyvalueCollection is the media type for an array of ArduinoDevicev2propertyvalue (default view)
	Values []ArduinoDevicev2propertyvalue `json:"values"`
}

ArduinoDevicev2propertyvalues ArduinoDevicev2propertyvalues media type (default view)

type ArduinoDevicev2propertyvaluesLastEvaluatedKey

type ArduinoDevicev2propertyvaluesLastEvaluatedKey struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
}

ArduinoDevicev2propertyvaluesLastEvaluatedKey struct for ArduinoDevicev2propertyvaluesLastEvaluatedKey

type ArduinoLinkedvariable added in v1.4.0

type ArduinoLinkedvariable struct {
	// The id of the linked variable
	Id string `json:"id"`
	// Last value of the linked property
	LastValue interface{} `json:"last_value,omitempty"`
	// Update date of the last value
	LastValueUpdatedAt time.Time `json:"last_value_updated_at,omitempty"`
	// The name of the variable
	Name string `json:"name"`
	// The permission of the linked variable
	Permission string `json:"permission"`
	// The id of the related thing
	ThingId string `json:"thing_id"`
	// The name of the related thing
	ThingName     string          `json:"thing_name"`
	ThingTimezone ArduinoTimezone `json:"thing_timezone,omitempty"`
	// The type of the variable
	Type string `json:"type"`
	// The name of the variable in the code
	VariableName string `json:"variable_name"`
}

ArduinoLinkedvariable ArduinoLinkedvariable media type (default view)

type ArduinoLoradevicev1 added in v1.4.0

type ArduinoLoradevicev1 struct {
	// The eui of the app
	AppEui string `json:"app_eui"`
	// The key of the device
	AppKey string `json:"app_key"`
	// The id of the device
	DeviceId string `json:"device_id"`
	// The eui of the lora device
	Eui string `json:"eui"`
}

ArduinoLoradevicev1 ArduinoLoradevicev1 media type (default view)

type ArduinoLorafreqplansv1 added in v1.4.0

type ArduinoLorafreqplansv1 struct {
	// The list of frequency plans
	FrequencyPlans []ArduinoLorafreqplanv1 `json:"frequency_plans,omitempty"`
}

ArduinoLorafreqplansv1 ArduinoLorafreqplansv1 media type (default view)

type ArduinoLorafreqplanv1 added in v1.4.0

type ArduinoLorafreqplanv1 struct {
	// Frequency plan only for advanced users
	Advanced bool `json:"advanced"`
	// The ID of the frequency paln
	Id string `json:"id"`
	// The name of the frequency plan
	Name string `json:"name"`
}

ArduinoLorafreqplanv1 ArduinoLorafreqplanv1 media type (default view)

type ArduinoProperty

type ArduinoProperty struct {
	// Creation date of the property
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Delete date of the property
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// The api reference of this property
	Href string `json:"href"`
	// The id of the property
	Id string `json:"id"`
	// Last value of this property
	LastValue interface{} `json:"last_value,omitempty"`
	// Maximum value of this property
	MaxValue float64 `json:"max_value,omitempty"`
	// Minimum value of this property
	MinValue float64 `json:"min_value,omitempty"`
	// The friendly name of the property
	Name string `json:"name"`
	// The permission of the property
	Permission string `json:"permission"`
	// If true, data will persist into a timeseries database
	Persist bool `json:"persist,omitempty"`
	// The id of the sync pool
	SyncId string `json:"sync_id,omitempty"`
	// The integer id of the property
	Tag float64 `json:"tag,omitempty"`
	// The id of the thing
	ThingId string `json:"thing_id"`
	// The name of the associated thing
	ThingName string `json:"thing_name,omitempty"`
	// The type of the property
	Type string `json:"type"`
	// The update frequency in seconds, or the amount of the property has to change in order to trigger an update
	UpdateParameter float64 `json:"update_parameter,omitempty"`
	// The update strategy for the property value
	UpdateStrategy string `json:"update_strategy"`
	// Update date of the property
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Last update timestamp of this property
	ValueUpdatedAt time.Time `json:"value_updated_at,omitempty"`
	// The sketch variable name of the property
	VariableName string `json:"variable_name,omitempty"`
}

ArduinoProperty ArduinoProperty media type (default view)

type ArduinoSeriesBatch

type ArduinoSeriesBatch struct {
	// Response version
	RespVersion int64 `json:"resp_version"`
	// Responses of the request
	Responses []ArduinoSeriesResponse `json:"responses"`
}

ArduinoSeriesBatch ArduinoSeriesBatch media type (default view)

type ArduinoSeriesRawBatch

type ArduinoSeriesRawBatch struct {
	// Response version
	RespVersion int64 `json:"resp_version"`
	// Responses of the request
	Responses []ArduinoSeriesRawResponse `json:"responses"`
}

ArduinoSeriesRawBatch ArduinoSeriesRawBatch media type (default view)

type ArduinoSeriesRawBatchLastvalue

type ArduinoSeriesRawBatchLastvalue struct {
	// Responses of the request
	Responses []ArduinoSeriesRawLastValueResponse `json:"responses"`
	// Status of the response
	Status string `json:"status"`
}

ArduinoSeriesRawBatchLastvalue ArduinoSeriesRawBatchLastvalue media type (default view)

type ArduinoSeriesRawLastValueResponse

type ArduinoSeriesRawLastValueResponse struct {
	// Total number of values in the array 'values'
	CountValues int64 `json:"count_values"`
	// Property id
	PropertyId string `json:"property_id"`
	// Thing id
	ThingId string `json:"thing_id"`
	// Timestamp in RFC3339
	Times []time.Time `json:"times"`
	// Values can be in Float, String, Bool, Object
	Values []interface{} `json:"values"`
}

ArduinoSeriesRawLastValueResponse ArduinoSeriesRawLastValueResponse media type (default view)

type ArduinoSeriesRawResponse

type ArduinoSeriesRawResponse struct {
	// Total number of values in the array 'values'
	CountValues int64 `json:"count_values"`
	// From date
	FromDate time.Time `json:"from_date"`
	// If the response is different than 'ok'
	Message string `json:"message,omitempty"`
	// Query of for the data
	Query string `json:"query"`
	// Response version
	RespVersion int64                              `json:"resp_version"`
	Series      BatchQueryRawResponseSeriesMediaV1 `json:"series"`
	// Max of values
	SeriesLimit int64 `json:"series_limit,omitempty"`
	// Sorting
	Sort string `json:"sort"`
	// Status of the response
	Status string `json:"status"`
	// Timestamp in RFC3339
	Times []time.Time `json:"times"`
	// To date
	ToDate time.Time `json:"to_date"`
	// Values can be in Float, String, Bool, Object
	Values []interface{} `json:"values"`
}

ArduinoSeriesRawResponse ArduinoSeriesRawResponse media type (default view)

type ArduinoSeriesResponse

type ArduinoSeriesResponse struct {
	// Total number of values in the array 'values'
	CountValues int64 `json:"count_values"`
	// From date
	FromDate time.Time `json:"from_date"`
	// Resolution in seconds
	Interval int64 `json:"interval"`
	// If the response is different than 'ok'
	Message string `json:"message,omitempty"`
	// Query of for the data
	Query string `json:"query"`
	// Response version
	RespVersion int64 `json:"resp_version"`
	// Max of values
	SeriesLimit int64 `json:"series_limit,omitempty"`
	// Status of the response
	Status string `json:"status"`
	// Timestamp in RFC3339
	Times []time.Time `json:"times"`
	// To date
	ToDate time.Time `json:"to_date"`
	// Values in Float
	Values []float64 `json:"values"`
}

ArduinoSeriesResponse ArduinoSeriesResponse media type (default view)

type ArduinoTags added in v1.4.0

type ArduinoTags struct {
	Tags []Tag `json:"tags"`
}

ArduinoTags ArduinoTags media type (default view)

type ArduinoThing

type ArduinoThing struct {
	// Creation date of the thing
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Delete date of the thing
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// The fqbn of the attached device, if any
	DeviceFqbn string `json:"device_fqbn,omitempty"`
	// The id of the device
	DeviceId string `json:"device_id,omitempty"`
	// The name of the attached device, if any
	DeviceName string `json:"device_name,omitempty"`
	// The type of the attached device, if any
	DeviceType string `json:"device_type,omitempty"`
	// The api reference of this thing
	Href string `json:"href"`
	// The id of the thing
	Id string `json:"id"`
	// The friendly name of the thing
	Name string `json:"name"`
	// Id of the organization the thing belongs to
	OrganizationId string `json:"organization_id,omitempty"`
	// ArduinoPropertyCollection is the media type for an array of ArduinoProperty (default view)
	Properties []ArduinoProperty `json:"properties,omitempty"`
	// The number of properties of the thing
	PropertiesCount int64 `json:"properties_count,omitempty"`
	// The id of the attached sketch
	SketchId string `json:"sketch_id,omitempty"`
	// Tags of the thing
	Tags map[string]interface{} `json:"tags,omitempty"`
	// Time zone of the thing
	Timezone string `json:"timezone"`
	// Update date of the thing
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The user id of the owner
	UserId string `json:"user_id"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

ArduinoThing ArduinoThing media type (default view)

type ArduinoThinglayout

type ArduinoThinglayout struct {
	// Creation date of the thing
	CreatedAt time.Time `json:"created_at,omitempty"`
	// How many days the data will be kept
	DataRetentionDays float64 `json:"data_retention_days,omitempty"`
	// Delete date of the thing
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// The arn of the device
	DeviceId string `json:"device_id,omitempty"`
	// The api reference of this thing
	Href string `json:"href"`
	// The id of the thing
	Id string `json:"id"`
	// The friendly name of the thing
	Name string `json:"name"`
	// ArduinoPropertyCollection is the media type for an array of ArduinoProperty (default view)
	Properties []ArduinoProperty `json:"properties,omitempty"`
	// The number of properties of the thing
	PropertiesCount float64 `json:"properties_count,omitempty"`
	// The id of the attached sketch
	SketchId string `json:"sketch_id,omitempty"`
	// Update date of the thing
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The user id of the owner
	UserId string `json:"user_id"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

ArduinoThinglayout ArduinoThinglayout media type (default view)

type ArduinoTimeseriesmedia added in v1.4.0

type ArduinoTimeseriesmedia struct {
	Data []TimeseriesDataPoint `json:"data"`
}

ArduinoTimeseriesmedia ArduinoTimeseriesmedia media type (default view)

type ArduinoTimezone added in v1.4.0

type ArduinoTimezone struct {
	// Name of the time zone.
	Name string `json:"name"`
	// Current UTC DST offset in seconds.
	Offset int64 `json:"offset"`
	// Date until the offset is valid.
	Until time.Time `json:"until,omitempty"`
}

ArduinoTimezone ArduinoTimezone media type (default view)

type ArduinoVariableslinks struct {
	// The ids of the linked variables
	Variables []string `json:"variables"`
}

ArduinoVariableslinks ArduinoVariableslinks media type (default view)

type ArduinoWidgetv2 added in v1.4.0

type ArduinoWidgetv2 struct {
	// True if the linked variables permissions are incompatible with the widget
	HasPermissionIncompatibility bool `json:"has_permission_incompatibility,omitempty"`
	// True if the linked variables types are incompatible with the widget
	HasTypeIncompatibility bool `json:"has_type_incompatibility,omitempty"`
	// If it's true the widget is linked to a soft-deleted variable
	HasUnlinkedVariable bool `json:"has_unlinked_variable,omitempty"`
	// Widget current height for desktop
	Height int64 `json:"height"`
	// Widget current height for mobile
	HeightMobile int64 `json:"height_mobile,omitempty"`
	// The UUID of the widget, set by client
	Id string `json:"id"`
	// The name of the widget
	Name string `json:"name,omitempty"`
	// Widget options
	Options map[string]interface{} `json:"options"`
	// The type of the widget
	Type string `json:"type"`
	// ArduinoLinkedvariableCollection is the media type for an array of ArduinoLinkedvariable (default view)
	Variables []ArduinoLinkedvariable `json:"variables,omitempty"`
	// Widget current width for desktop
	Width int64 `json:"width"`
	// Widget current width for mobile
	WidthMobile int64 `json:"width_mobile,omitempty"`
	// Widget x position for desktop
	X int64 `json:"x"`
	// Widget x position for mobile
	XMobile int64 `json:"x_mobile,omitempty"`
	// Widget y position for desktop
	Y int64 `json:"y"`
	// Widget y position for mobile
	YMobile int64 `json:"y_mobile,omitempty"`
}

ArduinoWidgetv2 Widget describes a dashboard widget (default view)

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BatchLastValueRequestsMediaV1

type BatchLastValueRequestsMediaV1 struct {
	// Requests
	Requests []BatchQueryRawLastValueRequestMediaV1 `json:"requests"`
}

BatchLastValueRequestsMediaV1 struct for BatchLastValueRequestsMediaV1

type BatchQueryRawLastValueRequestMediaV1

type BatchQueryRawLastValueRequestMediaV1 struct {
	// Property id
	PropertyId string `json:"property_id"`
	// Thing id
	ThingId string `json:"thing_id"`
}

BatchQueryRawLastValueRequestMediaV1 struct for BatchQueryRawLastValueRequestMediaV1

type BatchQueryRawRequestMediaV1

type BatchQueryRawRequestMediaV1 struct {
	// From timestamp
	From time.Time `json:"from,omitempty"`
	// Query
	Q string `json:"q"`
	// Max of values
	SeriesLimit int64 `json:"series_limit,omitempty"`
	// Sorting
	Sort string `json:"sort,omitempty"`
	// To timestamp
	To time.Time `json:"to,omitempty"`
}

BatchQueryRawRequestMediaV1 struct for BatchQueryRawRequestMediaV1

type BatchQueryRawRequestsMediaV1

type BatchQueryRawRequestsMediaV1 struct {
	// Requests
	Requests []BatchQueryRawRequestMediaV1 `json:"requests"`
	// Response version
	RespVersion int64 `json:"resp_version"`
}

BatchQueryRawRequestsMediaV1 struct for BatchQueryRawRequestsMediaV1

type BatchQueryRawResponseSeriesMediaV1

type BatchQueryRawResponseSeriesMediaV1 struct {
	// Metric name
	Metric string `json:"metric"`
}

BatchQueryRawResponseSeriesMediaV1 struct for BatchQueryRawResponseSeriesMediaV1

type BatchQueryRequestMediaV1

type BatchQueryRequestMediaV1 struct {
	// From timestamp
	From time.Time `json:"from"`
	// Resolution in seconds
	Interval int64 `json:"interval,omitempty"`
	// Query
	Q string `json:"q"`
	// Max of values
	SeriesLimit int64 `json:"series_limit,omitempty"`
	// To timestamp
	To time.Time `json:"to"`
}

BatchQueryRequestMediaV1 struct for BatchQueryRequestMediaV1

type BatchQueryRequestsMediaV1

type BatchQueryRequestsMediaV1 struct {
	// Requests
	Requests []BatchQueryRequestMediaV1 `json:"requests"`
	// Response version
	RespVersion int64 `json:"resp_version"`
}

BatchQueryRequestsMediaV1 struct for BatchQueryRequestsMediaV1

type BatchQueryResponseSeriesMediaV1

type BatchQueryResponseSeriesMediaV1 struct {
	// Aggregation type
	Aggr string `json:"aggr"`
	// Query
	Expression string `json:"expression"`
	// Metric name
	Metric string `json:"metric"`
}

type CheckDevicesV2PassPayload added in v1.3.0

type CheckDevicesV2PassPayload struct {
	// The password for the device
	Password string `json:"password"`
}

CheckDevicesV2PassPayload struct for CheckDevicesV2PassPayload

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl added in v1.2.0

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type CreateDevicesV2CertsPayload added in v1.3.0

type CreateDevicesV2CertsPayload struct {
	// The Certification Authority you want to use
	Ca string `json:"ca,omitempty"`
	// The certificate request in pem format
	Csr string `json:"csr"`
	// Whether the certificate is enabled
	Enabled bool `json:"enabled"`
}

CreateDevicesV2CertsPayload struct for CreateDevicesV2CertsPayload

type CreateDevicesV2Payload

type CreateDevicesV2Payload struct {
	// The type of the connections selected by the user when multiple connections are available
	ConnectionType string `json:"connection_type,omitempty"`
	// The fully qualified board name
	Fqbn string `json:"fqbn,omitempty"`
	// The friendly name of the device
	Name string `json:"name,omitempty"`
	// The serial uuid of the device
	Serial string `json:"serial,omitempty"`
	// The type of the device
	Type string `json:"type"`
	// The user_id associated to the device. If absent it will be inferred from the authentication header
	UserId string `json:"user_id,omitempty"`
	// The version of the NINA/WIFI101 firmware running on the device
	WifiFwVersion string `json:"wifi_fw_version,omitempty"`
}

CreateDevicesV2Payload DeviceV2 describes a device.

type CreateLoraDevicesV1Payload added in v1.4.0

type CreateLoraDevicesV1Payload struct {
	// The app name
	App string `json:"app"`
	// The app eui of the lora device
	AppEui string `json:"app_eui,omitempty"`
	// The app key of the lora device
	AppKey string `json:"app_key,omitempty"`
	// The eui of the lora device
	Eui string `json:"eui"`
	// The frequency plan required by your country
	FrequencyPlan string `json:"frequency_plan"`
	// A common name for the device
	Name string `json:"name"`
	// The optional serial number
	Serial string `json:"serial,omitempty"`
	// The type of device
	Type string `json:"type"`
	// The id of the user. Can be the special string 'me'
	UserId string `json:"user_id"`
}

CreateLoraDevicesV1Payload struct for CreateLoraDevicesV1Payload

type CreateThingsV1Payload

type CreateThingsV1Payload struct {
	// The arn of the associated device
	DeviceId string `json:"device_id,omitempty"`
	// The id of the thing
	Id string `json:"id,omitempty"`
	// The friendly name of the thing
	Name string `json:"name"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

CreateThingsV1Payload ThingPayload describes a thing

type CreateThingsV2Payload

type CreateThingsV2Payload struct {
	// The arn of the associated device
	DeviceId string `json:"device_id,omitempty"`
	// The id of the thing
	Id string `json:"id,omitempty"`
	// The friendly name of the thing
	Name string `json:"name"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

CreateThingsV2Payload ThingPayload describes a thing

type DashboardsV2ApiService added in v1.4.0

type DashboardsV2ApiService service

DashboardsV2ApiService DashboardsV2Api service

func (*DashboardsV2ApiService) DashboardsV2Create added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2Create(ctx _context.Context, dashboardv2 Dashboardv2, localVarOptionals *DashboardsV2CreateOpts) (ArduinoDashboardv2, *_nethttp.Response, error)

DashboardsV2Create create dashboards_v2 Create a new dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param dashboardv2 DashboardV2Payload describes a dashboard
  • @param optional nil or *DashboardsV2CreateOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDashboardv2

func (*DashboardsV2ApiService) DashboardsV2Delete added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2Delete(ctx _context.Context, id string, localVarOptionals *DashboardsV2DeleteOpts) (*_nethttp.Response, error)

DashboardsV2Delete delete dashboards_v2 Delete a dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param optional nil or *DashboardsV2DeleteOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

func (*DashboardsV2ApiService) DashboardsV2DeleteShare added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2DeleteShare(ctx _context.Context, id string, userId string, localVarOptionals *DashboardsV2DeleteShareOpts) (*_nethttp.Response, error)

DashboardsV2DeleteShare deleteShare dashboards_v2 Delete a user the dashboard has been shared with

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param userId The id of the user
  • @param optional nil or *DashboardsV2DeleteShareOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -
func (a *DashboardsV2ApiService) DashboardsV2Link(ctx _context.Context, id string, widgetId string, widgetlink Widgetlink, localVarOptionals *DashboardsV2LinkOpts) (ArduinoVariableslinks, *_nethttp.Response, error)

DashboardsV2Link link dashboards_v2 Link or detach widget variables

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param widgetId The id of the widget
  • @param widgetlink
  • @param optional nil or *DashboardsV2LinkOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoVariableslinks

func (*DashboardsV2ApiService) DashboardsV2List added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2List(ctx _context.Context, localVarOptionals *DashboardsV2ListOpts) ([]ArduinoDashboardv2, *_nethttp.Response, error)

DashboardsV2List list dashboards_v2 Returns the list of dashboards

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *DashboardsV2ListOpts - Optional Parameters:
  • @param "Name" (optional.String) - The name of the dashboard
  • @param "UserId" (optional.String) - The user_id of the dashboard's owner
  • @param "XOrganization" (optional.String) -

@return []ArduinoDashboardv2

func (*DashboardsV2ApiService) DashboardsV2ListShares added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2ListShares(ctx _context.Context, id string, localVarOptionals *DashboardsV2ListSharesOpts) ([]ArduinoDashboardshare, *_nethttp.Response, error)

DashboardsV2ListShares listShares dashboards_v2 List of users the dashboard has been shared with

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param optional nil or *DashboardsV2ListSharesOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return []ArduinoDashboardshare

func (*DashboardsV2ApiService) DashboardsV2RequestAccess added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2RequestAccess(ctx _context.Context, id string, sharerequest Sharerequest, localVarOptionals *DashboardsV2RequestAccessOpts) (*_nethttp.Response, error)

DashboardsV2RequestAccess requestAccess dashboards_v2 Request access to a dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param sharerequest
  • @param optional nil or *DashboardsV2RequestAccessOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

func (*DashboardsV2ApiService) DashboardsV2Share added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2Share(ctx _context.Context, id string, dashboardshare Dashboardshare, localVarOptionals *DashboardsV2ShareOpts) (*_nethttp.Response, error)

DashboardsV2Share share dashboards_v2 Share a dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param dashboardshare
  • @param optional nil or *DashboardsV2ShareOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

func (*DashboardsV2ApiService) DashboardsV2Show added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2Show(ctx _context.Context, id string, localVarOptionals *DashboardsV2ShowOpts) (ArduinoDashboardv2, *_nethttp.Response, error)

DashboardsV2Show show dashboards_v2 Show a dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param optional nil or *DashboardsV2ShowOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDashboardv2

func (*DashboardsV2ApiService) DashboardsV2Update added in v1.4.0

func (a *DashboardsV2ApiService) DashboardsV2Update(ctx _context.Context, id string, dashboardv2 Dashboardv2, localVarOptionals *DashboardsV2UpdateOpts) (ArduinoDashboardv2, *_nethttp.Response, error)

DashboardsV2Update update dashboards_v2 Updates an existing dashboard

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the dashboard
  • @param dashboardv2 DashboardV2Payload describes a dashboard
  • @param optional nil or *DashboardsV2UpdateOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDashboardv2

type DashboardsV2CreateOpts added in v1.4.2

type DashboardsV2CreateOpts struct {
	XOrganization optional.String
}

DashboardsV2CreateOpts Optional parameters for the method 'DashboardsV2Create'

type DashboardsV2DeleteOpts added in v1.4.2

type DashboardsV2DeleteOpts struct {
	XOrganization optional.String
}

DashboardsV2DeleteOpts Optional parameters for the method 'DashboardsV2Delete'

type DashboardsV2DeleteShareOpts added in v1.4.2

type DashboardsV2DeleteShareOpts struct {
	XOrganization optional.String
}

DashboardsV2DeleteShareOpts Optional parameters for the method 'DashboardsV2DeleteShare'

type DashboardsV2LinkOpts added in v1.4.2

type DashboardsV2LinkOpts struct {
	XOrganization optional.String
}

DashboardsV2LinkOpts Optional parameters for the method 'DashboardsV2Link'

type DashboardsV2ListOpts added in v1.4.0

type DashboardsV2ListOpts struct {
	Name          optional.String
	UserId        optional.String
	XOrganization optional.String
}

DashboardsV2ListOpts Optional parameters for the method 'DashboardsV2List'

type DashboardsV2ListSharesOpts added in v1.4.2

type DashboardsV2ListSharesOpts struct {
	XOrganization optional.String
}

DashboardsV2ListSharesOpts Optional parameters for the method 'DashboardsV2ListShares'

type DashboardsV2RequestAccessOpts added in v1.4.2

type DashboardsV2RequestAccessOpts struct {
	XOrganization optional.String
}

DashboardsV2RequestAccessOpts Optional parameters for the method 'DashboardsV2RequestAccess'

type DashboardsV2ShareOpts added in v1.4.2

type DashboardsV2ShareOpts struct {
	XOrganization optional.String
}

DashboardsV2ShareOpts Optional parameters for the method 'DashboardsV2Share'

type DashboardsV2ShowOpts added in v1.4.2

type DashboardsV2ShowOpts struct {
	XOrganization optional.String
}

DashboardsV2ShowOpts Optional parameters for the method 'DashboardsV2Show'

type DashboardsV2UpdateOpts added in v1.4.2

type DashboardsV2UpdateOpts struct {
	XOrganization optional.String
}

DashboardsV2UpdateOpts Optional parameters for the method 'DashboardsV2Update'

type Dashboardshare added in v1.4.0

type Dashboardshare struct {
	// The userID of the user you want to share the dashboard with
	UserId string `json:"user_id,omitempty"`
	// The username of the user you want to share the dashboard with
	Username string `json:"username,omitempty"`
}

Dashboardshare struct for Dashboardshare

type Dashboardv2 added in v1.4.0

type Dashboardv2 struct {
	// The friendly name of the dashboard
	Name string `json:"name,omitempty"`
	// Widgets attached to this dashboard
	Widgets []Widget `json:"widgets,omitempty"`
}

Dashboardv2 DashboardV2Payload describes a dashboard

type DevicesV2ApiService

type DevicesV2ApiService service

DevicesV2ApiService DevicesV2Api service

func (*DevicesV2ApiService) DevicesV2Create

func (a *DevicesV2ApiService) DevicesV2Create(ctx _context.Context, createDevicesV2Payload CreateDevicesV2Payload, localVarOptionals *DevicesV2CreateOpts) (ArduinoDevicev2, *_nethttp.Response, error)

DevicesV2Create create devices_v2 Creates a new device associated to the user.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createDevicesV2Payload DeviceV2 describes a device.
  • @param optional nil or *DevicesV2CreateOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2

func (*DevicesV2ApiService) DevicesV2Delete

func (a *DevicesV2ApiService) DevicesV2Delete(ctx _context.Context, id string, localVarOptionals *DevicesV2DeleteOpts) (*_nethttp.Response, error)

DevicesV2Delete delete devices_v2 Removes a device associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param optional nil or *DevicesV2DeleteOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

func (*DevicesV2ApiService) DevicesV2GetEvents added in v1.1.0

DevicesV2GetEvents getEvents devices_v2 GET device events

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param optional nil or *DevicesV2GetEventsOpts - Optional Parameters:
  • @param "Limit" (optional.Int32) - The number of events to select
  • @param "Start" (optional.String) - The time at which to start selecting events
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2EventProperties

func (*DevicesV2ApiService) DevicesV2GetProperties

func (a *DevicesV2ApiService) DevicesV2GetProperties(ctx _context.Context, id string, localVarOptionals *DevicesV2GetPropertiesOpts) (ArduinoDevicev2properties, *_nethttp.Response, error)

DevicesV2GetProperties getProperties devices_v2 GET device properties

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param optional nil or *DevicesV2GetPropertiesOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted properties
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2properties

func (*DevicesV2ApiService) DevicesV2List

func (a *DevicesV2ApiService) DevicesV2List(ctx _context.Context, localVarOptionals *DevicesV2ListOpts) ([]ArduinoDevicev2, *_nethttp.Response, error)

DevicesV2List list devices_v2 Returns the list of devices associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *DevicesV2ListOpts - Optional Parameters:
  • @param "AcrossUserIds" (optional.Bool) - If true, returns all the devices
  • @param "Serial" (optional.String) - Filter by device serial number
  • @param "Tags" (optional.Interface of []string) - Filter by tags
  • @param "XOrganization" (optional.String) -

@return []ArduinoDevicev2

func (*DevicesV2ApiService) DevicesV2Show

func (a *DevicesV2ApiService) DevicesV2Show(ctx _context.Context, id string, localVarOptionals *DevicesV2ShowOpts) (ArduinoDevicev2, *_nethttp.Response, error)

DevicesV2Show show devices_v2 Returns the device requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param optional nil or *DevicesV2ShowOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2

func (*DevicesV2ApiService) DevicesV2Timeseries

func (a *DevicesV2ApiService) DevicesV2Timeseries(ctx _context.Context, id string, pid string, localVarOptionals *DevicesV2TimeseriesOpts) (ArduinoDevicev2propertyvalues, *_nethttp.Response, error)

DevicesV2Timeseries timeseries devices_v2 GET device properties values in a range of time

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param pid The id of the property
  • @param optional nil or *DevicesV2TimeseriesOpts - Optional Parameters:
  • @param "Limit" (optional.Int32) - The number of properties to select
  • @param "Start" (optional.String) - The time at which to start selecting properties
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2propertyvalues

func (*DevicesV2ApiService) DevicesV2Update

func (a *DevicesV2ApiService) DevicesV2Update(ctx _context.Context, id string, devicev2 Devicev2, localVarOptionals *DevicesV2UpdateOpts) (ArduinoDevicev2, *_nethttp.Response, error)

DevicesV2Update update devices_v2 Updates a device associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param devicev2 DeviceV2 describes a device.
  • @param optional nil or *DevicesV2UpdateOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoDevicev2

func (*DevicesV2ApiService) DevicesV2UpdateProperties

func (a *DevicesV2ApiService) DevicesV2UpdateProperties(ctx _context.Context, id string, propertiesValues PropertiesValues, localVarOptionals *DevicesV2UpdatePropertiesOpts) (*_nethttp.Response, error)

DevicesV2UpdateProperties updateProperties devices_v2 Update device properties last values

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param propertiesValues
  • @param optional nil or *DevicesV2UpdatePropertiesOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

type DevicesV2CertsApiService added in v1.3.0

type DevicesV2CertsApiService service

DevicesV2CertsApiService DevicesV2CertsApi service

func (*DevicesV2CertsApiService) DevicesV2CertsCreate added in v1.3.0

func (a *DevicesV2CertsApiService) DevicesV2CertsCreate(ctx _context.Context, id string, createDevicesV2CertsPayload CreateDevicesV2CertsPayload) (ArduinoDevicev2Cert, *_nethttp.Response, error)

DevicesV2CertsCreate create devices_v2_certs Creates a new cert associated to a device. The csr is signed and saved in database. The CommonName will be replaced with the device id.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param createDevicesV2CertsPayload

@return ArduinoDevicev2Cert

func (*DevicesV2CertsApiService) DevicesV2CertsDelete added in v1.3.0

func (a *DevicesV2CertsApiService) DevicesV2CertsDelete(ctx _context.Context, cid string, id string) (*_nethttp.Response, error)

DevicesV2CertsDelete delete devices_v2_certs Removes a cert associated to a device

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param cid The id of the cert
  • @param id The id of the device

func (*DevicesV2CertsApiService) DevicesV2CertsList added in v1.3.0

DevicesV2CertsList list devices_v2_certs Returns the list of certs associated to the device

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device

@return []ArduinoDevicev2Cert

func (*DevicesV2CertsApiService) DevicesV2CertsShow added in v1.3.0

DevicesV2CertsShow show devices_v2_certs Returns the cert requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param cid The id of the cert
  • @param id The id of the device

@return ArduinoDevicev2Cert

func (*DevicesV2CertsApiService) DevicesV2CertsUpdate added in v1.3.0

func (a *DevicesV2CertsApiService) DevicesV2CertsUpdate(ctx _context.Context, cid string, id string, devicev2Cert Devicev2Cert) (ArduinoDevicev2Cert, *_nethttp.Response, error)

DevicesV2CertsUpdate update devices_v2_certs Updates a cert associated to a device. The csr is signed and saved in database. The CommonName will be replaced with the device id.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param cid The id of the cert
  • @param id The id of the device
  • @param devicev2Cert

@return ArduinoDevicev2Cert

type DevicesV2CreateOpts added in v1.4.2

type DevicesV2CreateOpts struct {
	XOrganization optional.String
}

DevicesV2CreateOpts Optional parameters for the method 'DevicesV2Create'

type DevicesV2DeleteOpts added in v1.4.2

type DevicesV2DeleteOpts struct {
	XOrganization optional.String
}

DevicesV2DeleteOpts Optional parameters for the method 'DevicesV2Delete'

type DevicesV2GetEventsOpts added in v1.1.0

type DevicesV2GetEventsOpts struct {
	Limit         optional.Int32
	Start         optional.String
	XOrganization optional.String
}

DevicesV2GetEventsOpts Optional parameters for the method 'DevicesV2GetEvents'

type DevicesV2GetPropertiesOpts

type DevicesV2GetPropertiesOpts struct {
	ShowDeleted   optional.Bool
	XOrganization optional.String
}

DevicesV2GetPropertiesOpts Optional parameters for the method 'DevicesV2GetProperties'

type DevicesV2ListOpts

type DevicesV2ListOpts struct {
	AcrossUserIds optional.Bool
	Serial        optional.String
	Tags          optional.Interface
	XOrganization optional.String
}

DevicesV2ListOpts Optional parameters for the method 'DevicesV2List'

type DevicesV2OtaApiService added in v1.4.0

type DevicesV2OtaApiService service

DevicesV2OtaApiService DevicesV2OtaApi service

func (*DevicesV2OtaApiService) DevicesV2OtaSend added in v1.4.0

func (a *DevicesV2OtaApiService) DevicesV2OtaSend(ctx _context.Context, id string, devicev2Otabinaryurl Devicev2Otabinaryurl) (*_nethttp.Response, error)

DevicesV2OtaSend send devices_v2_ota Send a binary url to a device

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param devicev2Otabinaryurl

func (*DevicesV2OtaApiService) DevicesV2OtaUpload added in v1.4.0

func (a *DevicesV2OtaApiService) DevicesV2OtaUpload(ctx _context.Context, id string, otaFile *os.File, localVarOptionals *DevicesV2OtaUploadOpts) (*_nethttp.Response, error)

DevicesV2OtaUpload upload devices_v2_ota Upload a binary and send it to a device

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param otaFile OTA file
  • @param optional nil or *DevicesV2OtaUploadOpts - Optional Parameters:
  • @param "Async" (optional.Bool) - If false, wait for the full OTA process, until it gets a result from the device
  • @param "ExpireInMins" (optional.Int32) - Binary expire time in minutes, default 10 mins

type DevicesV2OtaUploadOpts added in v1.4.0

type DevicesV2OtaUploadOpts struct {
	Async        optional.Bool
	ExpireInMins optional.Int32
}

DevicesV2OtaUploadOpts Optional parameters for the method 'DevicesV2OtaUpload'

type DevicesV2PassApiService added in v1.3.0

type DevicesV2PassApiService service

DevicesV2PassApiService DevicesV2PassApi service

func (*DevicesV2PassApiService) DevicesV2PassCheck added in v1.3.0

func (a *DevicesV2PassApiService) DevicesV2PassCheck(ctx _context.Context, id string, checkDevicesV2PassPayload CheckDevicesV2PassPayload) (*_nethttp.Response, error)

DevicesV2PassCheck check devices_v2_pass Check if the password matches.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param checkDevicesV2PassPayload

func (*DevicesV2PassApiService) DevicesV2PassDelete added in v1.3.0

func (a *DevicesV2PassApiService) DevicesV2PassDelete(ctx _context.Context, id string) (*_nethttp.Response, error)

DevicesV2PassDelete delete devices_v2_pass Removes the password for the device.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device

func (*DevicesV2PassApiService) DevicesV2PassGet added in v1.3.0

func (a *DevicesV2PassApiService) DevicesV2PassGet(ctx _context.Context, id string, localVarOptionals *DevicesV2PassGetOpts) (ArduinoDevicev2Pass, *_nethttp.Response, error)

DevicesV2PassGet get devices_v2_pass Returns whether the password for this device is set or not. It doesn't return the password.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param optional nil or *DevicesV2PassGetOpts - Optional Parameters:
  • @param "SuggestedPassword" (optional.Bool) - If true, return a suggested password

@return ArduinoDevicev2Pass

func (*DevicesV2PassApiService) DevicesV2PassSet added in v1.3.0

func (a *DevicesV2PassApiService) DevicesV2PassSet(ctx _context.Context, id string, devicev2Pass Devicev2Pass) (ArduinoDevicev2Pass, *_nethttp.Response, error)

DevicesV2PassSet set devices_v2_pass Sets the password for the device. It can never be read back.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param devicev2Pass

@return ArduinoDevicev2Pass

type DevicesV2PassGetOpts added in v1.3.0

type DevicesV2PassGetOpts struct {
	SuggestedPassword optional.Bool
}

DevicesV2PassGetOpts Optional parameters for the method 'DevicesV2PassGet'

type DevicesV2ShowOpts added in v1.4.2

type DevicesV2ShowOpts struct {
	XOrganization optional.String
}

DevicesV2ShowOpts Optional parameters for the method 'DevicesV2Show'

type DevicesV2TagsApiService added in v1.4.0

type DevicesV2TagsApiService service

DevicesV2TagsApiService DevicesV2TagsApi service

func (*DevicesV2TagsApiService) DevicesV2TagsDelete added in v1.4.0

func (a *DevicesV2TagsApiService) DevicesV2TagsDelete(ctx _context.Context, id string, key string) (*_nethttp.Response, error)

DevicesV2TagsDelete delete devices_v2_tags Delete a tag associated to the device given its key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param key The key of the tag

func (*DevicesV2TagsApiService) DevicesV2TagsList added in v1.4.0

func (a *DevicesV2TagsApiService) DevicesV2TagsList(ctx _context.Context, id string) (ArduinoTags, *_nethttp.Response, error)

DevicesV2TagsList list devices_v2_tags List tags associated to the device.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device

@return ArduinoTags

func (*DevicesV2TagsApiService) DevicesV2TagsUpsert added in v1.4.0

func (a *DevicesV2TagsApiService) DevicesV2TagsUpsert(ctx _context.Context, id string, tag Tag) (*_nethttp.Response, error)

DevicesV2TagsUpsert upsert devices_v2_tags Creates or updates a tag associated to the device.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the device
  • @param tag

type DevicesV2TimeseriesOpts

type DevicesV2TimeseriesOpts struct {
	Limit         optional.Int32
	Start         optional.String
	XOrganization optional.String
}

DevicesV2TimeseriesOpts Optional parameters for the method 'DevicesV2Timeseries'

type DevicesV2UpdateOpts added in v1.4.2

type DevicesV2UpdateOpts struct {
	XOrganization optional.String
}

DevicesV2UpdateOpts Optional parameters for the method 'DevicesV2Update'

type DevicesV2UpdatePropertiesOpts added in v1.4.2

type DevicesV2UpdatePropertiesOpts struct {
	XOrganization optional.String
}

DevicesV2UpdatePropertiesOpts Optional parameters for the method 'DevicesV2UpdateProperties'

type Devicev2

type Devicev2 struct {
	// The type of the connections selected by the user when multiple connections are available
	ConnectionType string `json:"connection_type,omitempty"`
	// The fully qualified board name
	Fqbn string `json:"fqbn,omitempty"`
	// The friendly name of the device
	Name string `json:"name,omitempty"`
	// The serial uuid of the device
	Serial string `json:"serial,omitempty"`
	// The type of the device
	Type string `json:"type,omitempty"`
	// The user_id associated to the device. If absent it will be inferred from the authentication header
	UserId string `json:"user_id,omitempty"`
	// The version of the NINA/WIFI101 firmware running on the device
	WifiFwVersion string `json:"wifi_fw_version,omitempty"`
}

Devicev2 DeviceV2 describes a device.

type Devicev2Cert added in v1.3.0

type Devicev2Cert struct {
	// The Certification Authority you want to use
	Ca string `json:"ca,omitempty"`
	// The certificate request in pem format
	Csr string `json:"csr,omitempty"`
	// Whether the certificate is enabled
	Enabled bool `json:"enabled,omitempty"`
}

Devicev2Cert struct for Devicev2Cert

type Devicev2Otabinaryurl added in v1.4.0

type Devicev2Otabinaryurl struct {
	// If false, wait for the full OTA process, until it gets a result from the device
	Async bool `json:"async,omitempty"`
	// The object key of the binary
	BinaryKey string `json:"binary_key"`
	// Binary expire time in minutes, default 10 mins
	ExpireInMins int64 `json:"expire_in_mins,omitempty"`
}

Devicev2Otabinaryurl struct for Devicev2Otabinaryurl

type Devicev2Pass added in v1.3.0

type Devicev2Pass struct {
	// The password for the device
	Password string `json:"password,omitempty"`
}

Devicev2Pass struct for Devicev2Pass

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type HistoricDataRequest added in v1.4.0

type HistoricDataRequest struct {
	// Get data starting from this date
	From time.Time `json:"from"`
	// IDs of properties
	Properties []string `json:"properties"`
	// Get data up to this date
	To time.Time `json:"to"`
}

HistoricDataRequest struct for HistoricDataRequest

type InlineObject added in v1.4.0

type InlineObject struct {
	// If false, wait for the full OTA process, until it gets a result from the device
	Async bool `json:"async,omitempty"`
	// Binary expire time in minutes, default 10 mins
	ExpireInMins int32 `json:"expire_in_mins,omitempty"`
	// OTA file
	OtaFile *os.File `json:"ota_file"`
}

InlineObject struct for InlineObject

type LoraDevicesV1ApiService added in v1.4.0

type LoraDevicesV1ApiService service

LoraDevicesV1ApiService LoraDevicesV1Api service

func (*LoraDevicesV1ApiService) LoraDevicesV1Create added in v1.4.0

func (a *LoraDevicesV1ApiService) LoraDevicesV1Create(ctx _context.Context, createLoraDevicesV1Payload CreateLoraDevicesV1Payload, localVarOptionals *LoraDevicesV1CreateOpts) (ArduinoLoradevicev1, *_nethttp.Response, error)

LoraDevicesV1Create create lora_devices_v1 Create a new lora device. Its info are saved on our database, and on the lora provider network. Creates a device_v2 automatically

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createLoraDevicesV1Payload
  • @param optional nil or *LoraDevicesV1CreateOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoLoradevicev1

type LoraDevicesV1CreateOpts added in v1.4.4

type LoraDevicesV1CreateOpts struct {
	XOrganization optional.String
}

LoraDevicesV1CreateOpts Optional parameters for the method 'LoraDevicesV1Create'

type LoraFreqPlanV1ApiService added in v1.4.0

type LoraFreqPlanV1ApiService service

LoraFreqPlanV1ApiService LoraFreqPlanV1Api service

func (*LoraFreqPlanV1ApiService) LoraFreqPlanV1List added in v1.4.0

LoraFreqPlanV1List list lora_freq_plan_v1 List the lora frequency plans supported

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ArduinoLorafreqplansv1

type ModelError

type ModelError struct {
	// an application-specific error code, expressed as a string value.
	Code string `json:"code,omitempty"`
	// a human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`
	// a unique identifier for this particular occurrence of the problem.
	Id string `json:"id,omitempty"`
	// a meta object containing non-standard meta-information about the error.
	Meta map[string]interface{} `json:"meta,omitempty"`
	// the HTTP status code applicable to this problem
	Status int64 `json:"status,omitempty"`
}

ModelError Error response media type (default view)

type PropertiesV1ApiService

type PropertiesV1ApiService service

PropertiesV1ApiService PropertiesV1Api service

func (*PropertiesV1ApiService) PropertiesV1Create

func (a *PropertiesV1ApiService) PropertiesV1Create(ctx _context.Context, id string, property Property) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV1Create create properties_v1 Creates a new property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param property PropertyPayload describes a property of a thing. No field is mandatory

@return ArduinoProperty

func (*PropertiesV1ApiService) PropertiesV1Delete

func (a *PropertiesV1ApiService) PropertiesV1Delete(ctx _context.Context, id string, pid string, localVarOptionals *PropertiesV1DeleteOpts) (*_nethttp.Response, error)

PropertiesV1Delete delete properties_v1 Removes a property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param optional nil or *PropertiesV1DeleteOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, hard delete the property

func (*PropertiesV1ApiService) PropertiesV1List

func (a *PropertiesV1ApiService) PropertiesV1List(ctx _context.Context, id string, localVarOptionals *PropertiesV1ListOpts) ([]ArduinoProperty, *_nethttp.Response, error)

PropertiesV1List list properties_v1 Returns the list of properties associated to the thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *PropertiesV1ListOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted properties

@return []ArduinoProperty

func (*PropertiesV1ApiService) PropertiesV1Send

func (a *PropertiesV1ApiService) PropertiesV1Send(ctx _context.Context, id string, pid string, propertyStringValue PropertyStringValue) (*_nethttp.Response, error)

PropertiesV1Send send properties_v1 Publish a property value to MQTT, as string

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param propertyStringValue PropertyStringValuePayload describes a property value

func (*PropertiesV1ApiService) PropertiesV1Show

func (a *PropertiesV1ApiService) PropertiesV1Show(ctx _context.Context, id string, pid string, localVarOptionals *PropertiesV1ShowOpts) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV1Show show properties_v1 Returns the property requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param optional nil or *PropertiesV1ShowOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted properties

@return ArduinoProperty

func (*PropertiesV1ApiService) PropertiesV1Update

func (a *PropertiesV1ApiService) PropertiesV1Update(ctx _context.Context, id string, pid string, property Property) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV1Update update properties_v1 Updates a property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param property PropertyPayload describes a property of a thing. No field is mandatory

@return ArduinoProperty

type PropertiesV1DeleteOpts

type PropertiesV1DeleteOpts struct {
	Force optional.Bool
}

PropertiesV1DeleteOpts Optional parameters for the method 'PropertiesV1Delete'

type PropertiesV1ListOpts

type PropertiesV1ListOpts struct {
	ShowDeleted optional.Bool
}

PropertiesV1ListOpts Optional parameters for the method 'PropertiesV1List'

type PropertiesV1ShowOpts

type PropertiesV1ShowOpts struct {
	ShowDeleted optional.Bool
}

PropertiesV1ShowOpts Optional parameters for the method 'PropertiesV1Show'

type PropertiesV2ApiService

type PropertiesV2ApiService service

PropertiesV2ApiService PropertiesV2Api service

func (*PropertiesV2ApiService) PropertiesV2Create

func (a *PropertiesV2ApiService) PropertiesV2Create(ctx _context.Context, id string, property Property) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV2Create create properties_v2 Creates a new property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param property PropertyPayload describes a property of a thing. No field is mandatory

@return ArduinoProperty

func (*PropertiesV2ApiService) PropertiesV2Delete

func (a *PropertiesV2ApiService) PropertiesV2Delete(ctx _context.Context, id string, pid string, localVarOptionals *PropertiesV2DeleteOpts) (*_nethttp.Response, error)

PropertiesV2Delete delete properties_v2 Removes a property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param optional nil or *PropertiesV2DeleteOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, hard delete the property

func (*PropertiesV2ApiService) PropertiesV2List

func (a *PropertiesV2ApiService) PropertiesV2List(ctx _context.Context, id string, localVarOptionals *PropertiesV2ListOpts) ([]ArduinoProperty, *_nethttp.Response, error)

PropertiesV2List list properties_v2 Returns the list of properties associated to the thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *PropertiesV2ListOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted properties

@return []ArduinoProperty

func (*PropertiesV2ApiService) PropertiesV2Publish

func (a *PropertiesV2ApiService) PropertiesV2Publish(ctx _context.Context, id string, pid string, propertyValue PropertyValue) (*_nethttp.Response, error)

PropertiesV2Publish publish properties_v2 Publish a property value to MQTT

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param propertyValue PropertyValuePayload describes a property value

func (*PropertiesV2ApiService) PropertiesV2Show

func (a *PropertiesV2ApiService) PropertiesV2Show(ctx _context.Context, id string, pid string, localVarOptionals *PropertiesV2ShowOpts) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV2Show show properties_v2 Returns the property requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param optional nil or *PropertiesV2ShowOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted properties

@return ArduinoProperty

func (*PropertiesV2ApiService) PropertiesV2Timeseries added in v1.4.0

func (a *PropertiesV2ApiService) PropertiesV2Timeseries(ctx _context.Context, id string, pid string, localVarOptionals *PropertiesV2TimeseriesOpts) (ArduinoTimeseriesmedia, *_nethttp.Response, error)

PropertiesV2Timeseries timeseries properties_v2 Get numerical property's historic data binned on a specified time interval (note: the total number of data points should NOT be greater than 1000 otherwise the result will be truncated)

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid ID of a numerical property
  • @param optional nil or *PropertiesV2TimeseriesOpts - Optional Parameters:
  • @param "Desc" (optional.Bool) - Whether data's ordering (by time) should be descending
  • @param "From" (optional.String) - Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
  • @param "Interval" (optional.Int32) - Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
  • @param "To" (optional.String) - Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)

@return ArduinoTimeseriesmedia

func (*PropertiesV2ApiService) PropertiesV2Update

func (a *PropertiesV2ApiService) PropertiesV2Update(ctx _context.Context, id string, pid string, property Property) (ArduinoProperty, *_nethttp.Response, error)

PropertiesV2Update update properties_v2 Updates a property associated to a thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param pid The id of the property
  • @param property PropertyPayload describes a property of a thing. No field is mandatory

@return ArduinoProperty

type PropertiesV2DeleteOpts

type PropertiesV2DeleteOpts struct {
	Force optional.Bool
}

PropertiesV2DeleteOpts Optional parameters for the method 'PropertiesV2Delete'

type PropertiesV2ListOpts

type PropertiesV2ListOpts struct {
	ShowDeleted optional.Bool
}

PropertiesV2ListOpts Optional parameters for the method 'PropertiesV2List'

type PropertiesV2ShowOpts

type PropertiesV2ShowOpts struct {
	ShowDeleted optional.Bool
}

PropertiesV2ShowOpts Optional parameters for the method 'PropertiesV2Show'

type PropertiesV2TimeseriesOpts added in v1.4.0

type PropertiesV2TimeseriesOpts struct {
	Desc     optional.Bool
	From     optional.String
	Interval optional.Int32
	To       optional.String
}

PropertiesV2TimeseriesOpts Optional parameters for the method 'PropertiesV2Timeseries'

type PropertiesValue

type PropertiesValue struct {
	// The name of the property
	Name string `json:"name"`
	// The type of the property
	Type string `json:"type"`
	// The last value of the property
	Value interface{} `json:"value"`
}

PropertiesValue struct for PropertiesValue

type PropertiesValues

type PropertiesValues struct {
	// If true, send property values to device's input topic.
	Input      bool              `json:"input,omitempty"`
	Properties []PropertiesValue `json:"properties"`
}

PropertiesValues struct for PropertiesValues

type Property

type Property struct {
	// Maximum value of this property
	MaxValue float64 `json:"max_value,omitempty"`
	// Minimum value of this property
	MinValue float64 `json:"min_value,omitempty"`
	// The friendly name of the property
	Name string `json:"name"`
	// The permission of the property
	Permission string `json:"permission"`
	// If true, data will persist into a timeseries database
	Persist bool `json:"persist,omitempty"`
	// The integer id of the property
	Tag float64 `json:"tag,omitempty"`
	// The type of the property
	Type string `json:"type"`
	// The update frequency in seconds, or the amount of the property has to change in order to trigger an update
	UpdateParameter float64 `json:"update_parameter,omitempty"`
	// The update strategy for the property value
	UpdateStrategy string `json:"update_strategy"`
	// The  sketch variable name of the property
	VariableName string `json:"variable_name,omitempty"`
}

Property PropertyPayload describes a property of a thing. No field is mandatory

type PropertyStringValue

type PropertyStringValue struct {
	// The device who send the property
	DeviceId string `json:"device_id,omitempty"`
	// The property value, as string
	Value string `json:"value"`
}

PropertyStringValue PropertyStringValuePayload describes a property value

type PropertyValue

type PropertyValue struct {
	// The device who send the property
	DeviceId string `json:"device_id,omitempty"`
	// The property value
	Value interface{} `json:"value"`
}

PropertyValue PropertyValuePayload describes a property value

type SeriesV1ApiService

type SeriesV1ApiService service

SeriesV1ApiService SeriesV1Api service

func (*SeriesV1ApiService) SeriesV1BatchQuery

func (a *SeriesV1ApiService) SeriesV1BatchQuery(ctx _context.Context, batchQueryRequestsMediaV1 BatchQueryRequestsMediaV1) (ArduinoSeriesBatch, *_nethttp.Response, error)

SeriesV1BatchQuery batch_query series_v1 Returns the batch of time-series data

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param batchQueryRequestsMediaV1

@return ArduinoSeriesBatch

func (*SeriesV1ApiService) SeriesV1BatchQueryRaw

func (a *SeriesV1ApiService) SeriesV1BatchQueryRaw(ctx _context.Context, batchQueryRawRequestsMediaV1 BatchQueryRawRequestsMediaV1) (ArduinoSeriesRawBatch, *_nethttp.Response, error)

SeriesV1BatchQueryRaw batch_query_raw series_v1 Returns the batch of time-series data raw

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param batchQueryRawRequestsMediaV1

@return ArduinoSeriesRawBatch

type SeriesV2ApiService

type SeriesV2ApiService service

SeriesV2ApiService SeriesV2Api service

func (*SeriesV2ApiService) SeriesV2BatchQuery

func (a *SeriesV2ApiService) SeriesV2BatchQuery(ctx _context.Context, batchQueryRequestsMediaV1 BatchQueryRequestsMediaV1) (ArduinoSeriesBatch, *_nethttp.Response, error)

SeriesV2BatchQuery batch_query series_v2 Returns the batch of time-series data

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param batchQueryRequestsMediaV1

@return ArduinoSeriesBatch

func (*SeriesV2ApiService) SeriesV2BatchQueryRaw

func (a *SeriesV2ApiService) SeriesV2BatchQueryRaw(ctx _context.Context, batchQueryRawRequestsMediaV1 BatchQueryRawRequestsMediaV1) (ArduinoSeriesRawBatch, *_nethttp.Response, error)

SeriesV2BatchQueryRaw batch_query_raw series_v2 Returns the batch of time-series data raw

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param batchQueryRawRequestsMediaV1

@return ArduinoSeriesRawBatch

func (*SeriesV2ApiService) SeriesV2BatchQueryRawLastValue

func (a *SeriesV2ApiService) SeriesV2BatchQueryRawLastValue(ctx _context.Context, batchLastValueRequestsMediaV1 BatchLastValueRequestsMediaV1) (ArduinoSeriesRawBatchLastvalue, *_nethttp.Response, error)

SeriesV2BatchQueryRawLastValue batch_query_raw_last_value series_v2 Returns the batch of time-series data raw

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param batchLastValueRequestsMediaV1

@return ArduinoSeriesRawBatchLastvalue

func (*SeriesV2ApiService) SeriesV2HistoricData added in v1.4.0

func (a *SeriesV2ApiService) SeriesV2HistoricData(ctx _context.Context, historicDataRequest HistoricDataRequest) (*_nethttp.Response, error)

SeriesV2HistoricData historic_data series_v2 Request sending of historical data of properties by email

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param historicDataRequest

type ServerConfiguration added in v1.2.0

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable added in v1.2.0

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type Sharerequest added in v1.4.0

type Sharerequest struct {
	// The message the user want to send to the dashboard owner
	Message string `json:"message,omitempty"`
}

Sharerequest struct for Sharerequest

type Tag added in v1.4.0

type Tag struct {
	// Key of the tag
	Key string `json:"key"`
	// Value of the tag
	Value string `json:"value"`
}

Tag struct for Tag

type Thing

type Thing struct {
	// The arn of the associated device
	DeviceId string `json:"device_id,omitempty"`
	// The id of the thing
	Id string `json:"id,omitempty"`
	// The friendly name of the thing
	Name string `json:"name,omitempty"`
	// The properties of the thing
	Properties []Property `json:"properties,omitempty"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

Thing ThingPayload describes a thing

type ThingCreate added in v1.4.0

type ThingCreate struct {
	// The arn of the associated device
	DeviceId string `json:"device_id,omitempty"`
	// The id of the thing
	Id string `json:"id,omitempty"`
	// The friendly name of the thing
	Name string `json:"name,omitempty"`
	// The properties of the thing
	Properties []Property `json:"properties,omitempty"`
	// A time zone name Check /v2/timezones for a list of valid names.
	Timezone string `json:"timezone,omitempty"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

ThingCreate Payload to create a new thing

type ThingSketch

type ThingSketch struct {
	// The autogenerated sketch version
	SketchVersion string `json:"sketch_version,omitempty"`
}

ThingSketch ThingSketchPayload describes a sketch of a thing

type ThingUpdate added in v1.4.0

type ThingUpdate struct {
	// The arn of the associated device
	DeviceId string `json:"device_id,omitempty"`
	// The id of the thing
	Id string `json:"id,omitempty"`
	// The friendly name of the thing
	Name string `json:"name,omitempty"`
	// The properties of the thing
	Properties []Property `json:"properties,omitempty"`
	// A time zone name. Check /v2/timezones for a list of valid names.
	Timezone string `json:"timezone,omitempty"`
	// Webhook uri
	WebhookActive bool `json:"webhook_active,omitempty"`
	// Webhook uri
	WebhookUri string `json:"webhook_uri,omitempty"`
}

ThingUpdate Payload to update an existing thing

type ThingsV1ApiService

type ThingsV1ApiService service

ThingsV1ApiService ThingsV1Api service

func (*ThingsV1ApiService) ThingsV1Create

func (a *ThingsV1ApiService) ThingsV1Create(ctx _context.Context, createThingsV1Payload CreateThingsV1Payload, localVarOptionals *ThingsV1CreateOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV1Create create things_v1 Creates a new thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createThingsV1Payload ThingPayload describes a thing
  • @param optional nil or *ThingsV1CreateOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, detach device from the other thing, and attach to this thing

@return ArduinoThing

func (*ThingsV1ApiService) ThingsV1CreateSketch

func (a *ThingsV1ApiService) ThingsV1CreateSketch(ctx _context.Context, id string, thingSketch ThingSketch) (ArduinoThing, *_nethttp.Response, error)

ThingsV1CreateSketch createSketch things_v1 Creates a new sketch thing associated to the thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param thingSketch ThingSketchPayload describes a sketch of a thing

@return ArduinoThing

func (*ThingsV1ApiService) ThingsV1Delete

func (a *ThingsV1ApiService) ThingsV1Delete(ctx _context.Context, id string, localVarOptionals *ThingsV1DeleteOpts) (*_nethttp.Response, error)

ThingsV1Delete delete things_v1 Removes a thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV1DeleteOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, hard delete the thing

func (*ThingsV1ApiService) ThingsV1DeleteSketch

func (a *ThingsV1ApiService) ThingsV1DeleteSketch(ctx _context.Context, id string) (ArduinoThing, *_nethttp.Response, error)

ThingsV1DeleteSketch deleteSketch things_v1

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing

@return ArduinoThing

func (*ThingsV1ApiService) ThingsV1Layout

func (a *ThingsV1ApiService) ThingsV1Layout(ctx _context.Context, id string, localVarOptionals *ThingsV1LayoutOpts) (ArduinoThinglayout, *_nethttp.Response, error)

ThingsV1Layout layout things_v1 Returns the thing requested by the user, without last values data

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV1LayoutOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted thing

@return ArduinoThinglayout

func (*ThingsV1ApiService) ThingsV1List

func (a *ThingsV1ApiService) ThingsV1List(ctx _context.Context, localVarOptionals *ThingsV1ListOpts) ([]ArduinoThing, *_nethttp.Response, error)

ThingsV1List list things_v1 Returns the list of things associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ThingsV1ListOpts - Optional Parameters:
  • @param "AcrossUserIds" (optional.Bool) - If true, returns all the things
  • @param "DeviceId" (optional.String) - The id of the device you want to filter
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted things

@return []ArduinoThing

func (*ThingsV1ApiService) ThingsV1Show

func (a *ThingsV1ApiService) ThingsV1Show(ctx _context.Context, id string, localVarOptionals *ThingsV1ShowOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV1Show show things_v1 Returns the thing requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV1ShowOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted thing

@return ArduinoThing

func (*ThingsV1ApiService) ThingsV1Update

func (a *ThingsV1ApiService) ThingsV1Update(ctx _context.Context, id string, thing Thing, localVarOptionals *ThingsV1UpdateOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV1Update update things_v1 Updates a thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param thing ThingPayload describes a thing
  • @param optional nil or *ThingsV1UpdateOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, detach device from the other thing, and attach to this thing

@return ArduinoThing

func (*ThingsV1ApiService) ThingsV1UpdateSketch

func (a *ThingsV1ApiService) ThingsV1UpdateSketch(ctx _context.Context, id string, sketchId string) (ArduinoThing, *_nethttp.Response, error)

ThingsV1UpdateSketch updateSketch things_v1 Update an existing thing sketch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param sketchId The id of the sketch

@return ArduinoThing

type ThingsV1CreateOpts

type ThingsV1CreateOpts struct {
	Force optional.Bool
}

ThingsV1CreateOpts Optional parameters for the method 'ThingsV1Create'

type ThingsV1DeleteOpts

type ThingsV1DeleteOpts struct {
	Force optional.Bool
}

ThingsV1DeleteOpts Optional parameters for the method 'ThingsV1Delete'

type ThingsV1LayoutOpts

type ThingsV1LayoutOpts struct {
	ShowDeleted optional.Bool
}

ThingsV1LayoutOpts Optional parameters for the method 'ThingsV1Layout'

type ThingsV1ListOpts

type ThingsV1ListOpts struct {
	AcrossUserIds optional.Bool
	DeviceId      optional.String
	ShowDeleted   optional.Bool
}

ThingsV1ListOpts Optional parameters for the method 'ThingsV1List'

type ThingsV1ShowOpts

type ThingsV1ShowOpts struct {
	ShowDeleted optional.Bool
}

ThingsV1ShowOpts Optional parameters for the method 'ThingsV1Show'

type ThingsV1UpdateOpts

type ThingsV1UpdateOpts struct {
	Force optional.Bool
}

ThingsV1UpdateOpts Optional parameters for the method 'ThingsV1Update'

type ThingsV2ApiService

type ThingsV2ApiService service

ThingsV2ApiService ThingsV2Api service

func (*ThingsV2ApiService) ThingsV2Create

func (a *ThingsV2ApiService) ThingsV2Create(ctx _context.Context, thingCreate ThingCreate, localVarOptionals *ThingsV2CreateOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2Create create things_v2 Creates a new thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param thingCreate Payload to create a new thing
  • @param optional nil or *ThingsV2CreateOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, detach device from the other thing, and attach to this thing
  • @param "XOrganization" (optional.String) -

@return ArduinoThing

func (*ThingsV2ApiService) ThingsV2CreateSketch

func (a *ThingsV2ApiService) ThingsV2CreateSketch(ctx _context.Context, id string, thingSketch ThingSketch, localVarOptionals *ThingsV2CreateSketchOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2CreateSketch createSketch things_v2 Creates a new sketch thing associated to the thing

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param thingSketch ThingSketchPayload describes a sketch of a thing
  • @param optional nil or *ThingsV2CreateSketchOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoThing

func (*ThingsV2ApiService) ThingsV2Delete

func (a *ThingsV2ApiService) ThingsV2Delete(ctx _context.Context, id string, localVarOptionals *ThingsV2DeleteOpts) (*_nethttp.Response, error)

ThingsV2Delete delete things_v2 Removes a thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV2DeleteOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, hard delete the thing
  • @param "XOrganization" (optional.String) -

func (*ThingsV2ApiService) ThingsV2DeleteSketch

func (a *ThingsV2ApiService) ThingsV2DeleteSketch(ctx _context.Context, id string, localVarOptionals *ThingsV2DeleteSketchOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2DeleteSketch deleteSketch things_v2

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV2DeleteSketchOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -

@return ArduinoThing

func (*ThingsV2ApiService) ThingsV2List

func (a *ThingsV2ApiService) ThingsV2List(ctx _context.Context, localVarOptionals *ThingsV2ListOpts) ([]ArduinoThing, *_nethttp.Response, error)

ThingsV2List list things_v2 Returns the list of things associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ThingsV2ListOpts - Optional Parameters:
  • @param "AcrossUserIds" (optional.Bool) - If true, returns all the things
  • @param "DeviceId" (optional.String) - The id of the device you want to filter
  • @param "Ids" (optional.Interface of []string) - Filter only the desired things
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted things
  • @param "ShowProperties" (optional.Bool) - If true, returns things with their properties, and last values
  • @param "Tags" (optional.Interface of []string) - Filter by tags
  • @param "XOrganization" (optional.String) -

@return []ArduinoThing

func (*ThingsV2ApiService) ThingsV2Show

func (a *ThingsV2ApiService) ThingsV2Show(ctx _context.Context, id string, localVarOptionals *ThingsV2ShowOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2Show show things_v2 Returns the thing requested by the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param optional nil or *ThingsV2ShowOpts - Optional Parameters:
  • @param "ShowDeleted" (optional.Bool) - If true, shows the soft deleted thing
  • @param "XOrganization" (optional.String) -

@return ArduinoThing

func (*ThingsV2ApiService) ThingsV2Update

func (a *ThingsV2ApiService) ThingsV2Update(ctx _context.Context, id string, thingUpdate ThingUpdate, localVarOptionals *ThingsV2UpdateOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2Update update things_v2 Updates a thing associated to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param thingUpdate Payload to update an existing thing
  • @param optional nil or *ThingsV2UpdateOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - If true, detach device from the other thing, and attach to this thing
  • @param "XOrganization" (optional.String) -

@return ArduinoThing

func (*ThingsV2ApiService) ThingsV2UpdateSketch

func (a *ThingsV2ApiService) ThingsV2UpdateSketch(ctx _context.Context, id string, sketchId string, localVarOptionals *ThingsV2UpdateSketchOpts) (ArduinoThing, *_nethttp.Response, error)

ThingsV2UpdateSketch updateSketch things_v2 Update an existing thing sketch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param sketchId The id of the sketch
  • @param optional nil or *ThingsV2UpdateSketchOpts - Optional Parameters:
  • @param "XOrganization" (optional.String) -
  • @param "UpdateSketch" (optional.Interface of UpdateSketch) -

@return ArduinoThing

type ThingsV2CreateOpts

type ThingsV2CreateOpts struct {
	Force         optional.Bool
	XOrganization optional.String
}

ThingsV2CreateOpts Optional parameters for the method 'ThingsV2Create'

type ThingsV2CreateSketchOpts added in v1.4.2

type ThingsV2CreateSketchOpts struct {
	XOrganization optional.String
}

ThingsV2CreateSketchOpts Optional parameters for the method 'ThingsV2CreateSketch'

type ThingsV2DeleteOpts

type ThingsV2DeleteOpts struct {
	Force         optional.Bool
	XOrganization optional.String
}

ThingsV2DeleteOpts Optional parameters for the method 'ThingsV2Delete'

type ThingsV2DeleteSketchOpts added in v1.4.2

type ThingsV2DeleteSketchOpts struct {
	XOrganization optional.String
}

ThingsV2DeleteSketchOpts Optional parameters for the method 'ThingsV2DeleteSketch'

type ThingsV2ListOpts

type ThingsV2ListOpts struct {
	AcrossUserIds  optional.Bool
	DeviceId       optional.String
	Ids            optional.Interface
	ShowDeleted    optional.Bool
	ShowProperties optional.Bool
	Tags           optional.Interface
	XOrganization  optional.String
}

ThingsV2ListOpts Optional parameters for the method 'ThingsV2List'

type ThingsV2ShowOpts

type ThingsV2ShowOpts struct {
	ShowDeleted   optional.Bool
	XOrganization optional.String
}

ThingsV2ShowOpts Optional parameters for the method 'ThingsV2Show'

type ThingsV2TagsApiService added in v1.4.0

type ThingsV2TagsApiService service

ThingsV2TagsApiService ThingsV2TagsApi service

func (*ThingsV2TagsApiService) ThingsV2TagsDelete added in v1.4.0

func (a *ThingsV2TagsApiService) ThingsV2TagsDelete(ctx _context.Context, id string, key string) (*_nethttp.Response, error)

ThingsV2TagsDelete delete things_v2_tags Delete a tag associated to the thing given its key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param key The key of the tag

func (*ThingsV2TagsApiService) ThingsV2TagsList added in v1.4.0

func (a *ThingsV2TagsApiService) ThingsV2TagsList(ctx _context.Context, id string) (ArduinoTags, *_nethttp.Response, error)

ThingsV2TagsList list things_v2_tags List tags associated to the thing.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing

@return ArduinoTags

func (*ThingsV2TagsApiService) ThingsV2TagsUpsert added in v1.4.0

func (a *ThingsV2TagsApiService) ThingsV2TagsUpsert(ctx _context.Context, id string, tag Tag) (*_nethttp.Response, error)

ThingsV2TagsUpsert upsert things_v2_tags Creates or updates a tag associated to the thing.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The id of the thing
  • @param tag

type ThingsV2UpdateOpts

type ThingsV2UpdateOpts struct {
	Force         optional.Bool
	XOrganization optional.String
}

ThingsV2UpdateOpts Optional parameters for the method 'ThingsV2Update'

type ThingsV2UpdateSketchOpts added in v1.1.0

type ThingsV2UpdateSketchOpts struct {
	XOrganization optional.String
	UpdateSketch  optional.Interface
}

ThingsV2UpdateSketchOpts Optional parameters for the method 'ThingsV2UpdateSketch'

type TimeseriesDataPoint added in v1.4.0

type TimeseriesDataPoint struct {
	// Binning timestamp
	Time time.Time `json:"time"`
	// Avg value on the binning interval
	Value float64 `json:"value"`
}

TimeseriesDataPoint struct for TimeseriesDataPoint

type UpdateSketch added in v1.1.0

type UpdateSketch struct {
	// The autogenerated sketch version
	SketchVersion string `json:"sketch_version,omitempty"`
}

UpdateSketch struct for UpdateSketch

type Widget added in v1.4.0

type Widget struct {
	// Widget current height for desktop
	Height int64 `json:"height"`
	// Widget current height for mobile
	HeightMobile int64 `json:"height_mobile,omitempty"`
	// The UUID of the widget, set by client
	Id string `json:"id"`
	// The name of the widget
	Name string `json:"name,omitempty"`
	// Widget options
	Options map[string]interface{} `json:"options"`
	// The type of the widget
	Type      string   `json:"type"`
	Variables []string `json:"variables,omitempty"`
	// Widget current width for desktop
	Width int64 `json:"width"`
	// Widget current width for mobile
	WidthMobile int64 `json:"width_mobile,omitempty"`
	// Widget x position for desktop
	X int64 `json:"x"`
	// Widget x position for mobile
	XMobile int64 `json:"x_mobile,omitempty"`
	// Widget y position for desktop
	Y int64 `json:"y"`
	// Widget y position for mobile
	YMobile int64 `json:"y_mobile,omitempty"`
}

Widget Widget describes a dashboard widget

type Widgetlink struct {
	Variables []string `json:"variables,omitempty"`
}

Widgetlink struct for Widgetlink

Source Files

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL