| @@ 106-113 (lines=8) @@ | ||
| 103 | * |
|
| 104 | * @return \Joomla\Http\Response |
|
| 105 | */ |
|
| 106 | public function getCoordinators($project, $langCode) |
|
| 107 | { |
|
| 108 | // Build the request path. |
|
| 109 | $path = '/project/' . $project . '/language/' . $langCode . '/coordinators/'; |
|
| 110 | ||
| 111 | // Send the request. |
|
| 112 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Method to get information about a given language in a project. |
|
| @@ 123-130 (lines=8) @@ | ||
| 120 | * |
|
| 121 | * @return \Joomla\Http\Response |
|
| 122 | */ |
|
| 123 | public function getLanguage($project, $langCode) |
|
| 124 | { |
|
| 125 | // Build the request path. |
|
| 126 | $path = '/project/' . $project . '/language/' . $langCode . '/'; |
|
| 127 | ||
| 128 | // Send the request. |
|
| 129 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Method to get a list of languages for a specified project. |
|
| @@ 139-146 (lines=8) @@ | ||
| 136 | * |
|
| 137 | * @return \Joomla\Http\Response |
|
| 138 | */ |
|
| 139 | public function getLanguages($project) |
|
| 140 | { |
|
| 141 | // Build the request path. |
|
| 142 | $path = '/project/' . $project . '/languages/'; |
|
| 143 | ||
| 144 | // Send the request. |
|
| 145 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 146 | } |
|
| 147 | ||
| 148 | /** |
|
| 149 | * Method to get the reviewers for a language team in a project. |
|
| @@ 156-163 (lines=8) @@ | ||
| 153 | * |
|
| 154 | * @return \Joomla\Http\Response |
|
| 155 | */ |
|
| 156 | public function getReviewers($project, $langCode) |
|
| 157 | { |
|
| 158 | // Build the request path. |
|
| 159 | $path = '/project/' . $project . '/language/' . $langCode . '/reviewers/'; |
|
| 160 | ||
| 161 | // Send the request. |
|
| 162 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * Method to get the translators for a language team in a project. |
|
| @@ 173-180 (lines=8) @@ | ||
| 170 | * |
|
| 171 | * @return \Joomla\Http\Response |
|
| 172 | */ |
|
| 173 | public function getTranslators($project, $langCode) |
|
| 174 | { |
|
| 175 | // Build the request path. |
|
| 176 | $path = '/project/' . $project . '/language/' . $langCode . '/translators/'; |
|
| 177 | ||
| 178 | // Send the request. |
|
| 179 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 180 | } |
|
| 181 | ||
| 182 | /** |
|
| 183 | * Method to update the coordinators for a language team in a project. |
|
| @@ 142-153 (lines=12) @@ | ||
| 139 | * |
|
| 140 | * @return \Joomla\Http\Response |
|
| 141 | */ |
|
| 142 | public function getProject($project, $details = false) |
|
| 143 | { |
|
| 144 | // Build the request path. |
|
| 145 | $path = '/project/' . $project . '/'; |
|
| 146 | ||
| 147 | if ($details) { |
|
| 148 | $path .= '?details'; |
|
| 149 | } |
|
| 150 | ||
| 151 | // Send the request. |
|
| 152 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Method to get a list of projects the user is part of. |
|
| @@ 85-92 (lines=8) @@ | ||
| 82 | * |
|
| 83 | * @return \Joomla\Http\Response |
|
| 84 | */ |
|
| 85 | public function deleteResource($project, $resource) |
|
| 86 | { |
|
| 87 | // Build the request path. |
|
| 88 | $path = '/project/' . $project . '/resource/' . $resource; |
|
| 89 | ||
| 90 | // Send the request. |
|
| 91 | return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Method to get information about a resource within a project. |
|
| @@ 103-114 (lines=12) @@ | ||
| 100 | * |
|
| 101 | * @return \Joomla\Http\Response |
|
| 102 | */ |
|
| 103 | public function getResource($project, $resource, $details = false) |
|
| 104 | { |
|
| 105 | // Build the request path. |
|
| 106 | $path = '/project/' . $project . '/resource/' . $resource . '/'; |
|
| 107 | ||
| 108 | if ($details) { |
|
| 109 | $path .= '?details'; |
|
| 110 | } |
|
| 111 | ||
| 112 | // Send the request. |
|
| 113 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Method to get the content of a resource within a project. |
|
| @@ 124-131 (lines=8) @@ | ||
| 121 | * |
|
| 122 | * @return \Joomla\Http\Response |
|
| 123 | */ |
|
| 124 | public function getResourceContent($project, $resource) |
|
| 125 | { |
|
| 126 | // Build the request path. |
|
| 127 | $path = '/project/' . $project . '/resource/' . $resource . '/content/'; |
|
| 128 | ||
| 129 | // Send the request. |
|
| 130 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 131 | } |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Method to get information about a project's resources. |
|
| @@ 140-147 (lines=8) @@ | ||
| 137 | * |
|
| 138 | * @return \Joomla\Http\Response |
|
| 139 | */ |
|
| 140 | public function getResources($project) |
|
| 141 | { |
|
| 142 | // Build the request path. |
|
| 143 | $path = '/project/' . $project . '/resources'; |
|
| 144 | ||
| 145 | // Send the request. |
|
| 146 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * Method to update the content of a resource within a project. |
|
| @@ 29-36 (lines=8) @@ | ||
| 26 | * |
|
| 27 | * @return \Joomla\Http\Response |
|
| 28 | */ |
|
| 29 | public function getPseudolocalizationStrings($project, $resource) |
|
| 30 | { |
|
| 31 | // Build the request path |
|
| 32 | $path = '/project/' . $project . '/resource/' . $resource . '/pseudo/?pseudo_type=MIXED'; |
|
| 33 | ||
| 34 | // Send the request. |
|
| 35 | return $this->processResponse($this->client->get($this->fetchUrl($path))); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Method to get the translation strings on a specified resource. |
|