phrase 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -387
  3. data/docs/Account.md +2 -0
  4. data/docs/AccountDetails.md +3 -3
  5. data/docs/AccountsApi.md +4 -6
  6. data/docs/AuthorizationsApi.md +12 -16
  7. data/docs/BitbucketSyncApi.md +3 -6
  8. data/docs/BlacklistedKeysApi.md +14 -16
  9. data/docs/BranchesApi.md +14 -20
  10. data/docs/CommentsApi.md +15 -22
  11. data/docs/DistributionsApi.md +12 -16
  12. data/docs/Document.md +23 -0
  13. data/docs/DocumentsApi.md +137 -0
  14. data/docs/FormatsApi.md +1 -2
  15. data/docs/GitHubSyncApi.md +130 -0
  16. data/docs/GitLabSyncApi.md +9 -16
  17. data/docs/GithubSyncExportParameters.md +17 -0
  18. data/docs/GithubSyncImportParameters.md +17 -0
  19. data/docs/{GlossaryApi.md → GlossariesApi.md} +28 -32
  20. data/docs/GlossaryTermTranslationsApi.md +8 -10
  21. data/docs/GlossaryTermsApi.md +12 -16
  22. data/docs/InlineResponse422.md +19 -0
  23. data/docs/InlineResponse422Errors.md +21 -0
  24. data/docs/InvitationsApi.md +13 -18
  25. data/docs/Job.md +5 -1
  26. data/docs/JobCreateParameters.md +2 -0
  27. data/docs/JobDetails.md +4 -0
  28. data/docs/JobLocalesApi.md +14 -20
  29. data/docs/JobUpdateParameters.md +3 -1
  30. data/docs/JobsApi.md +89 -26
  31. data/docs/KeysApi.md +22 -30
  32. data/docs/KeysSearchParameters.md +1 -1
  33. data/docs/KeysTagParameters.md +1 -1
  34. data/docs/KeysUntagParameters.md +1 -1
  35. data/docs/LocalesApi.md +15 -20
  36. data/docs/MembersApi.md +6 -10
  37. data/docs/OrdersApi.md +12 -16
  38. data/docs/Project.md +2 -0
  39. data/docs/ProjectCreateParameters.md +3 -1
  40. data/docs/ProjectDetails.md +2 -2
  41. data/docs/ProjectsApi.md +12 -16
  42. data/docs/ReleasesApi.md +13 -18
  43. data/docs/ScreenshotMarkersApi.md +12 -16
  44. data/docs/ScreenshotsApi.md +12 -16
  45. data/docs/SpacesApi.md +17 -24
  46. data/docs/StyleGuidesApi.md +12 -16
  47. data/docs/TagsApi.md +11 -14
  48. data/docs/Team.md +29 -0
  49. data/docs/TeamCreateParameters.md +17 -0
  50. data/docs/TeamDetail.md +29 -0
  51. data/docs/TeamUpdateParameters.md +17 -0
  52. data/docs/TeamsApi.md +721 -0
  53. data/docs/TeamsProjectsCreateParameters.md +17 -0
  54. data/docs/TeamsSpacesCreateParameters.md +17 -0
  55. data/docs/TeamsUsersCreateParameters.md +17 -0
  56. data/docs/TranslationsApi.md +36 -52
  57. data/docs/TranslationsExcludeParameters.md +1 -1
  58. data/docs/TranslationsIncludeParameters.md +1 -1
  59. data/docs/TranslationsReviewParameters.md +1 -1
  60. data/docs/TranslationsSearchParameters.md +1 -1
  61. data/docs/TranslationsUnverifyParameters.md +1 -1
  62. data/docs/TranslationsVerifyParameters.md +1 -1
  63. data/docs/UploadCreateParameters.md +2 -2
  64. data/docs/UploadsApi.md +14 -12
  65. data/docs/UsersApi.md +1 -2
  66. data/docs/VersionsHistoryApi.md +4 -6
  67. data/docs/WebhooksApi.md +13 -18
  68. data/git_push.sh +2 -2
  69. data/lib/phrase.rb +16 -1
  70. data/lib/phrase/api/accounts_api.rb +2 -2
  71. data/lib/phrase/api/authorizations_api.rb +12 -10
  72. data/lib/phrase/api/bitbucket_sync_api.rb +3 -3
  73. data/lib/phrase/api/blacklisted_keys_api.rb +15 -10
  74. data/lib/phrase/api/branches_api.rb +18 -16
  75. data/lib/phrase/api/comments_api.rb +21 -19
  76. data/lib/phrase/api/distributions_api.rb +12 -10
  77. data/lib/phrase/api/documents_api.rb +152 -0
  78. data/lib/phrase/api/git_hub_sync_api.rb +146 -0
  79. data/lib/phrase/api/git_lab_sync_api.rb +5 -5
  80. data/lib/phrase/api/{glossary_api.rb → glossaries_api.rb} +33 -31
  81. data/lib/phrase/api/glossary_term_translations_api.rb +10 -8
  82. data/lib/phrase/api/glossary_terms_api.rb +12 -10
  83. data/lib/phrase/api/invitations_api.rb +12 -10
  84. data/lib/phrase/api/job_locales_api.rb +12 -10
  85. data/lib/phrase/api/jobs_api.rb +96 -13
  86. data/lib/phrase/api/keys_api.rb +18 -16
  87. data/lib/phrase/api/locales_api.rb +17 -15
  88. data/lib/phrase/api/members_api.rb +5 -5
  89. data/lib/phrase/api/orders_api.rb +12 -10
  90. data/lib/phrase/api/projects_api.rb +12 -10
  91. data/lib/phrase/api/releases_api.rb +12 -10
  92. data/lib/phrase/api/screenshot_markers_api.rb +12 -10
  93. data/lib/phrase/api/screenshots_api.rb +12 -10
  94. data/lib/phrase/api/spaces_api.rb +20 -18
  95. data/lib/phrase/api/style_guides_api.rb +12 -10
  96. data/lib/phrase/api/tags_api.rb +12 -10
  97. data/lib/phrase/api/teams_api.rb +840 -0
  98. data/lib/phrase/api/translations_api.rb +21 -19
  99. data/lib/phrase/api/uploads_api.rb +15 -7
  100. data/lib/phrase/api/versions_history_api.rb +2 -2
  101. data/lib/phrase/api/webhooks_api.rb +15 -13
  102. data/lib/phrase/api_client.rb +2 -2
  103. data/lib/phrase/models/account.rb +10 -1
  104. data/lib/phrase/models/account_details.rb +13 -13
  105. data/lib/phrase/models/document.rb +221 -0
  106. data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
  107. data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
  108. data/lib/phrase/models/inline_response422.rb +205 -0
  109. data/lib/phrase/models/inline_response422_errors.rb +212 -0
  110. data/lib/phrase/models/job.rb +22 -4
  111. data/lib/phrase/models/job_create_parameters.rb +11 -1
  112. data/lib/phrase/models/job_details.rb +19 -1
  113. data/lib/phrase/models/job_update_parameters.rb +14 -4
  114. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  115. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  116. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  117. data/lib/phrase/models/project.rb +10 -1
  118. data/lib/phrase/models/project_create_parameters.rb +14 -4
  119. data/lib/phrase/models/project_details.rb +10 -10
  120. data/lib/phrase/models/team.rb +254 -0
  121. data/lib/phrase/models/team_create_parameters.rb +195 -0
  122. data/lib/phrase/models/team_detail.rb +254 -0
  123. data/lib/phrase/models/team_update_parameters.rb +195 -0
  124. data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
  125. data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
  126. data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
  127. data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
  128. data/lib/phrase/models/translations_include_parameters.rb +1 -1
  129. data/lib/phrase/models/translations_review_parameters.rb +1 -1
  130. data/lib/phrase/models/translations_search_parameters.rb +1 -1
  131. data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
  132. data/lib/phrase/models/translations_verify_parameters.rb +1 -1
  133. data/lib/phrase/models/upload_create_parameters.rb +4 -8
  134. data/lib/phrase/version.rb +1 -1
  135. data/spec/api/accounts_api_spec.rb +1 -1
  136. data/spec/api/authorizations_api_spec.rb +2 -2
  137. data/spec/api/blacklisted_keys_api_spec.rb +3 -2
  138. data/spec/api/branches_api_spec.rb +2 -2
  139. data/spec/api/comments_api_spec.rb +2 -2
  140. data/spec/api/distributions_api_spec.rb +2 -2
  141. data/spec/api/documents_api_spec.rb +52 -0
  142. data/spec/api/git_hub_sync_api_spec.rb +49 -0
  143. data/spec/api/git_lab_sync_api_spec.rb +1 -1
  144. data/spec/api/{glossary_api_spec.rb → glossaries_api_spec.rb} +8 -8
  145. data/spec/api/glossary_term_translations_api_spec.rb +1 -1
  146. data/spec/api/glossary_terms_api_spec.rb +2 -2
  147. data/spec/api/invitations_api_spec.rb +2 -2
  148. data/spec/api/job_locales_api_spec.rb +2 -2
  149. data/spec/api/jobs_api_spec.rb +20 -2
  150. data/spec/api/keys_api_spec.rb +5 -5
  151. data/spec/api/locales_api_spec.rb +3 -3
  152. data/spec/api/members_api_spec.rb +1 -1
  153. data/spec/api/orders_api_spec.rb +2 -2
  154. data/spec/api/projects_api_spec.rb +2 -2
  155. data/spec/api/releases_api_spec.rb +2 -2
  156. data/spec/api/screenshot_markers_api_spec.rb +2 -2
  157. data/spec/api/screenshots_api_spec.rb +2 -2
  158. data/spec/api/spaces_api_spec.rb +3 -3
  159. data/spec/api/style_guides_api_spec.rb +2 -2
  160. data/spec/api/tags_api_spec.rb +2 -2
  161. data/spec/api/teams_api_spec.rb +185 -0
  162. data/spec/api/translations_api_spec.rb +8 -8
  163. data/spec/api/uploads_api_spec.rb +4 -2
  164. data/spec/api/versions_history_api_spec.rb +1 -1
  165. data/spec/api/webhooks_api_spec.rb +2 -2
  166. data/spec/models/account_details_spec.rb +4 -4
  167. data/spec/models/account_spec.rb +6 -0
  168. data/spec/models/document_spec.rb +47 -0
  169. data/spec/models/github_sync_export_parameters_spec.rb +29 -0
  170. data/spec/models/github_sync_import_parameters_spec.rb +29 -0
  171. data/spec/models/inline_response422_errors_spec.rb +41 -0
  172. data/spec/models/inline_response422_spec.rb +35 -0
  173. data/spec/models/job_create_parameters_spec.rb +6 -0
  174. data/spec/models/job_details_spec.rb +12 -0
  175. data/spec/models/job_spec.rb +12 -0
  176. data/spec/models/job_update_parameters_spec.rb +6 -0
  177. data/spec/models/project_create_parameters_spec.rb +6 -0
  178. data/spec/models/project_details_spec.rb +6 -6
  179. data/spec/models/project_spec.rb +6 -0
  180. data/spec/models/team_create_parameters_spec.rb +29 -0
  181. data/spec/models/team_detail_spec.rb +65 -0
  182. data/spec/models/team_spec.rb +65 -0
  183. data/spec/models/team_update_parameters_spec.rb +29 -0
  184. data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
  185. data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
  186. data/spec/models/teams_users_create_parameters_spec.rb +29 -0
  187. metadata +209 -149
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81b736c400bd14fa12c034c9edf4f092c79752e020a939fccf50fb644d170c59
4
- data.tar.gz: 812950a9669bd65446db81be50bee989f742711d828eb9867812c133ddb85a1a
3
+ metadata.gz: d0ae18c480bf9502c268edcfb90d6f1bfc61d3f5aef8ecf3f9b59df23dbb0372
4
+ data.tar.gz: ce97c2115637f6b9e076e113893da50b8b891ef8d852f2ab6dc0d36a030c13e3
5
5
  SHA512:
