# README

Go API client for cios

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./cios"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AccountApiGetMeGet /v2/meログイン中のユーザープロフィールおよび所属する企業、参加するグループの一覧を取得する
AuthApiRefreshTokenPost /connect/token
CollectionApiCreateSeriesDataBulkPut /v2/collections/{collection_id}/series/{series_id}/data-bulk
CollectionApiCreateSeriesImagePut /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/image
CollectionApiDeleteSeriesLatestDelete /v2/collections/{collection_id}/series/{series_id}/latest
CollectionApiGetCollectionStatusGet /v2/collections/{collection_id}/status
CollectionApiGetRecordedDatesGet /v2/collections/{collection_id}/recorded-dates
CollectionApiGetSeriesGet /v2/collections/{collection_id}/series/{series_id}
CollectionApiGetSeriesAggregationPost /v2/collections/{collection_id}/series/{series_id}/aggregation
CollectionApiGetSeriesImageGet /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/image
CollectionApiGetSeriesImagesGet /v2/collections/{collection_id}/series/{series_id}/images
CollectionApiGetSeriesThumbnailsGet /v2/collections/{collection_id}/series/{series_id}/thumbnails
CollectionApiGetSeriesThumnbnailGet /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/thumbnail
CollectionApiGetTimeSeriesDataGet /v2/collections/{collection_id}/series/{series_id}/data
CollectionApiPostCollectionArchivePost /v2/collections/{collection_id}/archive
CollectionApiPostCollectionRestorePost /v2/collections/{collection_id}/restore
CollectionApiPostSearchLatestPost /v2/collections/{collection_id}/search-latest
CollectionApiPostSeriesPost /v2/collections/{collection_id}/series時系列データ保存
CollectionApiPostSeriesBulkPost /v2/collections/{collection_id}/series-bulk
CollectionApiPutSeriesPut /v2/collections/{collection_id}/series/{series_id}/timestamp/{timestamp}/data
ContractApiGetContractGet /v2/contracts/{contract_id}契約IDの契約情報を取得する
ContractApiGetContractUserGet /v2/contracts/{contract_id}/users/{user_id}契約IDの契約情報を取得する
ContractApiGetContractUsersGet /v2/contracts/{contract_id}/users契約IDの契約情報を取得する
ContractApiGetContractsGet /v2/contracts契約一覧情報を取得する
DeviceApiCreateDevicePost /v2/devicesデバイスの登録
DeviceApiCreateDeviceClientPost /v2/devices/{device_id}/device_clients
DeviceApiCreateDevicePolicyPost /v2/devices/group_policies
DeviceApiDeleteDeviceDelete /v2/devices/{device_id}
DeviceApiDeleteDeviceClientDelete /v2/devices/{device_id}/device_clients/{client_id}device.write
DeviceApiDeletePolicyDelete /v2/devices/group_policies/{policy_id}
DeviceApiGetDeviceGet /v2/devices/{device_id}指定したidのデバイスの情報を取得する
DeviceApiGetDeviceInventoryLatestGet /v2/devices/{device_id}/inventory/latest
DeviceApiGetDeviceMonitoringLatestGet /v2/devices/{device_id}/monitoring/latest
DeviceApiGetDeviceMonitoringsLatestPost /v2/devices/monitoring/latest
DeviceApiGetDevicePoliciesGet /v2/devices/group_policies
DeviceApiGetDeviceProfileGet /v2/devices/profiledevice.profile
DeviceApiGetDevicesGet /v2/devicesデバイスの一覧を取得する
DeviceApiUpdateDevicePatch /v2/devices/{device_id}指定したidのデバイス情報を更新する
DeviceApiUpdateDeviceClientPatch /v2/devices/{device_id}/device_clients/{client_id}device.write
DeviceAssetApiCreateDeviceEntitiesComponentPost /v2/device_entities/{key}/components
DeviceAssetApiCreateDeviceEntitiesLifecyclePost /v2/device_entities/{key}/lifecycles
DeviceAssetApiCreateDeviceModelPost /v2/device_models
DeviceAssetApiCreateInventoryPost /v2/device_models/{name}/entities
DeviceAssetApiDeleteDeviceEntitiesComponentDelete /v2/device_entities/{key}/components/{component_id}
DeviceAssetApiDeleteDeviceEntitiesLifecycleDelete /v2/device_entities/{key}/lifecycles/{lifecycle_id}
DeviceAssetApiDeleteDeviceEntityDelete /v2/device_entities/{key}
DeviceAssetApiDeleteDeviceModelDelete /v2/device_models/{name}
DeviceAssetApiGetDeviceEntitiesGet /v2/device_entities
DeviceAssetApiGetDeviceEntitiesComponentGet /v2/device_entities/{key}/components/{component_id}
DeviceAssetApiGetDeviceEntitiesComponentsGet /v2/device_entities/{key}/components
DeviceAssetApiGetDeviceEntitiesLifecycleGet /v2/device_entities/{key}/lifecycles/{lifecycle_id}
DeviceAssetApiGetDeviceEntitiesLifecyclesGet /v2/device_entities/{key}/lifecycles
DeviceAssetApiGetDeviceEntityGet /v2/device_entities/{key}
DeviceAssetApiGetDeviceModelGet /v2/device_models/{name}
DeviceAssetApiGetDeviceModelsGet /v2/device_models
DeviceAssetApiGetDeviceModelsComponentsGet /v2/device_models/{name}/components
DeviceAssetApiUpdateDeviceEntitiesComponentPatch /v2/device_entities/{key}/components/{component_id}
DeviceAssetApiUpdateDeviceEntitiesComponentsPatch /v2/device_entities/{key}/components
DeviceAssetApiUpdateDeviceEntityPatch /v2/device_entities/{key}
DeviceAssetApiUpdateDeviceModelPatch /v2/device_models/{name}
FileStorageApiCopyNodePost /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/copy
FileStorageApiCreateBucketPost /v2/file_storage/buckets
FileStorageApiCreateDirectoryPost /v2/file_storage/buckets/{bucket_id}/create_directory
FileStorageApiDeleteBucketDelete /v2/file_storage/buckets/{bucket_id}
FileStorageApiDeleteNodeDelete /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}
FileStorageApiDownloadFileGet /v2/file_storage/buckets/{bucket_id}/download
FileStorageApiGetBucketGet /v2/file_storage/buckets/{bucket_id}
FileStorageApiGetBucketsGet /v2/file_storage/buckets
FileStorageApiGetNodeGet /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}
FileStorageApiGetNodesGet /v2/file_storage/buckets/{bucket_id}/nodes
FileStorageApiMoveNodePost /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/move
FileStorageApiRenameNodePost /v2/file_storage/buckets/{bucket_id}/nodes/{node_id}/rename
FileStorageApiUpdateBucketPatch /v2/file_storage/buckets/{bucket_id}
FileStorageApiUploadFilePut /v2/file_storage/buckets/{bucket_id}/upload
GeographyApiCreateCirclePost /v2/geo/circles
GeographyApiCreatePointPost /v2/geo/points
GeographyApiCreateRoutePost /v2/geo/routes
GeographyApiDeleteCircleDelete /v2/geo/circles/{circles_id}
GeographyApiDeletePointDelete /v2/geo/points/{point_id}
GeographyApiDeleteRouteDelete /v2/geo/routes/{routes_id}
GeographyApiGetCircleGet /v2/geo/circles/{circles_id}
GeographyApiGetCirclesGet /v2/geo/circles
GeographyApiGetPointGet /v2/geo/points/{point_id}
GeographyApiGetPointsGet /v2/geo/points
GeographyApiGetRouteGet /v2/geo/routes/{routes_id}
GeographyApiGetRoutesGet /v2/geo/routes
GeographyApiUpdateCirclePatch /v2/geo/circles/{circles_id}
GeographyApiUpdatePointPatch /v2/geo/points/{point_id}
GeographyApiUpdateRoutePatch /v2/geo/routes/{routes_id}
GroupApiCreateGroupPost /v2/groups
GroupApiDeleteGroupDelete /v2/groups/{group_id}
GroupApiDeleteMemberDelete /v2/groups/{group_id}/members
GroupApiGetGroupGet /v2/groups/{group_id}
GroupApiGetGroupsGet /v2/groups
GroupApiGetMembersGet /v2/groups/{group_id}/members
GroupApiInviteGroupPost /v2/groups/{group_id}/invites
GroupApiReplaceGroupPut /v2/groups/{group_id}
GroupApiSetMemberPatch /v2/groups/{group_id}/members
GroupApiUpdateGroupPatch /v2/groups/{group_id}
GroupApiUpdateMemberPut /v2/groups/{group_id}/members
LicenseApiGetMyLicensesGet /v2/licenses/me
PublishSubscribeApiCreateChannelPost /v2/channels
PublishSubscribeApiCreateDataStoreObjectPost /v2/datastore/channels/{channel_id}/objects
PublishSubscribeApiDeleteChannelDelete /v2/channels/{channel_id}
PublishSubscribeApiDeleteDataStoreChannelDelete /v2/datastore/channels/{channel_id}
PublishSubscribeApiDeleteDataStoreObjectDataDelete /v2/datastore/channels/{channel_id}/objects/{object_id}
PublishSubscribeApiDeleteDataStoreSessionDelete /v2/datastore/channels/{channel_id}/sessions/{session_id}
PublishSubscribeApiGetChannelGet /v2/channels/{channel_id}
PublishSubscribeApiGetChannelsGet /v2/channels
PublishSubscribeApiGetDataStoreChannelGet /v2/datastore/channels/{channel_id}
PublishSubscribeApiGetDataStoreChannelsGet /v2/datastore/channels
PublishSubscribeApiGetDataStoreMultiObjectDataLatestPost /v2/datastore/objects_latest
PublishSubscribeApiGetDataStoreObjectDataGet /v2/datastore/channels/{channel_id}/objects/{object_id}
PublishSubscribeApiGetDataStoreObjectDataLatestGet /v2/datastore/channels/{channel_id}/object_latest
PublishSubscribeApiGetDataStoreObjectsGet /v2/datastore/channels/{channel_id}/objects
PublishSubscribeApiGetDataStoreSessionGet /v2/datastore/channels/{channel_id}/sessions/{session_id}
PublishSubscribeApiGetDataStoreSessionsGet /v2/datastore/channels/{channel_id}/sessions
PublishSubscribeApiPublishMessagePost /v2/messaging
PublishSubscribeApiSubscribeMessageGet /v2/messaging
PublishSubscribeApiUpdateChannelPatch /v2/channels/{channel_id}
ResourceOwnerApiGetResourceOwnerGet /v2/resource_owners/{resource_owner_id}
ResourceOwnerApiGetResourceOwnersGet /v2/resource_owners
VideostreamingOperationsApiCreateVideoStreamsPlayPost /v2/video_streams/{video_id}/play
VideostreamingOperationsApiCreateVideoStreamsStopPost /v2/video_streams/{video_id}/stop
VideostreamingOperationsApiGetVideoStreamsGet /v2/video_streams/{video_id}
VideostreamingOperationsApiGetVideoStreamsListGet /v2/video_streams
VideostreamingOperationsApiGetVideoStreamsThumbnailGet /v2/video_streams/{video_id}/thumbnail
VideostreamingOperationsApiUpdateStreamsPatch /v2/video_streams/{video_id}

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author