losant_rest 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c00f2713b0820ca3b059e735ecfacdbbf3587f80
4
- data.tar.gz: 368a50fbd34057937155bcbfbcd0b93374dc948f
3
+ metadata.gz: feef8330911e8b103858f9a7c52fab99d5d6d6ce
4
+ data.tar.gz: ed34d8331125fc2376651d1266ae60d18bfe0bde
5
5
  SHA512:
6
- metadata.gz: c9f795186f951323494463a3034016ceaf27431e7471f0b712bcf7f9305a673ac3cc7d61d1562a905fe81d695d64fe8287e7faf78b039c760e3916a1e1bcaad7
7
- data.tar.gz: 7ccb33ee4592955cde6d094e01a2a7bba6aa50b32b36a65bd22be538d66d6491f7aaac0b48e38b13300949f208408c85b88f1983f36fdb4d0960c67cd8bcb18d
6
+ metadata.gz: 0612fe46ccdb7b55d93c2abd3c5f7c3e9be3581d7aafe0d7306829a05fd54d0fa70104c343c3e4ae98179cac3429c1cc37285d978abbbc0f74316ed5d14c04c2
7
+ data.tar.gz: 27a4ab8e19548f3b6d596630325e5bacd422d0740f049360033a2f505e19477587583095ae192bc3989dce7d7da045a83f8cd0e637629eb062db21865c49627a
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Losant Ruby REST API Client
2
2
 
3
- [![Build Status](https://travis-ci.org/Losant/losant-rest-ruby.svg?branch=master)](https://travis-ci.org/Losant/losant-rest-ruby)
3
+ [![Build Status](https://travis-ci.org/Losant/losant-rest-ruby.svg?branch=master)](https://travis-ci.org/Losant/losant-rest-ruby) [![Gem Version](https://badge.fury.io/rb/losant_rest.svg)](https://badge.fury.io/rb/losant_rest)
4
4
 
5
- The [Losant](https://www.losant.com>) REST API client provides a simple way to
5
+ The [Losant](https://www.losant.com) REST API client provides a simple way to
6
6
  use the comprehensive Losant API. You can authenticate either as a Losant
7
7
  device or with your user account, and have access to all the functionality
8
8
  of the Losant platform.
data/docs/_schemas.md CHANGED
@@ -1024,8 +1024,8 @@ Schema for the sucessful response when authenticating a Device
1024
1024
  "type": "string",
1025
1025
  "enum": [
1026
1026
  "standalone",
1027
- "master",
1028
- "owned",
1027
+ "gateway",
1028
+ "peripheral",
1029
1029
  "floating",
1030
1030
  "virtual"
1031
1031
  ]
@@ -1145,6 +1145,9 @@ Schema for a single Dashboard
1145
1145
  "minimum": 5,
1146
1146
  "maximum": 600
1147
1147
  },
1148
+ "isPasswordProtected": {
1149
+ "type": "boolean"
1150
+ },
1148
1151
  "public": {
1149
1152
  "type": "boolean"
1150
1153
  },
@@ -1288,6 +1291,12 @@ Schema for the body of a Dashboard modification request
1288
1291
  },
1289
1292
  "public": {
1290
1293
  "type": "boolean"
1294
+ },
1295
+ "password": {
1296
+ "type": [
1297
+ "string",
1298
+ "null"
1299
+ ]
1291
1300
  }
1292
1301
  },
1293
1302
  "additionalProperties": false
@@ -1382,6 +1391,12 @@ Schema for the body of a Dashboard creation request
1382
1391
  },
1383
1392
  "public": {
1384
1393
  "type": "boolean"
1394
+ },
1395
+ "password": {
1396
+ "type": [
1397
+ "string",
1398
+ "null"
1399
+ ]
1385
1400
  }
1386
1401
  },
1387
1402
  "additionalProperties": false,
@@ -1460,6 +1475,9 @@ Schema for a collection of Dashboards
1460
1475
  "minimum": 5,
1461
1476
  "maximum": 600
1462
1477
  },
1478
+ "isPasswordProtected": {
1479
+ "type": "boolean"
1480
+ },
1463
1481
  "public": {
1464
1482
  "type": "boolean"
1465
1483
  },
