Module: Crowdin::ApiResources::Integrations

Defined in:
lib/crowdin-api/api_resources/integrations.rb

Instance Method Summary collapse

Instance Method Details

#cancel_job(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



108
109
110
111
112
113
114
115
116
# File 'lib/crowdin-api/api_resources/integrations.rb', line 108

def cancel_job(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :delete,
    "#{config.target_api_url}/applications/#{application_identifier}/api/jobs",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_application_settings(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



148
149
150
151
152
153
154
155
156
# File 'lib/crowdin-api/api_resources/integrations.rb', line 148

def get_application_settings(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/settings",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_integration_file_progress(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



52
53
54
55
56
57
58
59
60
# File 'lib/crowdin-api/api_resources/integrations.rb', line 52

def get_integration_file_progress(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/file-progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_job_info(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



94
95
96
97
98
99
100
101
102
# File 'lib/crowdin-api/api_resources/integrations.rb', line 94

def get_job_info(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/job-info",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_sync_settings(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



176
177
178
179
180
181
182
183
184
# File 'lib/crowdin-api/api_resources/integrations.rb', line 176

def get_sync_settings(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/sync-settings",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#integration_login(application_identifier, body = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • body (Hash) (defaults to: {}) —

    Request Body



122
123
124
125
126
127
128
129
130
# File 'lib/crowdin-api/api_resources/integrations.rb', line 122

def (application_identifier, body = {})
  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/applications/#{application_identifier}/api/login",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end

#integration_login_form_fields(application_identifier) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application



135
136
137
138
139
140
141
142
# File 'lib/crowdin-api/api_resources/integrations.rb', line 135

def (application_identifier)
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/login-fields"
  )
  Web::SendRequest.new(request).perform
end

#list_crowdin_files(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



24
25
26
27
28
29
30
31
32
# File 'lib/crowdin-api/api_resources/integrations.rb', line 24

def list_crowdin_files(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/crowdin-files",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#list_integration_files(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



66
67
68
69
70
71
72
73
74
# File 'lib/crowdin-api/api_resources/integrations.rb', line 66

def list_integration_files(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/integration-files",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#list_jobs(application_identifier, query = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • query (Hash) (defaults to: {}) —

    Request Query Parameters



10
11
12
13
14
15
16
17
18
# File 'lib/crowdin-api/api_resources/integrations.rb', line 10

def list_jobs(application_identifier, query = {})
  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/applications/#{application_identifier}/api/all-jobs",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#update_application_settings(application_identifier, body = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • body (Hash) (defaults to: {}) —

    Request Body



162
163
164
165
166
167
168
169
170
# File 'lib/crowdin-api/api_resources/integrations.rb', line 162

def update_application_settings(application_identifier, body = {})
  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/applications/#{application_identifier}/api/settings",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end

#update_crowdin_files(application_identifier, body = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • body (Hash) (defaults to: {}) —

    Request Body



38
39
40
41
42
43
44
45
46
# File 'lib/crowdin-api/api_resources/integrations.rb', line 38

def update_crowdin_files(application_identifier, body = {})
  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/applications/#{application_identifier}/api/crowdin-update",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end

#update_integration_files(application_identifier, body = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • body (Hash) (defaults to: {}) —

    Request Body



80
81
82
83
84
85
86
87
88
# File 'lib/crowdin-api/api_resources/integrations.rb', line 80

def update_integration_files(application_identifier, body = {})
  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/applications/#{application_identifier}/api/integration-update",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end

#update_sync_settings(application_identifier, body = {}) ⇒ Object

Parameters:

  • application_identifier (String) —

    Identifier of the application

  • body (Hash) (defaults to: {}) —

    Request Body



190
191
192
193
194
195
196
197
198
# File 'lib/crowdin-api/api_resources/integrations.rb', line 190

def update_sync_settings(application_identifier, body = {})
  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/applications/#{application_identifier}/api/sync-settings",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end