Class: Phrase::RepoSyncEventsApi
- Inherits:
-
Object
- Object
- Phrase::RepoSyncEventsApi
- Defined in:
- lib/phrase/api/repo_sync_events_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ RepoSyncEventsApi
constructor
A new instance of RepoSyncEventsApi.
-
#repo_sync_event_list(account_id, id, opts = {}) ⇒ Array<RepoSyncEvent>
Repository Syncs History Get the history of a single Repo Sync.
-
#repo_sync_event_list_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response<(Array<RepoSyncEvent>)>, Integer, Hash)>
Repository Syncs History Get the history of a single Repo Sync.
-
#repo_sync_event_show(account_id, repo_sync_id, id, opts = {}) ⇒ RepoSyncEvent
Get a single Repo Sync Event Shows a single Repo Sync event.
-
#repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {}) ⇒ Array<(Response<(RepoSyncEvent)>, Integer, Hash)>
Get a single Repo Sync Event Shows a single Repo Sync event.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RepoSyncEventsApi
Returns a new instance of RepoSyncEventsApi.
7 8 9 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#repo_sync_event_list(account_id, id, opts = {}) ⇒ Array<RepoSyncEvent>
Repository Syncs History Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
17 18 19 20 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 17 def repo_sync_event_list(account_id, id, opts = {}) data, _status_code, _headers = repo_sync_event_list_with_http_info(account_id, id, opts) data end |
#repo_sync_event_list_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response<(Array<RepoSyncEvent>)>, Integer, Hash)>
Repository Syncs History Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 29 def repo_sync_event_list_with_http_info(account_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepoSyncEventsApi.repo_sync_event_list ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncEventsApi.repo_sync_event_list" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncEventsApi.repo_sync_event_list" end # resource path local_var_path = '/accounts/{account_id}/repo_syncs/{id}/events'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<RepoSyncEvent>' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepoSyncEventsApi#repo_sync_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#repo_sync_event_show(account_id, repo_sync_id, id, opts = {}) ⇒ RepoSyncEvent
Get a single Repo Sync Event Shows a single Repo Sync event.
90 91 92 93 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 90 def repo_sync_event_show(account_id, repo_sync_id, id, opts = {}) data, _status_code, _headers = repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts) data end |
#repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {}) ⇒ Array<(Response<(RepoSyncEvent)>, Integer, Hash)>
Get a single Repo Sync Event Shows a single Repo Sync event.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/phrase/api/repo_sync_events_api.rb', line 103 def repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepoSyncEventsApi.repo_sync_event_show ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncEventsApi.repo_sync_event_show" end # verify the required parameter 'repo_sync_id' is set if @api_client.config.client_side_validation && repo_sync_id.nil? fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncEventsApi.repo_sync_event_show" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncEventsApi.repo_sync_event_show" end # resource path local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/events/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'RepoSyncEvent' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepoSyncEventsApi#repo_sync_event_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |