losant_rest 1.0.0

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.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/.rbenv-version +1 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +2 -0
  6. data/LICENSE +21 -0
  7. data/README.md +237 -0
  8. data/Rakefile +12 -0
  9. data/docs/_schemas.md +6348 -0
  10. data/docs/accessToken.md +107 -0
  11. data/docs/accessTokens.md +68 -0
  12. data/docs/application.md +107 -0
  13. data/docs/applicationKey.md +115 -0
  14. data/docs/applicationKeys.md +81 -0
  15. data/docs/applications.md +76 -0
  16. data/docs/auth.md +104 -0
  17. data/docs/dashboard.md +107 -0
  18. data/docs/dashboards.md +76 -0
  19. data/docs/data.md +78 -0
  20. data/docs/device.md +300 -0
  21. data/docs/deviceRecipe.md +152 -0
  22. data/docs/deviceRecipes.md +81 -0
  23. data/docs/devices.md +117 -0
  24. data/docs/event.md +115 -0
  25. data/docs/events.md +153 -0
  26. data/docs/flow.md +261 -0
  27. data/docs/flows.md +81 -0
  28. data/docs/me.md +312 -0
  29. data/docs/org.md +279 -0
  30. data/docs/orgs.md +75 -0
  31. data/docs/webhook.md +115 -0
  32. data/docs/webhooks.md +81 -0
  33. data/examples/auth.rb +32 -0
  34. data/examples/list_devices.rb +45 -0
  35. data/lib/losant_rest/access_token.rb +122 -0
  36. data/lib/losant_rest/access_tokens.rb +80 -0
  37. data/lib/losant_rest/application.rb +122 -0
  38. data/lib/losant_rest/application_key.rb +128 -0
  39. data/lib/losant_rest/application_keys.rb +98 -0
  40. data/lib/losant_rest/applications.rb +94 -0
  41. data/lib/losant_rest/auth.rb +122 -0
  42. data/lib/losant_rest/client.rb +132 -0
  43. data/lib/losant_rest/dashboard.rb +122 -0
  44. data/lib/losant_rest/dashboards.rb +94 -0
  45. data/lib/losant_rest/data.rb +89 -0
  46. data/lib/losant_rest/device.rb +336 -0
  47. data/lib/losant_rest/device_recipe.rb +169 -0
  48. data/lib/losant_rest/device_recipes.rb +98 -0
  49. data/lib/losant_rest/devices.rb +139 -0
  50. data/lib/losant_rest/error.rb +12 -0
  51. data/lib/losant_rest/event.rb +128 -0
  52. data/lib/losant_rest/events.rb +183 -0
  53. data/lib/losant_rest/flow.rb +290 -0
  54. data/lib/losant_rest/flows.rb +98 -0
  55. data/lib/losant_rest/me.rb +362 -0
  56. data/lib/losant_rest/org.rb +314 -0
  57. data/lib/losant_rest/orgs.rb +92 -0
  58. data/lib/losant_rest/utils.rb +22 -0
  59. data/lib/losant_rest/version.rb +3 -0
  60. data/lib/losant_rest/webhook.rb +128 -0
  61. data/lib/losant_rest/webhooks.rb +98 -0
  62. data/lib/losant_rest.rb +43 -0
  63. data/losant_rest.gemspec +25 -0
  64. data/schemas/accessToken.json +52 -0
  65. data/schemas/accessTokenPatch.json +19 -0
  66. data/schemas/accessTokenPost.json +32 -0
  67. data/schemas/accessTokens.json +65 -0
  68. data/schemas/application.json +65 -0
  69. data/schemas/applicationKey.json +68 -0
  70. data/schemas/applicationKeyPatch.json +18 -0
  71. data/schemas/applicationKeyPost.json +36 -0
  72. data/schemas/applicationKeys.json +110 -0
  73. data/schemas/applicationPatch.json +16 -0
  74. data/schemas/applicationPost.json +23 -0
  75. data/schemas/applications.json +103 -0
  76. data/schemas/authedDevice.json +34 -0
  77. data/schemas/authedUser.json +18 -0
  78. data/schemas/dashboard.json +95 -0
  79. data/schemas/dashboardPatch.json +69 -0
  80. data/schemas/dashboardPost.json +76 -0
  81. data/schemas/dashboards.json +133 -0
  82. data/schemas/device.json +113 -0
  83. data/schemas/deviceCommand.json +20 -0
  84. data/schemas/deviceCommands.json +25 -0
  85. data/schemas/deviceCredentials.json +22 -0
  86. data/schemas/deviceLog.json +28 -0
  87. data/schemas/devicePatch.json +78 -0
  88. data/schemas/devicePost.json +81 -0
  89. data/schemas/deviceRecipe.json +106 -0
  90. data/schemas/deviceRecipeBulkCreate.json +15 -0
  91. data/schemas/deviceRecipeBulkCreatePost.json +19 -0
  92. data/schemas/deviceRecipePatch.json +87 -0
  93. data/schemas/deviceRecipePost.json +90 -0
  94. data/schemas/deviceRecipes.json +148 -0
  95. data/schemas/deviceState.json +30 -0
  96. data/schemas/deviceStates.json +35 -0
  97. data/schemas/deviceTagFilter.json +19 -0
  98. data/schemas/devices.json +155 -0
  99. data/schemas/disableTwoFactorAuth.json +20 -0
  100. data/schemas/enableTwoFactorAuth.json +21 -0
  101. data/schemas/error.json +12 -0
  102. data/schemas/event.json +115 -0
  103. data/schemas/eventPatch.json +20 -0
  104. data/schemas/eventPost.json +39 -0
  105. data/schemas/events.json +165 -0
  106. data/schemas/flow.json +137 -0
  107. data/schemas/flowLog.json +46 -0
  108. data/schemas/flowPatch.json +107 -0
  109. data/schemas/flowPost.json +110 -0
  110. data/schemas/flowStorageEntries.json +7 -0
  111. data/schemas/flowStorageEntry.json +16 -0
  112. data/schemas/flows.json +179 -0
  113. data/schemas/githubLogin.json +14 -0
  114. data/schemas/lastValueData.json +34 -0
  115. data/schemas/lastValueQuery.json +36 -0
  116. data/schemas/me.json +173 -0
  117. data/schemas/mePatch.json +43 -0
  118. data/schemas/multiDeviceCommand.json +45 -0
  119. data/schemas/org.json +81 -0
  120. data/schemas/orgInvitePost.json +24 -0
  121. data/schemas/orgInvites.json +36 -0
  122. data/schemas/orgMemberPatch.json +23 -0
  123. data/schemas/orgPatch.json +16 -0
  124. data/schemas/orgPost.json +19 -0
  125. data/schemas/orgs.json +119 -0
  126. data/schemas/recentItem.json +27 -0
  127. data/schemas/recentItemList.json +36 -0
  128. data/schemas/success.json +12 -0
  129. data/schemas/timeSeriesData.json +89 -0
  130. data/schemas/timeSeriesQuery.json +64 -0
  131. data/schemas/userCredentials.json +25 -0
  132. data/schemas/virtualButtonPress.json +14 -0
  133. data/schemas/webhook.json +52 -0
  134. data/schemas/webhookPatch.json +29 -0
  135. data/schemas/webhookPost.json +32 -0
  136. data/schemas/webhooks.json +94 -0
  137. data/test/basic_test.rb +67 -0
  138. data/test/test_helper.rb +14 -0
  139. metadata +239 -0