6
- metadata.gz: 6413b5c0db05a6187b54e74ee5860676e80e5c1180ac955c39643473de49679bbfbd13bc78810d5530d531f2b66531931e1292e7f8b2fdfb5dd554a01bc0bff2
7
- data.tar.gz: fc9573784f02330794d3fb352a7af346b200eaf9b8dff7140d0336f3659f07259de64fa438c203bbe3e415f5ea0ab510e6f238edb060d7e05bc9bc2fdbebb512
6
+ metadata.gz: 0f32d558533184bb7c9225046bf0b287a4a406c47dedcceb4d3afe274ca053ae25f8a71e14013346c2ead90d7502c2af831e59ccc879c6f47a61b3acd677b938
7
+ data.tar.gz: 84dfac536f2f7b27d4d7bce8b37686802c9cf5cdafde48c97eeb29391c721470e8d42fe627236c78e70a5222460e28666b801dc5c6532cbc5ca72b144850e24f
data/README.md CHANGED
@@ -4,383 +4,48 @@ Phrase - the Ruby gem for the Phrase API Reference
4
4
 
5
5
  Phrase is a translation management platform for software projects. You can collaborate on language file translation with your team or order translations through our platform. The API allows you to import locale files, download locale files, tag keys or interact in other ways with the localization data stored in Phrase for your account.