@@ -1664,13 +1682,13 @@ Schema for a single Device
1664
1682
  "type": "string",
1665
1683
  "enum": [
1666
1684
  "standalone",
1667
- "master",
1668
- "owned",
1685
+ "gateway",
1686
+ "peripheral",
1669
1687
  "floating",
1670
1688
  "virtual"
1671
1689
  ]
1672
1690
  },
1673
- "masterId": {
1691
+ "gatewayId": {
1674
1692
  "type": "string",
1675
1693
  "pattern": "^[A-Fa-f\\d]{24}$"
1676
1694
  },
@@ -2025,13 +2043,13 @@ Schema for the body of a Device modification request
2025
2043
  "type": "string",
2026
2044
  "enum": [
2027
2045
  "standalone",
2028
- "master",
2029
- "owned",
2046
+ "gateway",
2047
+ "peripheral",
2030
2048
  "floating",
2031
2049
  "virtual"
2032
2050
  ]
2033
2051
  },
2034
- "masterId": {
2052
+ "gatewayId": {
2035
2053
  "type": "string",
2036
2054
  "pattern": "^[A-Fa-f\\d]{24}$"
2037
2055
  }
@@ -2135,13 +2153,13 @@ Schema for the body of a Device creation request
2135
2153
  "type": "string",
2136
2154
  "enum": [
2137
2155
  "standalone",
2138
- "master",
2139
- "owned",
2156
+ "gateway",
2157
+ "peripheral",
2140
2158
  "floating",
2141
2159
  "virtual"
2142
2160
  ]
2143
2161
  },
2144
- "masterId": {
2162
+ "gatewayId": {
2145
2163
  "type": "string",
2146
2164
  "pattern": "^[A-Fa-f\\d]{24}$"
2147
2165
  }
@@ -2277,13 +2295,13 @@ Schema for a single Device Recipe
2277
2295
  "type": "string",
2278
2296
  "enum": [
2279
2297
  "standalone",
2280
- "master",
2281
- "owned",
2298
+ "gateway",
2299
+ "peripheral",
2282
2300
  "floating",
2283
2301
  "virtual"
2284
2302
  ]
2285
2303
  },
2286
- "masterId": {
2304
+ "gatewayId": {
2287
2305
  "type": "string",
2288
2306
  "pattern": "^[A-Fa-f\\d]{24}$"
2289
2307
  }
@@ -2476,13 +2494,13 @@ Schema for the body of a Device Recipe modification request
2476
2494
  "type": "string",
2477
2495
  "enum": [
2478
2496
  "standalone",
2479
- "master",
2480
- "owned",
2497
+ "gateway",
2498
+ "peripheral",
2481
2499
  "floating",
2482
2500
  "virtual"
2483
2501
  ]
2484
2502
  },
2485
- "masterId": {
2503
+ "gatewayId": {
2486
2504
  "type": "string",
2487
2505
  "pattern": "^[A-Fa-f\\d]{24}$"
2488
2506
  }
@@ -2597,13 +2615,13 @@ Schema for the body of a Device Recipe creation request
2597
2615
  "type": "string",
2598
2616
  "enum": [
2599
2617
  "standalone",
2600
- "master",
2601
- "owned",
2618
+ "gateway",
2619
+ "peripheral",
2602
2620
  "floating",
2603
2621
  "virtual"
2604
2622
  ]
2605
2623
  },
2606
- "masterId": {
2624
+ "gatewayId": {
2607
2625
  "type": "string",
2608
2626
  "pattern": "^[A-Fa-f\\d]{24}$"
2609
2627
  }
@@ -2748,13 +2766,13 @@ Schema for a collection of Device Recipes
2748
2766
  "type": "string",
2749
2767
  "enum": [
2750
2768
  "standalone",
2751
- "master",
2752
- "owned",
2769
+ "gateway",
2770
+ "peripheral",
2753
2771
  "floating",
2754
2772
  "virtual"
2755
2773
  ]
2756
2774
  },
