Module: Crowdin::ApiResources::TranslationStatus

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

Instance Method Summary collapse

Instance Method Details

#cancel_qa_checks_revalidation(revalidation_id, project_id = config.project_id) ⇒ Object

Parameters:

  • revalidation_id (String) —

    QA Checks Revalidation Identifier, consists of 36 characters



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

def cancel_qa_checks_revalidation(revalidation_id, project_id = config.project_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :delete,
    "#{config.target_api_url}/projects/#{project_id}/qa-checks/revalidate/#{revalidation_id}"
  )
  Web::SendRequest.new(request).perform
end

#get_branch_progress(branch_id = nil, query = {}, project_id = config.project_id) ⇒ Object

Parameters:

  • branch_id (Integer) (defaults to: nil) —

    Branch Identifier

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

    Request Query Parameters



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

def get_branch_progress(branch_id = nil, query = {}, project_id = config.project_id)
  branch_id  || raise_parameter_is_required_error(:branch_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/branches/#{branch_id}/languages/progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_directory_progress(directory_id = nil, query = {}, project_id = config.project_id) ⇒ Object

Parameters:

  • directory_id (Integer) (defaults to: nil) —

    Directory Identifier

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

    Request Query Parameters



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/crowdin-api/api_resources/translation_status.rb', line 27

def get_directory_progress(directory_id = nil, query = {}, project_id = config.project_id)
  directory_id || raise_parameter_is_required_error(:directory_id)
  project_id   || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/directories/#{directory_id}/languages/progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_file_progress(file_id = nil, query = {}, project_id = config.project_id) ⇒ Object

Parameters:

  • file_id (Integer) (defaults to: nil) —

    File Identifier

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

    Request Query Parameters



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/crowdin-api/api_resources/translation_status.rb', line 44

def get_file_progress(file_id = nil, query = {}, project_id = config.project_id)
  file_id    || raise_parameter_is_required_error(:file_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/files/#{file_id}/languages/progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_language_progress(language_id = nil, query = {}, project_id = config.project_id) ⇒ Object

Parameters:

  • language_id (String) (defaults to: nil) —

    Language Identifier

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

    Request Query Parameters



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/crowdin-api/api_resources/translation_status.rb', line 61

def get_language_progress(language_id = nil, query = {}, project_id = config.project_id)
  language_id || raise_parameter_is_required_error(:language_id)
  project_id  || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/languages/#{language_id}/progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_project_progress(query = {}, project_id = config.project_id) ⇒ Object

Parameters:

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

    Request Query Parameters



77
78
79
80
81
82
83
84
85
86
87
# File 'lib/crowdin-api/api_resources/translation_status.rb', line 77

def get_project_progress(query = {}, project_id = config.project_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/languages/progress",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#get_qa_progress(query = {}, project_id = config.project_id) ⇒ Object

Parameters:

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

    Request Query Parameters



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

def get_qa_progress(query = {}, project_id = config.project_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/qa-checks",
    { params: query }
  )
  Web::SendRequest.new(request).perform
end

#qa_checks_revalidation_status(revalidation_id, project_id = config.project_id) ⇒ Object

Parameters:

  • revalidation_id (String) —

    QA Checks Revalidation Identifier, consists of 36 characters



136
137
138
139
140
141
142
143
144
145
# File 'lib/crowdin-api/api_resources/translation_status.rb', line 136

def qa_checks_revalidation_status(revalidation_id, project_id = config.project_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :get,
    "#{config.target_api_url}/projects/#{project_id}/qa-checks/revalidate/#{revalidation_id}"
  )
  Web::SendRequest.new(request).perform
end

#revalidate_qa_checks(body = {}, project_id = config.project_id) ⇒ Object

Parameters:

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

    Request Body



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

def revalidate_qa_checks(body = {}, project_id = config.project_id)
  project_id || raise_project_id_is_required_error

  request = Web::Request.new(
    connection,
    :post,
    "#{config.target_api_url}/projects/#{project_id}/qa-checks/revalidate",
    { params: body }
  )
  Web::SendRequest.new(request).perform
end