dialmycalls_client 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +186 -0
- data/dialmycalls_client-1.0.0.gem +0 -0
- data/dialmycalls_client.gemspec +55 -0
- data/docs/Accessaccount.md +12 -0
- data/docs/Account.md +9 -0
- data/docs/AccountsApi.md +324 -0
- data/docs/CallRecipient.md +19 -0
- data/docs/CallerIdsApi.md +386 -0
- data/docs/Callerid.md +13 -0
- data/docs/CallsApi.md +278 -0
- data/docs/Callservice.md +17 -0
- data/docs/Contact.md +18 -0
- data/docs/ContactAttributes.md +11 -0
- data/docs/ContactsApi.md +330 -0
- data/docs/CreateAccessAccountParameters.md +10 -0
- data/docs/CreateCallParameters.md +18 -0
- data/docs/CreateCallerIdParameters.md +9 -0
- data/docs/CreateContactParameters.md +14 -0
- data/docs/CreateGroupParameters.md +8 -0
- data/docs/CreateRecordingByPhoneParameters.md +12 -0
- data/docs/CreateRecordingByUrlParameters.md +9 -0
- data/docs/CreateRecordingParameters.md +11 -0
- data/docs/CreateTextParameters.md +17 -0
- data/docs/CreateUnverifiedCallerIdParameters.md +9 -0
- data/docs/DoNotContactsApi.md +62 -0
- data/docs/Donotcontact.md +12 -0
- data/docs/Group.md +12 -0
- data/docs/GroupsApi.md +277 -0
- data/docs/Identifier.md +8 -0
- data/docs/Incomingtext.md +13 -0
- data/docs/Keyword.md +12 -0
- data/docs/KeywordsApi.md +168 -0
- data/docs/Polling.md +10 -0
- data/docs/PushToListenAgain.md +9 -0
- data/docs/PushToOptOut.md +9 -0
- data/docs/PushToRecord.md +9 -0
- data/docs/PushToTalk.md +12 -0
- data/docs/Recording.md +15 -0
- data/docs/RecordingsApi.md +383 -0
- data/docs/Service.md +16 -0
- data/docs/Shortcode.md +11 -0
- data/docs/TextRecipient.md +13 -0
- data/docs/TextsApi.md +492 -0
- data/docs/UpdateAccessAccountByIdParameters.md +10 -0
- data/docs/UpdateCallerIdByIdParameters.md +8 -0
- data/docs/UpdateContactByIdParameters.md +14 -0
- data/docs/UpdateGroupByIdParameters.md +8 -0
- data/docs/UpdateRecordingByIdParameters.md +8 -0
- data/docs/UpdateVanityNumberByIdParameters.md +12 -0
- data/docs/VanityNumbersApi.md +224 -0
- data/docs/Vanitynumber.md +16 -0
- data/docs/VerifyCallerIdByIdParameters.md +8 -0
- data/git_push.sh +67 -0
- data/lib/dialmycalls_client/api/accounts_api.rb +375 -0
- data/lib/dialmycalls_client/api/caller_ids_api.rb +440 -0
- data/lib/dialmycalls_client/api/calls_api.rb +321 -0
- data/lib/dialmycalls_client/api/contacts_api.rb +379 -0
- data/lib/dialmycalls_client/api/do_not_contacts_api.rb +90 -0
- data/lib/dialmycalls_client/api/groups_api.rb +322 -0
- data/lib/dialmycalls_client/api/keywords_api.rb +204 -0
- data/lib/dialmycalls_client/api/recordings_api.rb +436 -0
- data/lib/dialmycalls_client/api/texts_api.rb +547 -0
- data/lib/dialmycalls_client/api/vanity_numbers_api.rb +265 -0
- data/lib/dialmycalls_client/api_client.rb +379 -0
- data/lib/dialmycalls_client/api_error.rb +47 -0
- data/lib/dialmycalls_client/configuration.rb +214 -0
- data/lib/dialmycalls_client/models/accessaccount.rb +240 -0
- data/lib/dialmycalls_client/models/account.rb +210 -0
- data/lib/dialmycalls_client/models/call_recipient.rb +310 -0
- data/lib/dialmycalls_client/models/callerid.rb +250 -0
- data/lib/dialmycalls_client/models/callservice.rb +290 -0
- data/lib/dialmycalls_client/models/contact.rb +300 -0
- data/lib/dialmycalls_client/models/contact_attributes.rb +230 -0
- data/lib/dialmycalls_client/models/create_access_account_parameters.rb +220 -0
- data/lib/dialmycalls_client/models/create_call_parameters.rb +304 -0
- data/lib/dialmycalls_client/models/create_caller_id_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/create_contact_parameters.rb +262 -0
- data/lib/dialmycalls_client/models/create_group_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/create_recording_by_phone_parameters.rb +240 -0
- data/lib/dialmycalls_client/models/create_recording_by_url_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/create_recording_parameters.rb +230 -0
- data/lib/dialmycalls_client/models/create_text_parameters.rb +294 -0
- data/lib/dialmycalls_client/models/create_unverified_caller_id_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/donotcontact.rb +240 -0
- data/lib/dialmycalls_client/models/group.rb +240 -0
- data/lib/dialmycalls_client/models/identifier.rb +200 -0
- data/lib/dialmycalls_client/models/incomingtext.rb +250 -0
- data/lib/dialmycalls_client/models/keyword.rb +240 -0
- data/lib/dialmycalls_client/models/polling.rb +220 -0
- data/lib/dialmycalls_client/models/push_to_listen_again.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_opt_out.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_record.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_talk.rb +240 -0
- data/lib/dialmycalls_client/models/recording.rb +270 -0
- data/lib/dialmycalls_client/models/service.rb +280 -0
- data/lib/dialmycalls_client/models/shortcode.rb +230 -0
- data/lib/dialmycalls_client/models/text_recipient.rb +250 -0
- data/lib/dialmycalls_client/models/update_access_account_by_id_parameters.rb +220 -0
- data/lib/dialmycalls_client/models/update_caller_id_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_contact_by_id_parameters.rb +262 -0
- data/lib/dialmycalls_client/models/update_group_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_recording_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_vanity_number_by_id_parameters.rb +242 -0
- data/lib/dialmycalls_client/models/vanitynumber.rb +280 -0
- data/lib/dialmycalls_client/models/verify_caller_id_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/version.rb +26 -0
- data/lib/dialmycalls_client.rb +99 -0
- data/spec/api/accounts_api_spec.rb +118 -0
- data/spec/api/caller_ids_api_spec.rb +132 -0
- data/spec/api/calls_api_spec.rb +107 -0
- data/spec/api/contacts_api_spec.rb +119 -0
- data/spec/api/do_not_contacts_api_spec.rb +58 -0
- data/spec/api/groups_api_spec.rb +107 -0
- data/spec/api/keywords_api_spec.rb +82 -0
- data/spec/api/recordings_api_spec.rb +131 -0
- data/spec/api/texts_api_spec.rb +155 -0
- data/spec/api/vanity_numbers_api_spec.rb +95 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/models/accessaccount_spec.rb +77 -0
- data/spec/models/account_spec.rb +59 -0
- data/spec/models/call_recipient_spec.rb +119 -0
- data/spec/models/callerid_spec.rb +83 -0
- data/spec/models/callservice_spec.rb +107 -0
- data/spec/models/contact_attributes_spec.rb +71 -0
- data/spec/models/contact_spec.rb +113 -0
- data/spec/models/create_access_account_parameters_spec.rb +65 -0
- data/spec/models/create_call_parameters_spec.rb +113 -0
- data/spec/models/create_caller_id_parameters_spec.rb +59 -0
- data/spec/models/create_contact_parameters_spec.rb +89 -0
- data/spec/models/create_group_parameters_spec.rb +53 -0
- data/spec/models/create_recording_by_phone_parameters_spec.rb +77 -0
- data/spec/models/create_recording_by_url_parameters_spec.rb +59 -0
- data/spec/models/create_recording_parameters_spec.rb +71 -0
- data/spec/models/create_text_parameters_spec.rb +107 -0
- data/spec/models/create_unverified_caller_id_parameters_spec.rb +59 -0
- data/spec/models/donotcontact_spec.rb +77 -0
- data/spec/models/group_spec.rb +77 -0
- data/spec/models/identifier_spec.rb +53 -0
- data/spec/models/incomingtext_spec.rb +83 -0
- data/spec/models/keyword_spec.rb +77 -0
- data/spec/models/polling_spec.rb +65 -0
- data/spec/models/push_to_listen_again_spec.rb +59 -0
- data/spec/models/push_to_opt_out_spec.rb +59 -0
- data/spec/models/push_to_record_spec.rb +59 -0
- data/spec/models/push_to_talk_spec.rb +77 -0
- data/spec/models/recording_spec.rb +95 -0
- data/spec/models/service_spec.rb +101 -0
- data/spec/models/shortcode_spec.rb +71 -0
- data/spec/models/text_recipient_spec.rb +83 -0
- data/spec/models/update_access_account_by_id_parameters_spec.rb +65 -0
- data/spec/models/update_caller_id_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_contact_by_id_parameters_spec.rb +89 -0
- data/spec/models/update_group_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_recording_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_vanity_number_by_id_parameters_spec.rb +77 -0
- data/spec/models/vanitynumber_spec.rb +101 -0
- data/spec/models/verify_caller_id_by_id_parameters_spec.rb +53 -0
- data/spec/spec_helper.rb +122 -0
- metadata +436 -0
@@ -0,0 +1,224 @@
|
|
1
|
+
# DialMyCalls::VanityNumbersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.dialmycalls.com/2.0*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**delete_vanity_number_by_id**](VanityNumbersApi.md#delete_vanity_number_by_id) | **DELETE** /vanitynumber/{VanityNumberId} | Delete Vanity Number
|
8
|
+
[**get_vanity_number_by_id**](VanityNumbersApi.md#get_vanity_number_by_id) | **GET** /vanitynumber/{VanityNumberId} | Get Vanity Number
|
9
|
+
[**get_vanity_numbers**](VanityNumbersApi.md#get_vanity_numbers) | **GET** /vanitynumbers | List Vanity Numbers
|
10
|
+
[**update_vanity_number_by_id**](VanityNumbersApi.md#update_vanity_number_by_id) | **PUT** /vanitynumber/{VanityNumberId} | Update Vanity Number
|
11
|
+
|
12
|
+
|
13
|
+
# **delete_vanity_number_by_id**
|
14
|
+
> Object delete_vanity_number_by_id(vanity_number_id)
|
15
|
+
|
16
|
+
Delete Vanity Number
|
17
|
+
|
18
|
+
Delete a vanity number. <br><br> Returns the following if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X DELETE https://$API_KEY@api.dialmycalls.com/2.0/keyword/$VANITYNUMBER_ID ```
|
19
|
+
|
20
|
+
### Example
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'dialmycalls_client'
|
24
|
+
# setup authorization
|
25
|
+
DialMyCalls.configure do |config|
|
26
|
+
# Configure API key authorization: api_key
|
27
|
+
config.api_key['X-Auth-ApiKey'] = 'YOUR API KEY'
|
28
|
+
end
|
29
|
+
|
30
|
+
api_instance = DialMyCalls::VanityNumbersApi.new
|
31
|
+
|
32
|
+
vanity_number_id = "vanity_number_id_example" # String | VanityNumberId
|
33
|
+
|
34
|
+
|
35
|
+
begin
|
36
|
+
#Delete Vanity Number
|
37
|
+
result = api_instance.delete_vanity_number_by_id(vanity_number_id)
|
38
|
+
p result
|
39
|
+
rescue DialMyCalls::ApiError => e
|
40
|
+
puts "Exception when calling VanityNumbersApi->delete_vanity_number_by_id: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
### Parameters
|
45
|
+
|
46
|
+
Name | Type | Description | Notes
|
47
|
+
------------- | ------------- | ------------- | -------------
|
48
|
+
**vanity_number_id** | **String**| VanityNumberId |
|
49
|
+
|
50
|
+
### Return type
|
51
|
+
|
52
|
+
**Object**
|
53
|
+
|
54
|
+
### Authorization
|
55
|
+
|
56
|
+
[api_key](../README.md#api_key)
|
57
|
+
|
58
|
+
### HTTP request headers
|
59
|
+
|
60
|
+
- **Content-Type**: application/json, application/xml
|
61
|
+
- **Accept**: application/json, application/xml
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
# **get_vanity_number_by_id**
|
66
|
+
> Object get_vanity_number_by_id(vanity_number_id)
|
67
|
+
|
68
|
+
Get Vanity Number
|
69
|
+
|
70
|
+
Retrieve a vanity number. <br><br> Returns a vanitynumber object if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/vanitynumber/$VANITYNUMBER_ID ```
|
71
|
+
|
72
|
+
### Example
|
73
|
+
```ruby
|
74
|
+
# load the gem
|
75
|
+
require 'dialmycalls_client'
|
76
|
+
# setup authorization
|
77
|
+
DialMyCalls.configure do |config|
|
78
|
+
# Configure API key authorization: api_key
|
79
|
+
config.api_key['X-Auth-ApiKey'] = 'YOUR API KEY'
|
80
|
+
end
|
81
|
+
|
82
|
+
api_instance = DialMyCalls::VanityNumbersApi.new
|
83
|
+
|
84
|
+
vanity_number_id = "vanity_number_id_example" # String | VanityNumberId
|
85
|
+
|
86
|
+
|
87
|
+
begin
|
88
|
+
#Get Vanity Number
|
89
|
+
result = api_instance.get_vanity_number_by_id(vanity_number_id)
|
90
|
+
p result
|
91
|
+
rescue DialMyCalls::ApiError => e
|
92
|
+
puts "Exception when calling VanityNumbersApi->get_vanity_number_by_id: #{e}"
|
93
|
+
end
|
94
|
+
```
|
95
|
+
|
96
|
+
### Parameters
|
97
|
+
|
98
|
+
Name | Type | Description | Notes
|
99
|
+
------------- | ------------- | ------------- | -------------
|
100
|
+
**vanity_number_id** | **String**| VanityNumberId |
|
101
|
+
|
102
|
+
### Return type
|
103
|
+
|
104
|
+
**Object**
|
105
|
+
|
106
|
+
### Authorization
|
107
|
+
|
108
|
+
[api_key](../README.md#api_key)
|
109
|
+
|
110
|
+
### HTTP request headers
|
111
|
+
|
112
|
+
- **Content-Type**: application/json, application/xml
|
113
|
+
- **Accept**: application/json, application/xml
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
# **get_vanity_numbers**
|
118
|
+
> Object get_vanity_numbers(opts)
|
119
|
+
|
120
|
+
List Vanity Numbers
|
121
|
+
|
122
|
+
Retrieve a list of vanity numbers. <br><br> Returns a list of vanitynumber objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/vanitynumbers ```
|
123
|
+
|
124
|
+
### Example
|
125
|
+
```ruby
|
126
|
+
# load the gem
|
127
|
+
require 'dialmycalls_client'
|
128
|
+
# setup authorization
|
129
|
+
DialMyCalls.configure do |config|
|
130
|
+
# Configure API key authorization: api_key
|
131
|
+
config.api_key['X-Auth-ApiKey'] = 'YOUR API KEY'
|
132
|
+
end
|
133
|
+
|
134
|
+
api_instance = DialMyCalls::VanityNumbersApi.new
|
135
|
+
|
136
|
+
opts = {
|
137
|
+
range: "range_example" # String | Range (ie \"records=201-300\") of vanitynumbers requested
|
138
|
+
}
|
139
|
+
|
140
|
+
begin
|
141
|
+
#List Vanity Numbers
|
142
|
+
result = api_instance.get_vanity_numbers(opts)
|
143
|
+
p result
|
144
|
+
rescue DialMyCalls::ApiError => e
|
145
|
+
puts "Exception when calling VanityNumbersApi->get_vanity_numbers: #{e}"
|
146
|
+
end
|
147
|
+
```
|
148
|
+
|
149
|
+
### Parameters
|
150
|
+
|
151
|
+
Name | Type | Description | Notes
|
152
|
+
------------- | ------------- | ------------- | -------------
|
153
|
+
**range** | **String**| Range (ie \"records=201-300\") of vanitynumbers requested | [optional]
|
154
|
+
|
155
|
+
### Return type
|
156
|
+
|
157
|
+
**Object**
|
158
|
+
|
159
|
+
### Authorization
|
160
|
+
|
161
|
+
[api_key](../README.md#api_key)
|
162
|
+
|
163
|
+
### HTTP request headers
|
164
|
+
|
165
|
+
- **Content-Type**: application/json, application/xml
|
166
|
+
- **Accept**: application/json, application/xml
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
# **update_vanity_number_by_id**
|
171
|
+
> Object update_vanity_number_by_id(update_vanity_number_by_id_parameters, vanity_number_id)
|
172
|
+
|
173
|
+
Update Vanity Number
|
174
|
+
|
175
|
+
Update a vanity number. <br><br> Returns a vanitynumber object if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X PUT -d \"{\\\"ptt_number_id\\\":\\\"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee\\\",\\\"call_options\\\":{\\\"voicemail\\\":true}}\" https://$API_KEY@api.dialmycalls.com/2.0/vanitynumber/$VANITYNUMBER_ID ```
|
176
|
+
|
177
|
+
### Example
|
178
|
+
```ruby
|
179
|
+
# load the gem
|
180
|
+
require 'dialmycalls_client'
|
181
|
+
# setup authorization
|
182
|
+
DialMyCalls.configure do |config|
|
183
|
+
# Configure API key authorization: api_key
|
184
|
+
config.api_key['X-Auth-ApiKey'] = 'YOUR API KEY'
|
185
|
+
end
|
186
|
+
|
187
|
+
api_instance = DialMyCalls::VanityNumbersApi.new
|
188
|
+
|
189
|
+
update_vanity_number_by_id_parameters = DialMyCalls::UpdateVanityNumberByIdParameters.new # UpdateVanityNumberByIdParameters | Request body
|
190
|
+
|
191
|
+
vanity_number_id = "vanity_number_id_example" # String | VanityNumberId
|
192
|
+
|
193
|
+
|
194
|
+
begin
|
195
|
+
#Update Vanity Number
|
196
|
+
result = api_instance.update_vanity_number_by_id(update_vanity_number_by_id_parameters, vanity_number_id)
|
197
|
+
p result
|
198
|
+
rescue DialMyCalls::ApiError => e
|
199
|
+
puts "Exception when calling VanityNumbersApi->update_vanity_number_by_id: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
### Parameters
|
204
|
+
|
205
|
+
Name | Type | Description | Notes
|
206
|
+
------------- | ------------- | ------------- | -------------
|
207
|
+
**update_vanity_number_by_id_parameters** | [**UpdateVanityNumberByIdParameters**](UpdateVanityNumberByIdParameters.md)| Request body |
|
208
|
+
**vanity_number_id** | **String**| VanityNumberId |
|
209
|
+
|
210
|
+
### Return type
|
211
|
+
|
212
|
+
**Object**
|
213
|
+
|
214
|
+
### Authorization
|
215
|
+
|
216
|
+
[api_key](../README.md#api_key)
|
217
|
+
|
218
|
+
### HTTP request headers
|
219
|
+
|
220
|
+
- **Content-Type**: application/json, application/xml
|
221
|
+
- **Accept**: application/json, application/xml
|
222
|
+
|
223
|
+
|
224
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# DialMyCalls::Vanitynumber
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | Unique identifier for this group. | [optional]
|
7
|
+
**phone** | **String** | The phone number. | [optional]
|
8
|
+
**status** | **String** | The status of the vanity number. Options: active, onhold, billingdecline, pendingdelete | [optional]
|
9
|
+
**minutes_used** | **Float** | The amount of minutes used since last billing. | [optional]
|
10
|
+
**minutes_allowed** | **Float** | The amount of minutes included with the vanity number before billed additionally. | [optional]
|
11
|
+
**voicemails_new** | **Integer** | The amount of voicemails that have not been downloaded. | [optional]
|
12
|
+
**voicemails_old** | **Integer** | The amount of voicemails that have been downloaded. | [optional]
|
13
|
+
**created_at** | **String** | When the keyword was created. | [optional]
|
14
|
+
**updated_at** | **String** | When the keyword was last updated. | [optional]
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# DialMyCalls::VerifyCallerIdByIdParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**pin** | **String** | (Required) Verification PIN number received from making add caller ID request. | [optional]
|
7
|
+
|
8
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
18
|
+
#
|
19
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
20
|
+
|
21
|
+
git_user_id=$1
|
22
|
+
git_repo_id=$2
|
23
|
+
release_note=$3
|
24
|
+
|
25
|
+
if [ "$git_user_id" = "" ]; then
|
26
|
+
git_user_id="dialmycalls"
|
27
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
28
|
+
fi
|
29
|
+
|
30
|
+
if [ "$git_repo_id" = "" ]; then
|
31
|
+
git_repo_id="ruby-sdk-v2"
|
32
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
33
|
+
fi
|
34
|
+
|
35
|
+
if [ "$release_note" = "" ]; then
|
36
|
+
release_note="Minor update"
|
37
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
38
|
+
fi
|
39
|
+
|
40
|
+
# Initialize the local directory as a Git repository
|
41
|
+
git init
|
42
|
+
|
43
|
+
# Adds the files in the local repository and stages them for commit.
|
44
|
+
git add .
|
45
|
+
|
46
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
47
|
+
git commit -m "$release_note"
|
48
|
+
|
49
|
+
# Sets the new remote
|
50
|
+
git_remote=`git remote`
|
51
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
52
|
+
|
53
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
54
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
55
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
56
|
+
else
|
57
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
58
|
+
fi
|
59
|
+
|
60
|
+
fi
|
61
|
+
|
62
|
+
git pull origin master
|
63
|
+
|
64
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
65
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
66
|
+
git push origin master 2>&1 | grep -v 'To https'
|
67
|
+
|