6
6
 
7
- ## API Endpoint
8
-
9
- ```
10
- https://api.phrase.com/v2/
11
- ```
12
-
13
- The API is only accessible via HTTPS, the base URL is <code>https://api.phrase.com/</code>, and the current version is <code>v2</code> which results in the base URL for all requests: <code>https://api.phrase.com/v2/</code>.
14
-
15
- ## Usage
16
-
17
- [curl](http://curl.haxx.se/) is used primarily to send requests to Phrase in the examples. On most you'll find a second variant using the [Phrase API v2 client](https://phrase.com/cli/) that might be more convenient to handle. For further information check its [documentation](https://help.phrase.com/help/phrase-in-your-terminal).
18
-
19
- ## Use of HTTP Verbs
20
-
21
- Phrase API v2 tries to use the appropriate HTTP verb for accessing each endpoint according to REST specification where possible:
22
-
23
- <div class=\"table-responsive\">
24
- <table class=\"basic-table\">
25
- <thead>
26
- <tr class=\"basic-table__row basic-table__row--header\">
27
- <th class=\"basic-table__cell basic-table__cell--header\">Verb</th>
28
- <th class=\"basic-table__cell basic-table__cell--header\">Description</th>
29
- </tr>
30
- </thead>
31
- <tbody>
32
- <tr>
33
- <td class=\"basic-table__cell\">GET</td>
34
- <td class=\"basic-table__cell\">Retrieve one or multiple resources</td>
35
- </tr>
36
- <tr>
37
- <td class=\"basic-table__cell\">POST</td>
38
- <td class=\"basic-table__cell\">Create a resource</td>
39
- </tr>
40
- <tr>
41
- <td class=\"basic-table__cell\">PUT</td>
42
- <td class=\"basic-table__cell\">Update a resource</td>
43
- </tr>
44
- <tr>
45
- <td class=\"basic-table__cell\">PATCH</td>
46
- <td class=\"basic-table__cell\">Update a resource (partially)</td>
47
- </tr>
48
- <tr>
49
- <td class=\"basic-table__cell\">DELETE</td>
50
- <td class=\"basic-table__cell\">Delete a resource</td>
51
- </tr>
52
- </tbody>
53
- </table>
54
- </div>
55
-
56
-
57
- ## Identification via User-Agent
58
-
59
- You must include the User-Agent header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary (e.g. to warn you about Rate-Limiting or badly formed requests). Examples of excellent User-Agent headers:
60
-
61
- ```
62
- User-Agent: Frederiks Mobile App (frederik@phrase.com)
63
- User-Agent: ACME Inc Python Client (http://example.com/contact)
64
- ```
65
-
66
- If you don't send this header, you will receive a response with 400 Bad Request.
67
-
68
-
69
- ## Lists
70
-
71
- When you request a list of resources, the API will typically only return an array of resources including their most important attributes. For a detailed representation of the resource you should request its detailed representation.
72
-
73
- Lists are usually [paginated](#pagination).
74
-
75
-
76
- ## Parameters
77
-
78
- Many endpoints support additional parameters, e.g. for pagination. When passing them in a GET request you can send them as HTTP query string parameters:
79
-
80
- ```
81
- $ curl -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects?page=2\"
82
- ```
83
-
84
- When performing a POST, PUT, PATCH or DELETE request, we recommend sending parameters that are not already included in the URL, as JSON body:
85
-
86
- ```
87
- $ curl -H 'Content-Type: application/json' -d '{\"name\":\"My new project\"}' -u EMAIL_OR_ACCESS_TOKEN https://api.phrase.com/v2/projects
88
- ```
89
-
90
- Encoding parameters as JSON means better support for types (boolean, integer) and usually better readability. Don't forget to set the correct Content-Type for your request.
91
-
92
- *The Content-Type header is omitted in some of the following examples for better readbility.*
93
-
94
-
95
- ## Errors
96
-
97
-
98
- ### Request Errors
99
-
100
- If a request contains invalid JSON or is missing a required parameter (besides resource attributes), the status `400 Bad Request` is returned:
101
-
102
- ```
103
- {
104
- \"message\": \"JSON could not be parsed\"
105
- }
106
- ```
107
-
108
-
109
- ### Validation Errors
110
-
111
- When the validation for a resource fails, the status `422 Unprocessable Entity` is returned, along with information on the affected fields:
112
-
113
- ```
114
- {
115
- \"message\": \"Validation Failed\",
116
- \"errors\": [
117
- {
118
- \"resource\": \"Project\",
119
- \"field\": \"name\",
120
- \"message\": \"can't be blank\"
121
- }
122
- ]
123
- }
124
- ```
125
-
126
-
127
- ## Date Format
128
-
129
- Times and dates are returned and expected in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) date format:
130
-
131
- ```
132
- YYYY-MM-DDTHH:MM:SSZ
133
- ```
134
-
135
- Instead of 'Z' for UTC time zone you can specify your time zone's locale offset using the following notation:
136
-
137
- ```
138
- YYYY-MM-DDTHH:MM:SS±hh:mm
139
- ```
140
-
141
- Example for CET (1 hour behind UTC):
142
-
143
- ```
144
- 2015-03-31T13:00+01:00
145
- ```
146
-
147
- Please note that in HTTP headers, we will use the appropriate recommended date formats instead of ISO 8601.
148
-
149
-
150
- ## Authentication
151
-
152
- <div class=\"alert alert-info\">For more detailed information on authentication, check out the <a href=\"#authentication\">API v2 Authentication Guide</a>.</div>
153
-
154
- There are two different ways to authenticate when performing API requests:
155
-
156
- * E-Mail and password
157
- * Oauth Access Token
158
-
159
-
160
- ### E-Mail and password
161
-
162
- To get started easily, you can use HTTP Basic authentication with your email and password:
163
-
164
- ```
165
- $ curl -u username:password \"https://api.phrase.com/v2/projects\"
166
- ```
167
-
168
-
169
- ### OAuth via Access Tokens
170
-
171
- You can create and manage access tokens in your [profile settings](https://app.phrase.com/settings/oauth_access_tokens) in Translation Center or via the [Authorizations API](#authorizations).
172
-
173
- Simply pass the access token as the username of your request:
174
-
175
- ```
176
- $ curl -u ACCESS_TOKEN: \"https://api.phrase.com/v2/projects\"
177
- ```
178
-
179
- or send the access token via the `Authorization` header field:
180
-
181
- ```
182
- $ curl -H \"Authorization: token ACCESS_TOKEN\" https://api.phrase.com/v2/projects
183
- ```
184
-
185
- For more detailed information on authentication, check out the <a href=\"#authentication\">API v2 Authentication Guide</a>.
186
-
187
- #### Send via parameter
188
-
189
- As JSONP (and other) requests cannot send HTTP Basic Auth credentials, a special query parameter `access_token` can be used:
190
-
191
- ```
192
- curl \"https://api.phrase.com/v2/projects?access_token=ACCESS_TOKEN\"
193
- ```
194
-
195
- You should only use this transport method if sending the authentication via header or Basic authentication is not possible.
196
-
197
- ### Two-Factor-Authentication
198
-
199
- Users with Two-Factor-Authentication enabled have to send a valid token along their request with certain authentication methods (such as Basic authentication). The necessity of a Two-Factor-Authentication token is indicated by the `X-PhraseApp-OTP: required; :MFA-type` header in the response. The `:MFA-type`field indicates the source of the token, e.g. `app` (refers to your Authenticator application):
200
-
201
- ```
202
- X-PhraseApp-OTP: required; app
203
- ```
204
-
205
- To provide a Two-Factor-Authentication token you can simply send it in the header of the request:
206
-
207
- ```
208
- curl -H \"X-PhraseApp-OTP: MFA-TOKEN\" -u EMAIL https://api.phrase.com/v2/projects
209
- ```
210
-
211
- Since Two-Factor-Authentication tokens usually expire quickly, we recommend using an alternative authentication method such as OAuth access tokens.
212
-
213
- ### Multiple Accounts
214
-
215
- Some endpoints require the account ID to be specified if the authenticated user is a member of multiple accounts. You can find the eight-digit account ID inside <a href=\"https://app.phrase.com/\" target=\"_blank\">Translation Center</a> by switching to the desired account and then visiting the account details page. If required, you can specify the account just like a normal parameter within the request.
216
-
217
- ## Pagination
218
-
219
- Endpoints that return a list or resources will usually return paginated results and include 25 items by default. To access further pages, use the `page` parameter:
220
-
221
- ```
222
- $ curl -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects?page=2\"
223
- ```
224
-
225
- Some endpoints also allow a custom page size by using the `per_page` parameter:
226
-
227
- ```
228
- $ curl -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects?page=2&per_page=50\"
229
- ```
230
-
231
- Unless specified otherwise in the description of the respective endpoint, `per_page` allows you to specify a page size up to 100 items.
232
-
7
+ ## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
233
8
 
234
- ## Link-Headers
9
+ - API version: 2.0.0
10
+ - Package version: 1.0.6
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+ For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
235
13
 
236
- We provide you with pagination URLs in the [Link Header field](http://tools.ietf.org/html/rfc5988). Make use of this information to avoid building pagination URLs yourself.
14
+ ## Installation
237
15
 
238
- ```
239
- Link: <https://api.phrase.com/v2/projects?page=1>; rel=\"first\", <https://api.phrase.com/v2/projects?page=3>; rel=\"prev\", <https://api.phrase.com/v2/projects?page=5>; rel=\"next\", <https://api.phrase.com/v2/projects?page=9>; rel=\"last\"
240
- ```
16
+ ### Install from [rubygems.org](https://rubygems.org/)
241
17
 
242
- Possible `rel` values are:
243
-
244
- <div class=\"table-responsive\">
245
- <table class=\"basic-table\">
246
- <thead>
247
- <tr class=\"basic-table__row basic-table__row--header\">
248
- <th class=\"basic-table__cell basic-table__cell--header\">Value</th>
249
- <th class=\"basic-table__cell basic-table__cell--header\">Description</th>
250
- </tr>
251
- </thead>
252
- <tbody>
253
- <tr>
254
- <td class=\"basic-table__cell\">next</td>
255
- <td class=\"basic-table__cell\">URL of the next page of results</td>
256
- </tr>
257
- <tr>
258
- <td class=\"basic-table__cell\">last</td>
259
- <td class=\"basic-table__cell\">URL of the last page of results</td>
260
- </tr>
261
- <tr>
262
- <td class=\"basic-table__cell\">first</td>
263
- <td class=\"basic-table__cell\">URL of the first page of results</td>
264
- </tr>
265
- <tr>
266
- <td class=\"basic-table__cell\">prev</td>
267
- <td class=\"basic-table__cell\">URL of the previous page of results</td>
268
- </tr>
269
- </tbody>
270
- </table>
271
- </div>
272
-
273
- ## Rate Limiting
274
-
275
- All API endpoints are subject to rate limiting to ensure good performance for all customers. The rate limit is calculated per user:
276
-
277
- * 1000 requests per 5 minutes
278
- * 4 concurrent (parallel) requests
279
-
280
- For your convenience we send information on the current rate limit within the response headers:
281
-
282
- <div class=\"table-responsive\">
283
- <table class=\"basic-table\">
284
- <thead>
285
- <tr class=\"basic-table__row basic-table__row--header\">
286
- <th class=\"basic-table__cell basic-table__cell--header\">Header</th>
287
- <th class=\"basic-table__cell basic-table__cell--header\">Description</th>
288
- </tr>
289
- </thead>
290
- <tbody>
291
- <tr>
292
- <td class=\"basic-table__cell\" style=\"white-space: nowrap;\"><code>X-Rate-Limit-Limit</code></td>
293
- <td class=\"basic-table__cell\">Number of max requests allowed in the current time period</td>
294
- </tr>
295
- <tr>
296
- <td class=\"basic-table__cell\" style=\"white-space: nowrap;\"><code>X-Rate-Limit-Remaining</code></td>
297
- <td class=\"basic-table__cell\">Number of remaining requests in the current time period</td>
298
- </tr>
299
- <tr>
300
- <td class=\"basic-table__cell\" style=\"white-space: nowrap;\"><code>X-Rate-Limit-Reset</code></td>
301
- <td class=\"basic-table__cell\">Timestamp of end of current time period as UNIX timestamp</td>
302
- </tr>
303
- </tbody>
304
- </table>
305
- </div>
306
-
307
- If you should run into the rate limit, you will receive the HTTP status code `429: Too many requests`.
308
-
309
- If you should need higher rate limits, [contact us](https://phrase.com/contact).
310
-
311
-
312
- ## Conditional GET requests / HTTP Caching
313
-
314
- <div class=\"alert alert-info\"><p><strong>Note:</strong> Conditional GET requests are currently only supported for <a href=\"#locales_download\">locales#download</a> and <a href=\"#translations_index\">translations#index</a></p></div>
315
-
316
- We will return an ETag or Last-Modified header with most GET requests. When you request a resource we recommend to store this value and submit them on subsequent requests as `If-Modified-Since` and `If-None-Match` headers. If the resource has not changed in the meantime, we will return the status `304 Not Modified` instead of rendering and returning the resource again. In most cases this is less time-consuming and makes your application/integration faster.
317
-
318
- Please note that all conditional requests that return a response with status 304 don't count against your rate limits.
18
+ Install from the command line:
319
19
 
320
- ```
321
- $ curl -i -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download\"
322
- HTTP/1.1 200 OK
323
- ETag: \"abcd1234abcdefefabcd1234efab1234\"
324
- Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC
325
- Status: 200 OK
326
-
327
- $ curl -i -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download\" -H 'If-None-Match: \"abcd1234abcdefefabcd1234efab1234\"'
328
- HTTP/1.1 304 Not Modified
329
- ETag: \"abcd1234abcdefefabcd1234efab1234\"
330
- Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC
331
- Status: 304 Not Modified
332
-
333
- $ curl -i -u EMAIL_OR_ACCESS_TOKEN \"https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download\" -H \"If-Modified-Since: Wed, 28 Jan 2015 15:31:30 UTC\"
334
- HTTP/1.1 304 Not Modified
335
- Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC
336
- Status: 304 Not Modified
20
+ ```shell
21
+ $ gem install phrase
337
22
  ```
338
23
 
24
+ Install via Gemfile:
339
25
 
340
- ## JSONP
26
+ gem "phrase"
341
27
 
342
- The Phrase API supports [JSONP](http://en.wikipedia.org/wiki/JSONP) for all GET requests in order to deal with cross-domain request issues. Just send a `?callback` parameter along with the request to specify the Javascript function name to be called with the response content:
28
+ ### Install from GitHub Packages
343
29
 
344
- ```
345
- $ curl \"https://api.phrase.com/v2/projects?callback=myFunction\"
346
- ```
347
-
348
- The response will include the normal output for that endpoint, along with a `meta` section including header data:
30
+ Install from the command line:
349
31
 
350
- ```
351
- myFunction({
352
- {
353
- \"meta\": {
354
- \"status\": 200,
355
- ...
356
- },
357
- \"data\": [
358
- {
359
- \"id\": \"1234abcd1234abc1234abcd1234abc\"
360
- ...
361
- }
362
- ]
363
- }
364
- });
32
+ ```shell
33
+ $ gem install phrase-ruby --source "https://rubygems.pkg.github.com/phrase"
365
34
  ```
366
35
 
367
- To authenticate a JSONP request, you can send a valid [access token](#authentication) as the `?access_token` parameter along the request:
36
+ Install via Gemfile:
368
37
 
369
- ```
370
- $ curl \"https://api.phrase.com/v2/projects?callback=myFunction&access_token=ACCESS-TOKEN\"
371
- ```
38
+ source "https://rubygems.pkg.github.com/phrase" do
39
+ gem "phrase-ruby"
40
+ end
372
41
 
42
+ ### Install from Git
373
43
 
374
- ## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
375
-
376
- - API version: 2.0.0
377
- - Package version: 1.0.0
378
- - Build package: org.openapitools.codegen.languages.RubyClientCodegen
379
- For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
44
+ Add the following in the Gemfile:
380
45
 
381
- ## Installation
46
+ gem 'phrase', git: 'https://github.com/phrase/phrase-ruby.git'
382
47
 
383
- ### Build a gem
48
+ ### Build and install a gem on your own
384
49
 
385
50
  To build the Ruby code into a gem:
386
51
 
@@ -388,33 +53,13 @@ To build the Ruby code into a gem:
388
53
  gem build phrase.gemspec
389
54
  ```
390
55
 
391
- Then either install the gem locally:
56
+ Then install the gem locally:
392
57
 
393
58
  ```shell
394
- gem install ./phrase-1.0.0.gem
59
+ gem install ./phrase-1.0.6.gem
395
60
  ```
396
61
 
397
- (for development, run `gem install --dev ./phrase-1.0.0.gem` to install the development dependencies)
398
-
399
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
400
-
401
- Finally add this to the Gemfile:
402
-
403
- gem 'phrase', '~> 1.0.0'
404
-
405
- ### Install from Git
406
-
407
- If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
408
-
409
- gem 'phrase', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
410
-
411
- ### Include the Ruby code directly
412
-
413
- Include the Ruby code directly using `-I` as follows:
414
-
415
- ```shell
416
- ruby -Ilib script.rb
417
- ```
62
+ (for development, run `gem install --dev ./phrase-1.0.6.gem` to install the development dependencies)
418
63
 
419
64
  ## Getting Started
420
65
 
@@ -494,7 +139,11 @@ Class | Method | HTTP request | Description
494
139
  *Phrase::DistributionsApi* | [**distribution_show**](docs/DistributionsApi.md#distribution_show) | **GET** /accounts/{account_id}/distributions/{id} | Get a single distribution
495
140
  *Phrase::DistributionsApi* | [**distribution_update**](docs/DistributionsApi.md#distribution_update) | **PATCH** /accounts/{account_id}/distributions/{id} | Update a distribution
496
141
  *Phrase::DistributionsApi* | [**distributions_list**](docs/DistributionsApi.md#distributions_list) | **GET** /accounts/{account_id}/distributions | List distributions
142
+ *Phrase::DocumentsApi* | [**document_delete**](docs/DocumentsApi.md#document_delete) | **DELETE** /projects/{project_id}/documents/{id} | Delete document
143
+ *Phrase::DocumentsApi* | [**documents_list**](docs/DocumentsApi.md#documents_list) | **GET** /projects/{project_id}/documents | List documents
497
144
  *Phrase::FormatsApi* | [**formats_list**](docs/FormatsApi.md#formats_list) | **GET** /formats | List formats
145
+ *Phrase::GitHubSyncApi* | [**github_sync_export**](docs/GitHubSyncApi.md#github_sync_export) | **POST** /github_syncs/export | Export from Phrase to GitHub
146
+ *Phrase::GitHubSyncApi* | [**github_sync_import**](docs/GitHubSyncApi.md#github_sync_import) | **POST** /github_syncs/import | Import to Phrase from GitHub
498
147
  *Phrase::GitLabSyncApi* | [**gitlab_sync_delete**](docs/GitLabSyncApi.md#gitlab_sync_delete) | **DELETE** /gitlab_syncs/{id} | Delete single Sync Setting
499
148
  *Phrase::GitLabSyncApi* | [**gitlab_sync_export**](docs/GitLabSyncApi.md#gitlab_sync_export) | **POST** /gitlab_syncs/{gitlab_sync_id}/export | Export from Phrase to GitLab
500
149
  *Phrase::GitLabSyncApi* | [**gitlab_sync_history**](docs/GitLabSyncApi.md#gitlab_sync_history) | **GET** /gitlab_syncs/{gitlab_sync_id}/history | History of single Sync Setting
@@ -502,11 +151,11 @@ Class | Method | HTTP request | Description
502
151
  *Phrase::GitLabSyncApi* | [**gitlab_sync_list**](docs/GitLabSyncApi.md#gitlab_sync_list) | **GET** /gitlab_syncs | List GitLab syncs
503
152
  *Phrase::GitLabSyncApi* | [**gitlab_sync_show**](docs/GitLabSyncApi.md#gitlab_sync_show) | **GET** /gitlab_syncs/{id} | Get single Sync Setting
504
153
  *Phrase::GitLabSyncApi* | [**gitlab_sync_update**](docs/GitLabSyncApi.md#gitlab_sync_update) | **PUT** /gitlab_syncs/{id} | Update single Sync Setting
505
- *Phrase::GlossaryApi* | [**glossaries_list**](docs/GlossaryApi.md#glossaries_list) | **GET** /accounts/{account_id}/glossaries | List glossaries
506
- *Phrase::GlossaryApi* | [**glossary_create**](docs/GlossaryApi.md#glossary_create) | **POST** /accounts/{account_id}/glossaries | Create a glossary
507
- *Phrase::GlossaryApi* | [**glossary_delete**](docs/GlossaryApi.md#glossary_delete) | **DELETE** /accounts/{account_id}/glossaries/{id} | Delete a glossary
508
- *Phrase::GlossaryApi* | [**glossary_show**](docs/GlossaryApi.md#glossary_show) | **GET** /accounts/{account_id}/glossaries/{id} | Get a single glossary
509
- *Phrase::GlossaryApi* | [**glossary_update**](docs/GlossaryApi.md#glossary_update) | **PATCH** /accounts/{account_id}/glossaries/{id} | Update a glossary
154
+ *Phrase::GlossariesApi* | [**glossaries_list**](docs/GlossariesApi.md#glossaries_list) | **GET** /accounts/{account_id}/glossaries | List glossaries
155
+ *Phrase::GlossariesApi* | [**glossary_create**](docs/GlossariesApi.md#glossary_create) | **POST** /accounts/{account_id}/glossaries | Create a glossary
156
+ *Phrase::GlossariesApi* | [**glossary_delete**](docs/GlossariesApi.md#glossary_delete) | **DELETE** /accounts/{account_id}/glossaries/{id} | Delete a glossary
157
+ *Phrase::GlossariesApi* | [**glossary_show**](docs/GlossariesApi.md#glossary_show) | **GET** /accounts/{account_id}/glossaries/{id} | Get a single glossary
158
+ *Phrase::GlossariesApi* | [**glossary_update**](docs/GlossariesApi.md#glossary_update) | **PATCH** /accounts/{account_id}/glossaries/{id} | Update a glossary
510
159
  *Phrase::GlossaryTermTranslationsApi* | [**glossary_term_translation_create**](docs/GlossaryTermTranslationsApi.md#glossary_term_translation_create) | **POST** /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations | Create a glossary term translation
511
160
  *Phrase::GlossaryTermTranslationsApi* | [**glossary_term_translation_delete**](docs/GlossaryTermTranslationsApi.md#glossary_term_translation_delete) | **DELETE** /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations/{id} | Delete a glossary term translation
512
161
  *Phrase::GlossaryTermTranslationsApi* | [**glossary_term_translation_update**](docs/GlossaryTermTranslationsApi.md#glossary_term_translation_update) | **PATCH** /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations/{id} | Update a glossary term translation
@@ -537,6 +186,7 @@ Class | Method | HTTP request | Description
537
186
  *Phrase::JobsApi* | [**job_show**](docs/JobsApi.md#job_show) | **GET** /projects/{project_id}/jobs/{id} | Get a single job
538
187
  *Phrase::JobsApi* | [**job_start**](docs/JobsApi.md#job_start) | **POST** /projects/{project_id}/jobs/{id}/start | Start a job
539
188
  *Phrase::JobsApi* | [**job_update**](docs/JobsApi.md#job_update) | **PATCH** /projects/{project_id}/jobs/{id} | Update a job
189
+ *Phrase::JobsApi* | [**jobs_by_account**](docs/JobsApi.md#jobs_by_account) | **GET** /accounts/{account_id}/jobs | List account jobs
540
190
  *Phrase::JobsApi* | [**jobs_list**](docs/JobsApi.md#jobs_list) | **GET** /projects/{project_id}/jobs | List jobs
541
191
  *Phrase::KeysApi* | [**key_create**](docs/KeysApi.md#key_create) | **POST** /projects/{project_id}/keys | Create a key
542
192
  *Phrase::KeysApi* | [**key_delete**](docs/KeysApi.md#key_delete) | **DELETE** /projects/{project_id}/keys/{id} | Delete a key
@@ -600,6 +250,17 @@ Class | Method | HTTP request | Description
600
250
  *Phrase::TagsApi* | [**tag_delete**](docs/TagsApi.md#tag_delete) | **DELETE** /projects/{project_id}/tags/{name} | Delete a tag
601
251
  *Phrase::TagsApi* | [**tag_show**](docs/TagsApi.md#tag_show) | **GET** /projects/{project_id}/tags/{name} | Get a single tag
602
252
  *Phrase::TagsApi* | [**tags_list**](docs/TagsApi.md#tags_list) | **GET** /projects/{project_id}/tags | List tags
253
+ *Phrase::TeamsApi* | [**team_create**](docs/TeamsApi.md#team_create) | **POST** /accounts/{account_id}/teams | Create a Team
254
+ *Phrase::TeamsApi* | [**team_delete**](docs/TeamsApi.md#team_delete) | **DELETE** /accounts/{account_id}/teams/{team_id} | Delete Team
255
+ *Phrase::TeamsApi* | [**team_show**](docs/TeamsApi.md#team_show) | **GET** /accounts/{account_id}/teams/{team_id} | Get Team
256
+ *Phrase::TeamsApi* | [**team_update**](docs/TeamsApi.md#team_update) | **PATCH** /accounts/{account_id}/teams/{team_id} | Update Team
257
+ *Phrase::TeamsApi* | [**teams_list**](docs/TeamsApi.md#teams_list) | **GET** /accounts/{account_id}/teams | List Teams
258
+ *Phrase::TeamsApi* | [**teams_projects_create**](docs/TeamsApi.md#teams_projects_create) | **POST** /accounts/{account_id}/teams/{team_id}/projects | Add Project
259
+ *Phrase::TeamsApi* | [**teams_projects_delete**](docs/TeamsApi.md#teams_projects_delete) | **DELETE** /accounts/{account_id}/teams/{team_id}/projects/{id} | Remove Project
260
+ *Phrase::TeamsApi* | [**teams_spaces_create**](docs/TeamsApi.md#teams_spaces_create) | **POST** /accounts/{account_id}/teams/{team_id}/spaces | Add Space
261
+ *Phrase::TeamsApi* | [**teams_spaces_delete**](docs/TeamsApi.md#teams_spaces_delete) | **DELETE** /accounts/{account_id}/teams/{team_id}/spaces/{id} | Remove Space
262
+ *Phrase::TeamsApi* | [**teams_users_create**](docs/TeamsApi.md#teams_users_create) | **POST** /accounts/{account_id}/teams/{team_id}/users | Add User
263
+ *Phrase::TeamsApi* | [**teams_users_delete**](docs/TeamsApi.md#teams_users_delete) | **DELETE** /accounts/{account_id}/teams/{team_id}/users/{id} | Remove User
603
264
  *Phrase::TranslationsApi* | [**translation_create**](docs/TranslationsApi.md#translation_create) | **POST** /projects/{project_id}/translations | Create a translation
604
265
  *Phrase::TranslationsApi* | [**translation_exclude**](docs/TranslationsApi.md#translation_exclude) | **PATCH** /projects/{project_id}/translations/{id}/exclude | Exclude a translation from export
605
266
  *Phrase::TranslationsApi* | [**translation_include**](docs/TranslationsApi.md#translation_include) | **PATCH** /projects/{project_id}/translations/{id}/include | Revoke exclusion of a translation in export
@@ -662,7 +323,10 @@ Class | Method | HTTP request | Description
662
323
  - [Phrase::DistributionCreateParameters](docs/DistributionCreateParameters.md)
663
324
  - [Phrase::DistributionPreview](docs/DistributionPreview.md)
664
325
  - [Phrase::DistributionUpdateParameters](docs/DistributionUpdateParameters.md)
326
+ - [Phrase::Document](docs/Document.md)
665
327
  - [Phrase::Format](docs/Format.md)
328
+ - [Phrase::GithubSyncExportParameters](docs/GithubSyncExportParameters.md)
329
+ - [Phrase::GithubSyncImportParameters](docs/GithubSyncImportParameters.md)
666
330
  - [Phrase::GitlabSync](docs/GitlabSync.md)
667
331
  - [Phrase::GitlabSyncExport](docs/GitlabSyncExport.md)
668
332
  - [Phrase::GitlabSyncExportParameters](docs/GitlabSyncExportParameters.md)
@@ -677,6 +341,8 @@ Class | Method | HTTP request | Description
677
341
  - [Phrase::GlossaryTermTranslationUpdateParameters](docs/GlossaryTermTranslationUpdateParameters.md)
678
342
  - [Phrase::GlossaryTermUpdateParameters](docs/GlossaryTermUpdateParameters.md)
679
343
  - [Phrase::GlossaryUpdateParameters](docs/GlossaryUpdateParameters.md)
344
+ - [Phrase::InlineResponse422](docs/InlineResponse422.md)
345
+ - [Phrase::InlineResponse422Errors](docs/InlineResponse422Errors.md)
680
346
  - [Phrase::Invitation](docs/Invitation.md)
681
347
  - [Phrase::InvitationCreateParameters](docs/InvitationCreateParameters.md)
682
348
  - [Phrase::InvitationUpdateParameters](docs/InvitationUpdateParameters.md)
@@ -746,6 +412,13 @@ Class | Method | HTTP request | Description
746
412
  - [Phrase::TagWithStats1](docs/TagWithStats1.md)
747
413
  - [Phrase::TagWithStats1Statistics](docs/TagWithStats1Statistics.md)
748
414
  - [Phrase::TagWithStats1Statistics1](docs/TagWithStats1Statistics1.md)
415
+ - [Phrase::Team](docs/Team.md)
416
+ - [Phrase::TeamCreateParameters](docs/TeamCreateParameters.md)
417
+ - [Phrase::TeamDetail](docs/TeamDetail.md)
418
+ - [Phrase::TeamUpdateParameters](docs/TeamUpdateParameters.md)
419
+ - [Phrase::TeamsProjectsCreateParameters](docs/TeamsProjectsCreateParameters.md)
420
+ - [Phrase::TeamsSpacesCreateParameters](docs/TeamsSpacesCreateParameters.md)
421
+ - [Phrase::TeamsUsersCreateParameters](docs/TeamsUsersCreateParameters.md)
749
422
  - [Phrase::Translation](docs/Translation.md)
750
423
  - [Phrase::TranslationCreateParameters](docs/TranslationCreateParameters.md)
751
424
  - [Phrase::TranslationDetails](docs/TranslationDetails.md)