@@ -0,0 +1,107 @@
1
+ # Access Token Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Access Token resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Delete](#delete)
10
+ * [Get](#get)
11
+ * [Patch](#patch)
12
+
13
+ <br/>
14
+
15
+ ## Delete
16
+
17
+ Deletes an accessToken
18
+
19
+ ```ruby
20
+ result = client.access_token.delete(accessTokenId: my_access_token_id)
21
+
22
+ puts result
23
+ ```
24
+
25
+ #### Available Parameters
26
+
27
+ | Name | Type | Required | Description | Default | Example |
28
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
29
+ | accessTokenId | string | Y | ID associated with the accessToken | | 575ec7417ae143cd83dc4a95 |
30
+
31
+ #### Successful Responses
32
+
33
+ | Code | Type | Description |
34
+ | ---- | ---- | ----------- |
35
+ | 200 | [Success](_schemas.md#success) | If accessToken was successfully deleted |
36
+
37
+ #### Error Responses
38
+
39
+ | Code | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
42
+ | 404 | [Error](_schemas.md#error) | Error if accessToken was not found |
43
+
44
+ <br/>
45
+
46
+ ## Get
47
+
48
+ Retrieves information on an accessToken
49
+
50
+ ```ruby
51
+ result = client.access_token.get(accessTokenId: my_access_token_id)
52
+
53
+ puts result
54
+ ```
55
+
56
+ #### Available Parameters
57
+
58
+ | Name | Type | Required | Description | Default | Example |
59
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
60
+ | accessTokenId | string | Y | ID associated with the accessToken | | 575ec7417ae143cd83dc4a95 |
61
+
62
+ #### Successful Responses
63
+
64
+ | Code | Type | Description |
65
+ | ---- | ---- | ----------- |
66
+ | 200 | [Access Token](_schemas.md#access-token) | Access token information |
67
+
68
+ #### Error Responses
69
+
70
+ | Code | Type | Description |
71
+ | ---- | ---- | ----------- |
72
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
73
+ | 404 | [Error](_schemas.md#error) | Error if accessToken was not found |
74
+
75
+ <br/>
76
+
77
+ ## Patch
78
+
79
+ Updates information about an accessToken
80
+
81
+ ```ruby
82
+ result = client.access_token.patch(
83
+ accessTokenId: my_access_token_id,
84
+ accessToken: my_access_token)
85
+
86
+ puts result
87
+ ```
88
+
89
+ #### Available Parameters
90
+
91
+ | Name | Type | Required | Description | Default | Example |
92
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
93
+ | accessTokenId | string | Y | ID associated with the accessToken | | 575ec7417ae143cd83dc4a95 |
94
+ | accessToken | [Access Token Patch](_schemas.md#access-token-patch) | Y | Object containing new properties of the accessToken | | [Access Token Patch Example](_schemas.md#access-token-patch-example) |
95
+
96
+ #### Successful Responses
97
+
98
+ | Code | Type | Description |
99
+ | ---- | ---- | ----------- |
100
+ | 200 | [Access Token](_schemas.md#access-token) | Updated accessToken information |
101
+
102
+ #### Error Responses
103
+
104
+ | Code | Type | Description |
105
+ | ---- | ---- | ----------- |
106
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
107
+ | 404 | [Error](_schemas.md#error) | Error if accessToken was not found |
@@ -0,0 +1,68 @@
1
+ # Access Tokens Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Access Tokens resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Get](#get)
10
+ * [Post](#post)
11
+
12
+ <br/>
13
+
14
+ ## Get
15
+
16
+ Returns the accessTokens for a user
17
+
18
+ ```ruby
19
+ result = client.access_tokens.get
20
+
21
+ puts result
22
+ ```
23
+
24
+ #### Available Parameters
25
+
26
+ No parameters needed for this call.
27
+
28
+ #### Successful Responses
29
+
30
+ | Code | Type | Description |
31
+ | ---- | ---- | ----------- |
32
+ | 200 | [Access Tokens](_schemas.md#access-tokens) | Collection of accessTokens |
33
+
34
+ #### Error Responses
35
+
36
+ | Code | Type | Description |
37
+ | ---- | ---- | ----------- |
38
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
39
+
40
+ <br/>
41
+
42
+ ## Post
43
+
44
+ Create a new accessToken for a user
45
+
46
+ ```ruby
47
+ result = client.access_tokens.post(accessToken: my_access_token)
48
+
49
+ puts result
50
+ ```
51
+
52
+ #### Available Parameters
53
+
54
+ | Name | Type | Required | Description | Default | Example |
55
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
56
+ | accessToken | [Access Token Post](_schemas.md#access-token-post) | Y | AccessToken information | | [Access Token Post Example](_schemas.md#access-token-post-example) |
57
+
58
+ #### Successful Responses
59
+
60
+ | Code | Type | Description |
61
+ | ---- | ---- | ----------- |
62
+ | 201 | [Access Token](_schemas.md#access-token) | The successfully created accessToken |
63
+
64
+ #### Error Responses
65
+
66
+ | Code | Type | Description |
67
+ | ---- | ---- | ----------- |
68
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
@@ -0,0 +1,107 @@
1
+ # Application Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Application resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Delete](#delete)
10
+ * [Get](#get)
11
+ * [Patch](#patch)
12
+
13
+ <br/>
14
+
15
+ ## Delete
16
+
17
+ Deletes an application
18
+
19
+ ```ruby
20
+ result = client.application.delete(applicationId: my_application_id)
21
+
22
+ puts result
23
+ ```
24
+
25
+ #### Available Parameters
26
+
27
+ | Name | Type | Required | Description | Default | Example |
28
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
29
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
30
+
31
+ #### Successful Responses
32
+
33
+ | Code | Type | Description |
34
+ | ---- | ---- | ----------- |
35
+ | 200 | [Success](_schemas.md#success) | If application was successfully deleted |
36
+
37
+ #### Error Responses
38
+
39
+ | Code | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
42
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
43
+
44
+ <br/>
45
+
46
+ ## Get
47
+
48
+ Retrieves information on an application
49
+
50
+ ```ruby
51
+ result = client.application.get(applicationId: my_application_id)
52
+
53
+ puts result
54
+ ```
55
+
56
+ #### Available Parameters
57
+
58
+ | Name | Type | Required | Description | Default | Example |
59
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
60
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
61
+
62
+ #### Successful Responses
63
+
64
+ | Code | Type | Description |
65
+ | ---- | ---- | ----------- |
66
+ | 200 | [Application](_schemas.md#application) | Application information |
67
+
68
+ #### Error Responses
69
+
70
+ | Code | Type | Description |
71
+ | ---- | ---- | ----------- |
72
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
73
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
74
+
75
+ <br/>
76
+
77
+ ## Patch
78
+
79
+ Updates information about an application
80
+
81
+ ```ruby
82
+ result = client.application.patch(
83
+ applicationId: my_application_id,
84
+ application: my_application)
85
+
86
+ puts result
87
+ ```
88
+
89
+ #### Available Parameters
90
+
91
+ | Name | Type | Required | Description | Default | Example |
92
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
93
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
94
+ | application | [Application Patch](_schemas.md#application-patch) | Y | Object containing new application properties | | [Application Patch Example](_schemas.md#application-patch-example) |
95
+
96
+ #### Successful Responses
97
+
98
+ | Code | Type | Description |
99
+ | ---- | ---- | ----------- |
100
+ | 200 | [Application](_schemas.md#application) | Updated application information |
101
+
102
+ #### Error Responses
103
+
104
+ | Code | Type | Description |
105
+ | ---- | ---- | ----------- |
106
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
107
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
@@ -0,0 +1,115 @@
1
+ # Application Key Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Application Key resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Delete](#delete)
10
+ * [Get](#get)
11
+ * [Patch](#patch)
12
+
13
+ <br/>
14
+
15
+ ## Delete
16
+
17
+ Deletes an applicationKey
18
+
19
+ ```ruby
20
+ result = client.application_key.delete(
21
+ applicationId: my_application_id,
22
+ applicationKeyId: my_application_key_id)
23
+
24
+ puts result
25
+ ```
26
+
27
+ #### Available Parameters
28
+
29
+ | Name | Type | Required | Description | Default | Example |
30
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
31
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
32
+ | applicationKeyId | string | Y | ID associated with the applicationKey | | 575ec76c7ae143cd83dc4a96 |
33
+
34
+ #### Successful Responses
35
+
36
+ | Code | Type | Description |
37
+ | ---- | ---- | ----------- |
38
+ | 200 | [Success](_schemas.md#success) | If applicationKey was successfully deleted |
39
+
40
+ #### Error Responses
41
+
42
+ | Code | Type | Description |
43
+ | ---- | ---- | ----------- |
44
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
45
+ | 404 | [Error](_schemas.md#error) | Error if applicationKey was not found |
46
+
47
+ <br/>
48
+
49
+ ## Get
50
+
51
+ Retrieves information on an applicationKey
52
+
53
+ ```ruby
54
+ result = client.application_key.get(
55
+ applicationId: my_application_id,
56
+ applicationKeyId: my_application_key_id)
57
+
58
+ puts result
59
+ ```
60
+
61
+ #### Available Parameters
62
+
63
+ | Name | Type | Required | Description | Default | Example |
64
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
65
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
66
+ | applicationKeyId | string | Y | ID associated with the applicationKey | | 575ec76c7ae143cd83dc4a96 |
67
+
68
+ #### Successful Responses
69
+
70
+ | Code | Type | Description |
71
+ | ---- | ---- | ----------- |
72
+ | 200 | [Application Key](_schemas.md#application-key) | applicationKey information |
73
+
74
+ #### Error Responses
75
+
76
+ | Code | Type | Description |
77
+ | ---- | ---- | ----------- |
78
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
79
+ | 404 | [Error](_schemas.md#error) | Error if applicationKey was not found |
80
+
81
+ <br/>
82
+
83
+ ## Patch
84
+
85
+ Updates information about an applicationKey
86
+
87
+ ```ruby
88
+ result = client.application_key.patch(
89
+ applicationId: my_application_id,
90
+ applicationKeyId: my_application_key_id,
91
+ applicationKey: my_application_key)
92
+
93
+ puts result
94
+ ```
95
+
96
+ #### Available Parameters
97
+
98
+ | Name | Type | Required | Description | Default | Example |
99
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
100
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
101
+ | applicationKeyId | string | Y | ID associated with the applicationKey | | 575ec76c7ae143cd83dc4a96 |
102
+ | applicationKey | [Application Key Patch](_schemas.md#application-key-patch) | Y | Object containing new properties of the applicationKey | | [Application Key Patch Example](_schemas.md#application-key-patch-example) |
103
+
104
+ #### Successful Responses
105
+
106
+ | Code | Type | Description |
107
+ | ---- | ---- | ----------- |
108
+ | 200 | [Application Key](_schemas.md#application-key) | Updated applicationKey information |
109
+
110
+ #### Error Responses
111
+
112
+ | Code | Type | Description |
113
+ | ---- | ---- | ----------- |
114
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
115
+ | 404 | [Error](_schemas.md#error) | Error if applicationKey was not found |
@@ -0,0 +1,81 @@
1
+ # Application Keys Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Application Keys resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Get](#get)
10
+ * [Post](#post)
11
+
12
+ <br/>
13
+
14
+ ## Get
15
+
16
+ Returns the applicationKeys for an application
17
+
18
+ ```ruby
19
+ result = client.application_keys.get(applicationId: my_application_id)
20
+
21
+ puts result
22
+ ```
23
+
24
+ #### Available Parameters
25
+
26
+ | Name | Type | Required | Description | Default | Example |
27
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
28
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
29
+ | sortField | string | N | Field to sort the results by. Accepted values are: key, status, id, creationDate | name | name |
30
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
31
+ | page | string | N | Which page of results to return | 0 | 0 |
32
+ | perPage | string | N | How many items to return per page | 1000 | 10 |
33
+ | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: key, status | | key |
34
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | the*key |
35
+
36
+ #### Successful Responses
37
+
38
+ | Code | Type | Description |
39
+ | ---- | ---- | ----------- |
40
+ | 200 | [Application Keys](_schemas.md#application-keys) | Collection of applicationKeys |
41
+
42
+ #### Error Responses
43
+
44
+ | Code | Type | Description |
45
+ | ---- | ---- | ----------- |
46
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
47
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
48
+
49
+ <br/>
50
+
51
+ ## Post
52
+
53
+ Create a new applicationKey for an application
54
+
55
+ ```ruby
56
+ result = client.application_keys.post(
57
+ applicationId: my_application_id,
58
+ applicationKey: my_application_key)
59
+
60
+ puts result
61
+ ```
62
+
63
+ #### Available Parameters
64
+
65
+ | Name | Type | Required | Description | Default | Example |
66
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
67
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
68
+ | applicationKey | [Application Key Post](_schemas.md#application-key-post) | Y | ApplicationKey information | | [Application Key Post Example](_schemas.md#application-key-post-example) |
69
+
70
+ #### Successful Responses
71
+
72
+ | Code | Type | Description |
73
+ | ---- | ---- | ----------- |
74
+ | 201 | [Application Key](_schemas.md#application-key) | Successfully created applicationKey |
75
+
76
+ #### Error Responses
77
+
78
+ | Code | Type | Description |
79
+ | ---- | ---- | ----------- |
80
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
81
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
@@ -0,0 +1,76 @@
1
+ # Applications Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Applications resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Get](#get)
10
+ * [Post](#post)
11
+
12
+ <br/>
13
+
14
+ ## Get
15
+
16
+ Returns the applications the current user has permission to see
17
+
18
+ ```ruby
19
+ result = client.applications.get(optional_params)
20
+
21
+ puts result
22
+ ```
23
+
24
+ #### Available Parameters
25
+
26
+ | Name | Type | Required | Description | Default | Example |
27
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
28
+ | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, ownerId | name | name |
29
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
30
+ | page | string | N | Which page of results to return | 0 | 0 |
31
+ | perPage | string | N | How many items to return per page | 1000 | 10 |
32
+ | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
33
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * app |
34
+ | orgId | string | N | If not provided, return all applications. If provided but blank, only return applications belonging to the current user. If provided and an id, only return applications belonging to the given organization id. | | 575ecdf07ae143cd83dc4a9a |
35
+
36
+ #### Successful Responses
37
+
38
+ | Code | Type | Description |
39
+ | ---- | ---- | ----------- |
40
+ | 200 | [Applications](_schemas.md#applications) | Collection of applications |
41
+
42
+ #### Error Responses
43
+
44
+ | Code | Type | Description |
45
+ | ---- | ---- | ----------- |
46
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
47
+
48
+ <br/>
49
+
50
+ ## Post
51
+
52
+ Create a new application
53
+
54
+ ```ruby
55
+ result = client.applications.post(application: my_application)
56
+
57
+ puts result
58
+ ```
59
+
60
+ #### Available Parameters
61
+
62
+ | Name | Type | Required | Description | Default | Example |
63
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
64
+ | application | [Application Post](_schemas.md#application-post) | Y | New application information | | [Application Post Example](_schemas.md#application-post-example) |
65
+
66
+ #### Successful Responses
67
+
68
+ | Code | Type | Description |
69
+ | ---- | ---- | ----------- |
70
+ | 201 | [Application](_schemas.md#application) | Successfully created application |
71
+
72
+ #### Error Responses
73
+
74
+ | Code | Type | Description |
75
+ | ---- | ---- | ----------- |
76
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
data/docs/auth.md ADDED
@@ -0,0 +1,104 @@
1
+ # Auth Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Auth resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Authenticate Device](#authenticate-device)
10
+ * [Authenticate User](#authenticate-user)
11
+ * [Authenticate User Github](#authenticate-user-github)
12
+
13
+ <br/>
14
+
15
+ ## Authenticate Device
16
+
17
+ Authenticates a device using the provided credentials
18
+
19
+ ```ruby
20
+ result = client.auth.authenticate_device(credentials: my_credentials)
21
+
22
+ puts result
23
+ ```
24
+
25
+ #### Available Parameters
26
+
27
+ | Name | Type | Required | Description | Default | Example |
28
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
29
+ | credentials | [Device Credentials](_schemas.md#device-credentials) | Y | Device authentication credentials | | [Device Credentials Example](_schemas.md#device-credentials-example) |
30
+
31
+ #### Successful Responses
32
+
33
+ | Code | Type | Description |
34
+ | ---- | ---- | ----------- |
35
+ | 200 | [Authenticated Device](_schemas.md#authenticated-device) | Successful authentication |
36
+
37
+ #### Error Responses
38
+
39
+ | Code | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
42
+ | 401 | [Error](_schemas.md#error) | Unauthorized error if authentication fails |
43
+
44
+ <br/>
45
+
46
+ ## Authenticate User
47
+
48
+ Authenticates a user using the provided credentials
49
+
50
+ ```ruby
51
+ result = client.auth.authenticate_user(credentials: my_credentials)
52
+
53
+ puts result
54
+ ```
55
+
56
+ #### Available Parameters
57
+
58
+ | Name | Type | Required | Description | Default | Example |
59
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
60
+ | credentials | [User Credentials](_schemas.md#user-credentials) | Y | User authentication credentials | | [User Credentials Example](_schemas.md#user-credentials-example) |
61
+
62
+ #### Successful Responses
63
+
64
+ | Code | Type | Description |
65
+ | ---- | ---- | ----------- |
66
+ | 200 | [Authenticated User](_schemas.md#authenticated-user) | Successful authentication |
67
+
68
+ #### Error Responses
69
+
70
+ | Code | Type | Description |
71
+ | ---- | ---- | ----------- |
72
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
73
+ | 401 | [Error](_schemas.md#error) | Unauthorized error if authentication fails |
74
+
75
+ <br/>
76
+
77
+ ## Authenticate User Github
78
+
79
+ Authenticates a user via GitHub OAuth
80
+
81
+ ```ruby
82
+ result = client.auth.authenticate_user_github(oauth: my_oauth)
83
+
84
+ puts result
85
+ ```
86
+
87
+ #### Available Parameters
88
+
89
+ | Name | Type | Required | Description | Default | Example |
90
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
91
+ | oauth | [Github Login](_schemas.md#github-login) | Y | User authentication credentials (access token) | | [Github Login Example](_schemas.md#github-login-example) |
92
+
93
+ #### Successful Responses
94
+
95
+ | Code | Type | Description |
96
+ | ---- | ---- | ----------- |
97
+ | 200 | [Authenticated User](_schemas.md#authenticated-user) | Successful authentication |
98
+
99
+ #### Error Responses
100
+
101
+ | Code | Type | Description |
102
+ | ---- | ---- | ----------- |
103
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
104
+ | 401 | [Error](_schemas.md#error) | Unauthorized error if authentication fails |