2757
- "masterId": {
2775
+ "gatewayId": {
2758
2776
  "type": "string",
2759
2777
  "pattern": "^[A-Fa-f\\d]{24}$"
2760
2778
  }
@@ -3089,13 +3107,13 @@ Schema for a collection of Devices
3089
3107
  "type": "string",
3090
3108
  "enum": [
3091
3109
  "standalone",
3092
- "master",
3093
- "owned",
3110
+ "gateway",
3111
+ "peripheral",
3094
3112
  "floating",
3095
3113
  "virtual"
3096
3114
  ]
3097
3115
  },
3098
- "masterId": {
3116
+ "gatewayId": {
3099
3117
  "type": "string",
3100
3118
  "pattern": "^[A-Fa-f\\d]{24}$"
3101
3119
  },
data/docs/dashboard.md CHANGED
@@ -58,6 +58,7 @@ puts result
58
58
  | Name | Type | Required | Description | Default | Example |
59
59
  | ---- | ---- | -------- | ----------- | ------- | ------- |
60
60
  | dashboardId | string | Y | ID of the associated dashboard | | 575ece2b7ae143cd83dc4a9b |
61
+ | password | string | N | Password for password-protected dashboards | | undefined |
61
62
 
62
63
  #### Successful Responses
63
64
 
@@ -5,7 +5,7 @@ module LosantRest
5
5
  #
6
6
  # User API for accessing Losant data
7
7
  #
8
- # Built For Version 1.3.9
8
+ # Built For Version 1.3.10
9
9
  class Client
10
10
  attr_accessor :auth_token, :url
11
11
 
@@ -112,7 +112,7 @@ module LosantRest
112
112
 
113
113
  headers["Accept"] = "application/json"
114
114
  headers["Content-Type"] = "application/json"
115
- headers["Accept-Version"] = "^1.3.9"
115
+ headers["Accept-Version"] = "^1.3.10"
116
116
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
117
117
  path = self.url + options.fetch(:path, "")
118
118
 
@@ -47,6 +47,7 @@ module LosantRest
47
47
  #
48
48
  # Parameters:
49
49
  # * {string} dashboardId - ID of the associated dashboard
50
+ # * {string} password - Password for password-protected dashboards
50
51
  # * {boolean} _actions - Return resource actions in response
51
52
  # * {boolean} _links - Return resource link in response
52
53
  # * {boolean} _embedded - Return embedded resources in response
@@ -65,6 +66,7 @@ module LosantRest
65
66
 
66
67
  raise ArgumentError.new("dashboardId is required") unless params.has_key?(:dashboardId)
67
68
 
69
+ query_params[:password] = params[:password] if params.has_key?(:password)
68
70
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
69
71
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
70
72
  query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
@@ -1,3 +1,3 @@
1
1
  module LosantRest
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -14,8 +14,8 @@
14
14
  "type": "string",
15
15
  "enum": [
16
16
  "standalone",
17
- "master",
18
- "owned",
17
+ "gateway",
18
+ "peripheral",
19
19
  "floating",
20
20
  "virtual"
21
21
  ]
@@ -43,6 +43,9 @@
43
43
  "minimum": 5,
44
44
  "maximum": 600
45
45
  },
46
+ "isPasswordProtected": {
47
+ "type": "boolean"
48
+ },
46
49
  "public": {
47
50
  "type": "boolean"
48
51
  },
@@ -63,6 +63,12 @@
63
63
  },
64
64
  "public": {
65
65
  "type": "boolean"
66
+ },
67
+ "password": {
68
+ "type": [
69
+ "string",
70
+ "null"
71
+ ]
66
72
  }
67
73
  },
68
74
  "additionalProperties": false
@@ -67,6 +67,12 @@
67
67
  },
68
68
  "public": {
69
69
  "type": "boolean"
70
+ },
71
+ "password": {
72
+ "type": [
73
+ "string",
74
+ "null"
75
+ ]
70
76
  }
71
77
  },
72
78
  "additionalProperties": false,
@@ -50,6 +50,9 @@
50
50
  "minimum": 5,
51
51
  "maximum": 600
52
52
  },
