polar_accesslink 1.0.2 → 1.0.3

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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -5
  3. data/README.md +20 -65
  4. data/Rakefile +0 -2
  5. data/docs/DailyActivityApi.md +96 -123
  6. data/docs/ExercisesApi.md +35 -55
  7. data/docs/NightlyRechargeApi.md +96 -0
  8. data/docs/PhysicalInfoApi.md +60 -79
  9. data/docs/PullNotificationsApi.md +11 -20
  10. data/docs/SleepApi.md +137 -0
  11. data/docs/TrainingDataApi.md +175 -213
  12. data/docs/UsersApi.md +33 -56
  13. data/docs/WebhooksApi.md +43 -80
  14. data/git_push.sh +55 -0
  15. data/lib/polar_accesslink.rb +5 -36
  16. data/lib/polar_accesslink/api/daily_activity_api.rb +101 -201
  17. data/lib/polar_accesslink/api/exercises_api.rb +43 -81
  18. data/lib/polar_accesslink/api/nightly_recharge_api.rb +115 -0
  19. data/lib/polar_accesslink/api/physical_info_api.rb +65 -114
  20. data/lib/polar_accesslink/api/pull_notifications_api.rb +15 -27
  21. data/lib/polar_accesslink/api/sleep_api.rb +158 -0
  22. data/lib/polar_accesslink/api/training_data_api.rb +178 -332
  23. data/lib/polar_accesslink/api/users_api.rb +42 -96
  24. data/lib/polar_accesslink/api/webhooks_api.rb +59 -126
  25. data/lib/polar_accesslink/api_client.rb +45 -41
  26. data/lib/polar_accesslink/api_error.rb +3 -22
  27. data/lib/polar_accesslink/configuration.rb +9 -62
  28. data/lib/polar_accesslink/version.rb +3 -3
  29. data/polar_accesslink.gemspec +2 -1
  30. data/spec/api/daily_activity_api_spec.rb +11 -11
  31. data/spec/api/exercises_api_spec.rb +9 -9
  32. data/spec/api/nightly_recharge_api_spec.rb +58 -0
  33. data/spec/api/physical_info_api_spec.rb +9 -9
  34. data/spec/api/pull_notifications_api_spec.rb +7 -7
  35. data/spec/api/sleep_api_spec.rb +69 -0
  36. data/spec/api/training_data_api_spec.rb +16 -15
  37. data/spec/api/users_api_spec.rb +8 -9
  38. data/spec/api/webhooks_api_spec.rb +11 -13
  39. data/spec/api_client_spec.rb +21 -4
  40. data/spec/configuration_spec.rb +6 -6
  41. data/spec/spec_helper.rb +3 -3
  42. metadata +36 -145
  43. data/docs/Activity.md +0 -33
  44. data/docs/ActivityLog.md +0 -17
  45. data/docs/ActivityStepSample.md +0 -19
  46. data/docs/ActivityStepSamples.md +0 -19
  47. data/docs/ActivityZoneSample.md +0 -19
  48. data/docs/ActivityZoneSamples.md +0 -19
  49. data/docs/AvailableUserData.md +0 -21
  50. data/docs/AvailableUserDatas.md +0 -17
  51. data/docs/CreatedWebhook.md +0 -17
  52. data/docs/CreatedWebhookData.md +0 -23
  53. data/docs/DurationZone.md +0 -19
  54. data/docs/Error.md +0 -25
  55. data/docs/Exercise.md +0 -47
  56. data/docs/ExerciseHashId.md +0 -45
  57. data/docs/Exercises.md +0 -17
  58. data/docs/HeartRate.md +0 -19
  59. data/docs/PhysicalInformation.md +0 -39
  60. data/docs/PhysicalInformations.md +0 -17
  61. data/docs/Register.md +0 -17
  62. data/docs/Sample.md +0 -21
  63. data/docs/Samples.md +0 -17
  64. data/docs/TransactionLocation.md +0 -19
  65. data/docs/User.md +0 -35
  66. data/docs/UserExtraInfo.md +0 -21
  67. data/docs/WebhookInfo.md +0 -17
  68. data/docs/WebhookInfoData.md +0 -21
  69. data/docs/WebhookPatch.md +0 -19
  70. data/docs/WebhookPayload.md +0 -25
  71. data/docs/WebhookPing.md +0 -19
  72. data/docs/WebhookRequest.md +0 -19
  73. data/docs/WebhookType.md +0 -16
  74. data/docs/Zone.md +0 -23
  75. data/docs/Zones.md +0 -17
  76. data/lib/polar_accesslink/models/activity.rb +0 -288
  77. data/lib/polar_accesslink/models/activity_log.rb +0 -210
  78. data/lib/polar_accesslink/models/activity_step_sample.rb +0 -218
  79. data/lib/polar_accesslink/models/activity_step_samples.rb +0 -220
  80. data/lib/polar_accesslink/models/activity_zone_sample.rb +0 -220
  81. data/lib/polar_accesslink/models/activity_zone_samples.rb +0 -220
  82. data/lib/polar_accesslink/models/available_user_data.rb +0 -262
  83. data/lib/polar_accesslink/models/available_user_datas.rb +0 -210
  84. data/lib/polar_accesslink/models/created_webhook.rb +0 -206
  85. data/lib/polar_accesslink/models/created_webhook_data.rb +0 -236
  86. data/lib/polar_accesslink/models/duration_zone.rb +0 -218
  87. data/lib/polar_accesslink/models/error.rb +0 -248
  88. data/lib/polar_accesslink/models/exercise.rb +0 -357
  89. data/lib/polar_accesslink/models/exercise_hash_id.rb +0 -347
  90. data/lib/polar_accesslink/models/exercises.rb +0 -210
  91. data/lib/polar_accesslink/models/heart_rate.rb +0 -218
  92. data/lib/polar_accesslink/models/physical_information.rb +0 -352
  93. data/lib/polar_accesslink/models/physical_informations.rb +0 -210
  94. data/lib/polar_accesslink/models/register.rb +0 -213
  95. data/lib/polar_accesslink/models/sample.rb +0 -228
  96. data/lib/polar_accesslink/models/samples.rb +0 -210
  97. data/lib/polar_accesslink/models/transaction_location.rb +0 -218
  98. data/lib/polar_accesslink/models/user.rb +0 -334
  99. data/lib/polar_accesslink/models/user_extra_info.rb +0 -228
  100. data/lib/polar_accesslink/models/webhook_info.rb +0 -206
  101. data/lib/polar_accesslink/models/webhook_info_data.rb +0 -226
  102. data/lib/polar_accesslink/models/webhook_patch.rb +0 -219
  103. data/lib/polar_accesslink/models/webhook_payload.rb +0 -246
  104. data/lib/polar_accesslink/models/webhook_ping.rb +0 -252
  105. data/lib/polar_accesslink/models/webhook_request.rb +0 -229
  106. data/lib/polar_accesslink/models/webhook_type.rb +0 -37
  107. data/lib/polar_accesslink/models/zone.rb +0 -238
  108. data/lib/polar_accesslink/models/zones.rb +0 -210
  109. data/spec/models/activity_log_spec.rb +0 -41
  110. data/spec/models/activity_spec.rb +0 -89
  111. data/spec/models/activity_step_sample_spec.rb +0 -47
  112. data/spec/models/activity_step_samples_spec.rb +0 -47
  113. data/spec/models/activity_zone_sample_spec.rb +0 -47
  114. data/spec/models/activity_zone_samples_spec.rb +0 -47
  115. data/spec/models/available_user_data_spec.rb +0 -57
  116. data/spec/models/available_user_datas_spec.rb +0 -41
  117. data/spec/models/created_webhook_data_spec.rb +0 -59
  118. data/spec/models/created_webhook_spec.rb +0 -41
  119. data/spec/models/duration_zone_spec.rb +0 -47
  120. data/spec/models/error_spec.rb +0 -65
  121. data/spec/models/exercise_hash_id_spec.rb +0 -125
  122. data/spec/models/exercise_spec.rb +0 -131
  123. data/spec/models/exercises_spec.rb +0 -41
  124. data/spec/models/heart_rate_spec.rb +0 -47
  125. data/spec/models/physical_information_spec.rb +0 -111
  126. data/spec/models/physical_informations_spec.rb +0 -41
  127. data/spec/models/register_spec.rb +0 -41
  128. data/spec/models/sample_spec.rb +0 -53
  129. data/spec/models/samples_spec.rb +0 -41
  130. data/spec/models/transaction_location_spec.rb +0 -47
  131. data/spec/models/user_extra_info_spec.rb +0 -53
  132. data/spec/models/user_spec.rb +0 -99
  133. data/spec/models/webhook_info_data_spec.rb +0 -53
  134. data/spec/models/webhook_info_spec.rb +0 -41
  135. data/spec/models/webhook_patch_spec.rb +0 -47
  136. data/spec/models/webhook_payload_spec.rb +0 -65
  137. data/spec/models/webhook_ping_spec.rb +0 -51
  138. data/spec/models/webhook_request_spec.rb +0 -47
  139. data/spec/models/webhook_type_spec.rb +0 -35
  140. data/spec/models/zone_spec.rb +0 -59
  141. data/spec/models/zones_spec.rb +0 -41
@@ -1,6 +1,6 @@
1
1
  # PolarAccesslink::UsersApi
2
2
 
3
- All URIs are relative to *https://www.polaraccesslink.com*
3
+ All URIs are relative to *https://localhost*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
@@ -9,9 +9,7 @@ Method | HTTP request | Description
9
9
  [**register_user**](UsersApi.md#register_user) | **POST** /v3/users | Register user
10
10
 
11
11
 
12
-
13
- ## delete_user
14
-
12
+ # **delete_user**
15
13
  > delete_user(user_id)
16
14
 
17
15
  Delete user
@@ -19,18 +17,14 @@ Delete user
19
17
  When partner wishes no longer to receive user data, user can be de-registered.This will revoke the access token authorized by user.
20
18
 
21
19
  ### Example
22
-
23
20
  ```ruby
24
21
  # load the gem
25
- require 'openapi_client'
26
- # setup authorization
27
- PolarAccesslink.configure do |config|
28
- # Configure OAuth2 access token for authorization: OAuth2
29
- config.access_token = 'YOUR ACCESS TOKEN'
30
- end
22
+ require 'polar_accesslink'
31
23
 
32
24
  api_instance = PolarAccesslink::UsersApi.new
33
- user_id = 56 # Integer | User identifier
25
+
26
+ user_id = nil # Object | User identifier
27
+
34
28
 
35
29
  begin
36
30
  #Delete user
@@ -42,10 +36,9 @@ end
42
36
 
43
37
  ### Parameters
44
38
 
45
-
46
39
  Name | Type | Description | Notes
47
40
  ------------- | ------------- | ------------- | -------------
48
- **user_id** | **Integer**| User identifier |
41
+ **user_id** | [**Object**](.md)| User identifier |
49
42
 
50
43
  ### Return type
51
44
 
@@ -53,40 +46,35 @@ nil (empty response body)
53
46
 
54
47
  ### Authorization
55
48
 
56
- [OAuth2](../README.md#OAuth2)
49
+ No authorization required
57
50
 
58
51
  ### HTTP request headers
59
52
 
60
- - **Content-Type**: Not defined
61
- - **Accept**: Not defined
53
+ - **Content-Type**: Not defined
54
+ - **Accept**: Not defined
62
55
 
63
56
 
64
- ## get_user_information
65
57
 
66
- > User get_user_information(user_id)
58
+ # **get_user_information**
59
+ > get_user_information(user_id)
67
60
 
68
61
  Get user information
69
62
 
70
63
  List user basic information. Note: Although it is possible to get users weight and height from this resource, the [get physical info](#get-physical-info) should be used instead.
71
64
 
72
65
  ### Example
73
-
74
66
  ```ruby
75
67
  # load the gem
76
- require 'openapi_client'
77
- # setup authorization
78
- PolarAccesslink.configure do |config|
79
- # Configure OAuth2 access token for authorization: OAuth2
80
- config.access_token = 'YOUR ACCESS TOKEN'
81
- end
68
+ require 'polar_accesslink'
82
69
 
83
70
  api_instance = PolarAccesslink::UsersApi.new
84
- user_id = 475 # Integer | User identifier
71
+
72
+ user_id = nil # Object | User identifier
73
+
85
74
 
86
75
  begin
87
76
  #Get user information
88
- result = api_instance.get_user_information(user_id)
89
- p result
77
+ api_instance.get_user_information(user_id)
90
78
  rescue PolarAccesslink::ApiError => e
91
79
  puts "Exception when calling UsersApi->get_user_information: #{e}"
92
80
  end
@@ -94,73 +82,62 @@ end
94
82
 
95
83
  ### Parameters
96
84
 
97
-
98
85
  Name | Type | Description | Notes
99
86
  ------------- | ------------- | ------------- | -------------
100
- **user_id** | **Integer**| User identifier |
87
+ **user_id** | [**Object**](.md)| User identifier |
101
88
 
102
89
  ### Return type
103
90
 
104
- [**User**](User.md)
91
+ nil (empty response body)
105
92
 
106
93
  ### Authorization
107
94
 
108
- [OAuth2](../README.md#OAuth2)
95
+ No authorization required
109
96
 
110
97
  ### HTTP request headers
111
98
 
112
- - **Content-Type**: Not defined
113
- - **Accept**: application/json, application/xml
99
+ - **Content-Type**: Not defined
100
+ - **Accept**: Not defined
114
101
 
115
102
 
116
- ## register_user
117
103
 
118
- > User register_user(register)
104
+ # **register_user**
105
+ > register_user
119
106
 
120
107
  Register user
121
108
 
122
109
  Once partner has been authorized by user, partner must register user before being able to access her data.
123
110
 
124
111
  ### Example
125
-
126
112
  ```ruby
127
113
  # load the gem
128
- require 'openapi_client'
129
- # setup authorization
130
- PolarAccesslink.configure do |config|
131
- # Configure OAuth2 access token for authorization: OAuth2
132
- config.access_token = 'YOUR ACCESS TOKEN'
133
- end
114
+ require 'polar_accesslink'
134
115
 
135
116
  api_instance = PolarAccesslink::UsersApi.new
136
- register = PolarAccesslink::Register.new # Register |
137
117
 
138
118
  begin
139
119
  #Register user
140
- result = api_instance.register_user(register)
141
- p result
120
+ api_instance.register_user
142
121
  rescue PolarAccesslink::ApiError => e
143
122
  puts "Exception when calling UsersApi->register_user: #{e}"
144
123
  end
145
124
  ```
146
125
 
147
126
  ### Parameters
148
-
149
-
150
- Name | Type | Description | Notes
151
- ------------- | ------------- | ------------- | -------------
152
- **register** | [**Register**](Register.md)| |
127
+ This endpoint does not need any parameter.
153
128
 
154
129
  ### Return type
155
130
 
156
- [**User**](User.md)
131
+ nil (empty response body)
157
132
 
158
133
  ### Authorization
159
134
 
160
- [OAuth2](../README.md#OAuth2)
135
+ No authorization required
161
136
 
162
137
  ### HTTP request headers
163
138
 
164
- - **Content-Type**: application/xml, application/json
165
- - **Accept**: application/json, application/xml
139
+ - **Content-Type**: Not defined
140
+ - **Accept**: Not defined
141
+
142
+
166
143
 
@@ -1,6 +1,6 @@
1
1
  # PolarAccesslink::WebhooksApi
2
2
 
3
- All URIs are relative to *https://www.polaraccesslink.com*
3
+ All URIs are relative to *https://localhost*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
@@ -10,62 +10,47 @@ Method | HTTP request | Description
10
10
  [**update_webhook**](WebhooksApi.md#update_webhook) | **PATCH** /v3/webhooks/{webhook-id} | Update webhook
11
11
 
12
12
 
13
-
14
- ## create_webhook
15
-
16
- > CreatedWebhook create_webhook(webhook_request)
13
+ # **create_webhook**
14
+ > create_webhook
17
15
 
18
16
  Create webhook
19
17
 
20
- Create new webhook. When creating webhook the Accesslink sends a ping message to the url in request body. The ping message must be answered with 200 OK or otherwise the webhook is not created. **Note!** Save the *signature_secret_key* from response since this is the only chance to get it.
18
+ Create new webhook. When creating webhook the Accesslink sends a ping message to the url in request body. The ping message must be answered with 200 OK or otherwise the webhook is not created. **Note!** Save the *signature_secret_key* from response since this is the only chance to get it. **Please also note** that currently there is an issue with SLEEP event delivery. You can still subscribe to them but you will not receive SLEEP events through the webhook at the moment. We are working on fixing the issue and you will start to receive SLEEP events eventually.
21
19
 
22
20
  ### Example
23
-
24
21
  ```ruby
25
22
  # load the gem
26
- require 'openapi_client'
27
- # setup authorization
28
- PolarAccesslink.configure do |config|
29
- # Configure HTTP basic authorization: Basic
30
- config.username = 'YOUR USERNAME'
31
- config.password = 'YOUR PASSWORD'
32
- end
23
+ require 'polar_accesslink'
33
24
 
34
25
  api_instance = PolarAccesslink::WebhooksApi.new
35
- webhook_request = PolarAccesslink::WebhookRequest.new # WebhookRequest | Webhook to create.
36
26
 
37
27
  begin
38
28
  #Create webhook
39
- result = api_instance.create_webhook(webhook_request)
40
- p result
29
+ api_instance.create_webhook
41
30
  rescue PolarAccesslink::ApiError => e
42
31
  puts "Exception when calling WebhooksApi->create_webhook: #{e}"
43
32
  end
44
33
  ```
45
34
 
46
35
  ### Parameters
47
-
48
-
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **webhook_request** | [**WebhookRequest**](WebhookRequest.md)| Webhook to create. |
36
+ This endpoint does not need any parameter.
52
37
 
53
38
  ### Return type
54
39
 
55
- [**CreatedWebhook**](CreatedWebhook.md)
40
+ nil (empty response body)
56
41
 
57
42
  ### Authorization
58
43
 
59
- [Basic](../README.md#Basic)
44
+ No authorization required
60
45
 
61
46
  ### HTTP request headers
62
47
 
63
- - **Content-Type**: application/json
64
- - **Accept**: application/json
48
+ - **Content-Type**: Not defined
49
+ - **Accept**: Not defined
65
50
 
66
51
 
67
- ## delete_webhook
68
52
 
53
+ # **delete_webhook**
69
54
  > delete_webhook(webhook_id)
70
55
 
71
56
  Delete webhook
@@ -73,19 +58,14 @@ Delete webhook
73
58
  Delete webhook by id.
74
59
 
75
60
  ### Example
76
-
77
61
  ```ruby
78
62
  # load the gem
79
- require 'openapi_client'
80
- # setup authorization
81
- PolarAccesslink.configure do |config|
82
- # Configure HTTP basic authorization: Basic
83
- config.username = 'YOUR USERNAME'
84
- config.password = 'YOUR PASSWORD'
85
- end
63
+ require 'polar_accesslink'
86
64
 
87
65
  api_instance = PolarAccesslink::WebhooksApi.new
88
- webhook_id = 56 # Integer | Webhook id to delete
66
+
67
+ webhook_id = nil # Object | Webhook id to delete
68
+
89
69
 
90
70
  begin
91
71
  #Delete webhook
@@ -97,10 +77,9 @@ end
97
77
 
98
78
  ### Parameters
99
79
 
100
-
101
80
  Name | Type | Description | Notes
102
81
  ------------- | ------------- | ------------- | -------------
103
- **webhook_id** | **Integer**| Webhook id to delete |
82
+ **webhook_id** | [**Object**](.md)| Webhook id to delete |
104
83
 
105
84
  ### Return type
106
85
 
@@ -108,91 +87,75 @@ nil (empty response body)
108
87
 
109
88
  ### Authorization
110
89
 
111
- [Basic](../README.md#Basic)
90
+ No authorization required
112
91
 
113
92
  ### HTTP request headers
114
93
 
115
- - **Content-Type**: Not defined
116
- - **Accept**: application/json
94
+ - **Content-Type**: Not defined
95
+ - **Accept**: Not defined
117
96
 
118
97
 
119
- ## get_webhook
120
98
 
121
- > WebhookInfo get_webhook
99
+ # **get_webhook**
100
+ > get_webhook
122
101
 
123
102
  Get webhook
124
103
 
125
104
  Returns created webhook if exists.
126
105
 
127
106
  ### Example
128
-
129
107
  ```ruby
130
108
  # load the gem
131
- require 'openapi_client'
132
- # setup authorization
133
- PolarAccesslink.configure do |config|
134
- # Configure HTTP basic authorization: Basic
135
- config.username = 'YOUR USERNAME'
136
- config.password = 'YOUR PASSWORD'
137
- end
109
+ require 'polar_accesslink'
138
110
 
139
111
  api_instance = PolarAccesslink::WebhooksApi.new
140
112
 
141
113
  begin
142
114
  #Get webhook
143
- result = api_instance.get_webhook
144
- p result
115
+ api_instance.get_webhook
145
116
  rescue PolarAccesslink::ApiError => e
146
117
  puts "Exception when calling WebhooksApi->get_webhook: #{e}"
147
118
  end
148
119
  ```
149
120
 
150
121
  ### Parameters
151
-
152
122
  This endpoint does not need any parameter.
153
123
 
154
124
  ### Return type
155
125
 
156
- [**WebhookInfo**](WebhookInfo.md)
126
+ nil (empty response body)
157
127
 
158
128
  ### Authorization
159
129
 
160
- [Basic](../README.md#Basic)
130
+ No authorization required
161
131
 
162
132
  ### HTTP request headers
163
133
 
164
- - **Content-Type**: Not defined
165
- - **Accept**: application/json
134
+ - **Content-Type**: Not defined
135
+ - **Accept**: Not defined
166
136
 
167
137
 
168
- ## update_webhook
169
138
 
170
- > WebhookInfo update_webhook(webhook_id, webhook_patch)
139
+ # **update_webhook**
140
+ > update_webhook(webhook_id)
171
141
 
172
142
  Update webhook
173
143
 
174
- Edit webhook event types and/or url. When updating webhook url the Accesslink sends a ping message to the new address. The ping message must be answered with 200 OK or otherwise the webhook is not updated.
144
+ Edit webhook event types and/or url. When updating webhook url the Accesslink sends a ping message to the new address. The ping message must be answered with 200 OK or otherwise the webhook is not updated. **Please note** that currently there is an issue with SLEEP event delivery. You can still subscribe to them but you will not receive SLEEP events through the webhook at the moment. We are working on fixing the issue and you will start to receive SLEEP events eventually.
175
145
 
176
146
  ### Example
177
-
178
147
  ```ruby
179
148
  # load the gem
180
- require 'openapi_client'
181
- # setup authorization
182
- PolarAccesslink.configure do |config|
183
- # Configure HTTP basic authorization: Basic
184
- config.username = 'YOUR USERNAME'
185
- config.password = 'YOUR PASSWORD'
186
- end
149
+ require 'polar_accesslink'
187
150
 
188
151
  api_instance = PolarAccesslink::WebhooksApi.new
189
- webhook_id = 56 # Integer | Webhook id to update
190
- webhook_patch = PolarAccesslink::WebhookPatch.new # WebhookPatch | New value(s) for events and/or url.
152
+
153
+ webhook_id = nil # Object | Webhook id to update
154
+
191
155
 
192
156
  begin
193
157
  #Update webhook
194
- result = api_instance.update_webhook(webhook_id, webhook_patch)
195
- p result
158
+ api_instance.update_webhook(webhook_id)
196
159
  rescue PolarAccesslink::ApiError => e
197
160
  puts "Exception when calling WebhooksApi->update_webhook: #{e}"
198
161
  end
@@ -200,22 +163,22 @@ end
200
163
 
201
164
  ### Parameters
202
165
 
203
-
204
166
  Name | Type | Description | Notes
205
167
  ------------- | ------------- | ------------- | -------------
206
- **webhook_id** | **Integer**| Webhook id to update |
207
- **webhook_patch** | [**WebhookPatch**](WebhookPatch.md)| New value(s) for events and/or url. |
168
+ **webhook_id** | [**Object**](.md)| Webhook id to update |
208
169
 
209
170
  ### Return type
210
171
 
211
- [**WebhookInfo**](WebhookInfo.md)
172
+ nil (empty response body)
212
173
 
213
174
  ### Authorization
214
175
 
215
- [Basic](../README.md#Basic)
176
+ No authorization required
216
177
 
217
178
  ### HTTP request headers
218
179
 
219
- - **Content-Type**: application/json
220
- - **Accept**: application/json
180
+ - **Content-Type**: Not defined
181
+ - **Accept**: Not defined
182
+
183
+
221
184
 
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id=""
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id=""
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note=""
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+