53
+ "isPasswordProtected": {
54
+ "type": "boolean"
55
+ },
53
56
  "public": {
54
57
  "type": "boolean"
55
58
  },
data/schemas/device.json CHANGED
@@ -83,13 +83,13 @@
83
83
  "type": "string",
84
84
  "enum": [
85
85
  "standalone",
86
- "master",
87
- "owned",
86
+ "gateway",
87
+ "peripheral",
88
88
  "floating",
89
89
  "virtual"
90
90
  ]
91
91
  },
92
- "masterId": {
92
+ "gatewayId": {
93
93
  "type": "string",
94
94
  "pattern": "^[A-Fa-f\\d]{24}$"
95
95
  },
@@ -63,13 +63,13 @@
63
63
  "type": "string",
64
64
  "enum": [
65
65
  "standalone",
66
- "master",
67
- "owned",
66
+ "gateway",
67
+ "peripheral",
68
68
  "floating",
69
69
  "virtual"
70
70
  ]
71
71
  },
72
- "masterId": {
72
+ "gatewayId": {
73
73
  "type": "string",
74
74
  "pattern": "^[A-Fa-f\\d]{24}$"
75
75
  }
@@ -63,13 +63,13 @@
63
63
  "type": "string",
64
64
  "enum": [
65
65
  "standalone",
66
- "master",
67
- "owned",
66
+ "gateway",
67
+ "peripheral",
68
68
  "floating",
69
69
  "virtual"
70
70
  ]
71
71
  },
72
- "masterId": {
72
+ "gatewayId": {
73
73
  "type": "string",
74
74
  "pattern": "^[A-Fa-f\\d]{24}$"
75
75
  }
@@ -92,13 +92,13 @@
92
92
  "type": "string",
93
93
  "enum": [
94
94
  "standalone",
95
- "master",
96
- "owned",
95
+ "gateway",
96
+ "peripheral",
97
97
  "floating",
98
98
  "virtual"
99
99
  ]
100
100
  },
101
- "masterId": {
101
+ "gatewayId": {
102
102
  "type": "string",
103
103
  "pattern": "^[A-Fa-f\\d]{24}$"
104
104
  }
@@ -72,13 +72,13 @@
72
72
  "type": "string",
73
73
  "enum": [
74
74
  "standalone",
75
- "master",
76
- "owned",
75
+ "gateway",
76
+ "peripheral",
77
77
  "floating",
78
78
  "virtual"
79
79
  ]
80
80
  },
81
- "masterId": {
81
+ "gatewayId": {
82
82
  "type": "string",
83
83
  "pattern": "^[A-Fa-f\\d]{24}$"
84
84
  }
@@ -72,13 +72,13 @@
72
72
  "type": "string",
73
73
  "enum": [
74
74
  "standalone",
75
- "master",
76
- "owned",
75
+ "gateway",
76
+ "peripheral",
77
77
  "floating",
78
78
  "virtual"
79
79
  ]
80
80
  },
81
- "masterId": {
81
+ "gatewayId": {
82
82
  "type": "string",
83
83
  "pattern": "^[A-Fa-f\\d]{24}$"
84
84
  }
@@ -99,13 +99,13 @@
99
99
  "type": "string",
100
100
  "enum": [
101
101
  "standalone",
102
- "master",
103
- "owned",
102
+ "gateway",
103
+ "peripheral",
104
104
  "floating",
105
105
  "virtual"
106
106
  ]
107
107
  },
108
- "masterId": {
108
+ "gatewayId": {
109
109
  "type": "string",
110
110
  "pattern": "^[A-Fa-f\\d]{24}$"
111
111
  }
data/schemas/devices.json CHANGED
@@ -90,13 +90,13 @@
90
90
  "type": "string",
91
91
  "enum": [
92
92
  "standalone",
93
- "master",
94
- "owned",
93
+ "gateway",
94
+ "peripheral",
95
95
  "floating",
96
96
  "virtual"
97
97
  ]
98
98
  },
99
- "masterId": {
99
+ "gatewayId": {
100
100
  "type": "string",
101
101
  "pattern": "^[A-Fa-f\\d]{24}$"
102
102
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty