forgejo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (630) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +9 -0
  4. data/LICENSE~ +9 -0
  5. data/Makefile +23 -0
  6. data/Makefile~ +2 -0
  7. data/README.md +717 -0
  8. data/Rakefile +10 -0
  9. data/docs/APIError.md +20 -0
  10. data/docs/AccessToken.md +26 -0
  11. data/docs/ActionTask.md +42 -0
  12. data/docs/ActionTaskResponse.md +20 -0
  13. data/docs/ActionVariable.md +24 -0
  14. data/docs/Activity.md +42 -0
  15. data/docs/ActivityPub.md +18 -0
  16. data/docs/ActivitypubApi.md +289 -0
  17. data/docs/AddCollaboratorOption.md +18 -0
  18. data/docs/AddTimeOption.md +22 -0
  19. data/docs/AdminApi.md +1672 -0
  20. data/docs/AnnotatedTag.md +32 -0
  21. data/docs/AnnotatedTagObject.md +22 -0
  22. data/docs/Attachment.md +30 -0
  23. data/docs/BlockedUser.md +20 -0
  24. data/docs/Branch.md +34 -0
  25. data/docs/BranchProtection.md +70 -0
  26. data/docs/ChangeFileOperation.md +26 -0
  27. data/docs/ChangeFilesOptions.md +32 -0
  28. data/docs/ChangedFile.md +34 -0
  29. data/docs/CombinedStatus.md +30 -0
  30. data/docs/Comment.md +38 -0
  31. data/docs/Commit.md +36 -0
  32. data/docs/CommitAffectedFiles.md +20 -0
  33. data/docs/CommitDateOptions.md +20 -0
  34. data/docs/CommitMeta.md +22 -0
  35. data/docs/CommitStats.md +22 -0
  36. data/docs/CommitStatus.md +34 -0
  37. data/docs/CommitUser.md +22 -0
  38. data/docs/Compare.md +20 -0
  39. data/docs/ContentsResponse.md +46 -0
  40. data/docs/CreateAccessTokenOption.md +20 -0
  41. data/docs/CreateBranchProtectionOption.md +66 -0
  42. data/docs/CreateBranchRepoOption.md +22 -0
  43. data/docs/CreateEmailOption.md +18 -0
  44. data/docs/CreateFileOptions.md +32 -0
  45. data/docs/CreateForkOption.md +20 -0
  46. data/docs/CreateGPGKeyOption.md +20 -0
  47. data/docs/CreateHookOption.md +28 -0
  48. data/docs/CreateIssueCommentOption.md +20 -0
  49. data/docs/CreateIssueOption.md +34 -0
  50. data/docs/CreateKeyOption.md +22 -0
  51. data/docs/CreateLabelOption.md +26 -0
  52. data/docs/CreateMilestoneOption.md +24 -0
  53. data/docs/CreateOAuth2ApplicationOptions.md +22 -0
  54. data/docs/CreateOrUpdateSecretOption.md +18 -0
  55. data/docs/CreateOrgOption.md +32 -0
  56. data/docs/CreatePullRequestOption.md +34 -0
  57. data/docs/CreatePullReviewComment.md +24 -0
  58. data/docs/CreatePullReviewOptions.md +24 -0
  59. data/docs/CreatePushMirrorOption.md +26 -0
  60. data/docs/CreateReleaseOption.md +30 -0
  61. data/docs/CreateRepoOption.md +40 -0
  62. data/docs/CreateStatusOption.md +24 -0
  63. data/docs/CreateTagOption.md +22 -0
  64. data/docs/CreateTagProtectionOption.md +22 -0
  65. data/docs/CreateTeamOption.md +30 -0
  66. data/docs/CreateUserOption.md +38 -0
  67. data/docs/CreateVariableOption.md +18 -0
  68. data/docs/CreateWikiPageOptions.md +22 -0
  69. data/docs/Cron.md +26 -0
  70. data/docs/DeleteEmailOption.md +18 -0
  71. data/docs/DeleteFileOptions.md +32 -0
  72. data/docs/DeleteLabelsOption.md +18 -0
  73. data/docs/DeployKey.md +34 -0
  74. data/docs/DismissPullReviewOptions.md +20 -0
  75. data/docs/DispatchWorkflowOption.md +20 -0
  76. data/docs/EditAttachmentOptions.md +18 -0
  77. data/docs/EditBranchProtectionOption.md +62 -0
  78. data/docs/EditDeadlineOption.md +18 -0
  79. data/docs/EditGitHookOption.md +18 -0
  80. data/docs/EditHookOption.md +26 -0
  81. data/docs/EditIssueCommentOption.md +20 -0
  82. data/docs/EditIssueOption.md +36 -0
  83. data/docs/EditLabelOption.md +26 -0
  84. data/docs/EditMilestoneOption.md +24 -0
  85. data/docs/EditOrgOption.md +30 -0
  86. data/docs/EditPullRequestOption.md +38 -0
  87. data/docs/EditReactionOption.md +18 -0
  88. data/docs/EditReleaseOption.md +30 -0
  89. data/docs/EditRepoOption.md +82 -0
  90. data/docs/EditTagProtectionOption.md +22 -0
  91. data/docs/EditTeamOption.md +30 -0
  92. data/docs/EditUserOption.md +54 -0
  93. data/docs/Email.md +26 -0
  94. data/docs/ExternalTracker.md +24 -0
  95. data/docs/ExternalWiki.md +18 -0
  96. data/docs/FileCommitResponse.md +34 -0
  97. data/docs/FileDeleteResponse.md +22 -0
  98. data/docs/FileLinksResponse.md +22 -0
  99. data/docs/FileResponse.md +22 -0
  100. data/docs/FilesResponse.md +22 -0
  101. data/docs/GPGKey.md +42 -0
  102. data/docs/GPGKeyEmail.md +20 -0
  103. data/docs/GeneralAPISettings.md +24 -0
  104. data/docs/GeneralAttachmentSettings.md +24 -0
  105. data/docs/GeneralRepoSettings.md +30 -0
  106. data/docs/GeneralUISettings.md +22 -0
  107. data/docs/GenerateRepoOption.md +40 -0
  108. data/docs/GitBlobResponse.md +26 -0
  109. data/docs/GitEntry.md +28 -0
  110. data/docs/GitHook.md +22 -0
  111. data/docs/GitObject.md +22 -0
  112. data/docs/GitTreeResponse.md +28 -0
  113. data/docs/GitignoreTemplateInfo.md +20 -0
  114. data/docs/Hook.md +40 -0
  115. data/docs/Identity.md +20 -0
  116. data/docs/InternalTracker.md +22 -0
  117. data/docs/Issue.md +66 -0
  118. data/docs/IssueApi.md +5206 -0
  119. data/docs/IssueConfig.md +20 -0
  120. data/docs/IssueConfigContactLink.md +22 -0
  121. data/docs/IssueConfigValidation.md +20 -0
  122. data/docs/IssueDeadline.md +18 -0
  123. data/docs/IssueFormField.md +26 -0
  124. data/docs/IssueLabelsOption.md +20 -0
  125. data/docs/IssueMeta.md +22 -0
  126. data/docs/IssueTemplate.md +32 -0
  127. data/docs/Label.md +30 -0
  128. data/docs/LabelTemplate.md +24 -0
  129. data/docs/LicenseTemplateInfo.md +26 -0
  130. data/docs/LicensesTemplateListEntry.md +22 -0
  131. data/docs/MarkdownOption.md +24 -0
  132. data/docs/MarkupOption.md +26 -0
  133. data/docs/MergePullRequestOption.md +32 -0
  134. data/docs/MigrateRepoOptions.md +56 -0
  135. data/docs/Milestone.md +36 -0
  136. data/docs/MiscellaneousApi.md +833 -0
  137. data/docs/NewIssuePinsAllowed.md +20 -0
  138. data/docs/NodeInfo.md +30 -0
  139. data/docs/NodeInfoServices.md +20 -0
  140. data/docs/NodeInfoSoftware.md +24 -0
  141. data/docs/NodeInfoUsage.md +22 -0
  142. data/docs/NodeInfoUsageUsers.md +22 -0
  143. data/docs/Note.md +20 -0
  144. data/docs/NotificationApi.md +550 -0
  145. data/docs/NotificationCount.md +18 -0
  146. data/docs/NotificationSubject.md +30 -0
  147. data/docs/NotificationThread.md +30 -0
  148. data/docs/OAuth2Application.md +30 -0
  149. data/docs/Organization.md +38 -0
  150. data/docs/OrganizationApi.md +4259 -0
  151. data/docs/OrganizationPermissions.md +26 -0
  152. data/docs/PRBranchInfo.md +26 -0
  153. data/docs/Package.md +34 -0
  154. data/docs/PackageApi.md +314 -0
  155. data/docs/PackageFile.md +30 -0
  156. data/docs/PayloadCommit.md +36 -0
  157. data/docs/PayloadCommitVerification.md +26 -0
  158. data/docs/PayloadUser.md +22 -0
  159. data/docs/Permission.md +22 -0
  160. data/docs/PublicKey.md +34 -0
  161. data/docs/PullRequest.md +88 -0
  162. data/docs/PullRequestMeta.md +24 -0
  163. data/docs/PullReview.md +44 -0
  164. data/docs/PullReviewComment.md +46 -0
  165. data/docs/PullReviewRequestOptions.md +20 -0
  166. data/docs/PushMirror.md +32 -0
  167. data/docs/Reaction.md +22 -0
  168. data/docs/Reference.md +22 -0
  169. data/docs/Release.md +52 -0
  170. data/docs/RenameUserOption.md +18 -0
  171. data/docs/ReplaceFlagsOption.md +18 -0
  172. data/docs/RepoCollaboratorPermission.md +22 -0
  173. data/docs/RepoCommit.md +28 -0
  174. data/docs/RepoCreateReleaseAttachmentRequest.md +18 -0
  175. data/docs/RepoTopicOptions.md +18 -0
  176. data/docs/RepoTransfer.md +22 -0
  177. data/docs/Repository.md +140 -0
  178. data/docs/RepositoryApi.md +13022 -0
  179. data/docs/RepositoryMeta.md +24 -0
  180. data/docs/SearchResults.md +20 -0
  181. data/docs/Secret.md +20 -0
  182. data/docs/ServerVersion.md +18 -0
  183. data/docs/SettingsApi.md +275 -0
  184. data/docs/StopWatch.md +30 -0
  185. data/docs/SubmitPullReviewOptions.md +20 -0
  186. data/docs/Tag.md +30 -0
  187. data/docs/TagArchiveDownloadCount.md +20 -0
  188. data/docs/TagProtection.md +28 -0
  189. data/docs/Team.md +34 -0
  190. data/docs/TeamSearch200Response.md +20 -0
  191. data/docs/TimelineComment.md +74 -0
  192. data/docs/TopicName.md +18 -0
  193. data/docs/TopicResponse.md +26 -0
  194. data/docs/TrackedTime.md +30 -0
  195. data/docs/TransferRepoOption.md +20 -0
  196. data/docs/UpdateFileOptions.md +36 -0
  197. data/docs/UpdateRepoAvatarOption.md +18 -0
  198. data/docs/UpdateUserAvatarOption.md +18 -0
  199. data/docs/UpdateVariableOption.md +20 -0
  200. data/docs/User.md +62 -0
  201. data/docs/UserApi.md +4969 -0
  202. data/docs/UserHeatmapData.md +20 -0
  203. data/docs/UserSearch200Response.md +20 -0
  204. data/docs/UserSettings.md +38 -0
  205. data/docs/UserSettingsOptions.md +38 -0
  206. data/docs/WatchInfo.md +28 -0
  207. data/docs/WikiCommit.md +24 -0
  208. data/docs/WikiCommitList.md +20 -0
  209. data/docs/WikiPage.md +32 -0
  210. data/docs/WikiPageMetaData.md +24 -0
  211. data/forgejo.gemspec +49 -0
  212. data/git_push.sh +57 -0
  213. data/lib/forgejo/api/activitypub_api.rb +269 -0
  214. data/lib/forgejo/api/admin_api.rb +1496 -0
  215. data/lib/forgejo/api/issue_api.rb +5282 -0
  216. data/lib/forgejo/api/miscellaneous_api.rb +725 -0
  217. data/lib/forgejo/api/notification_api.rb +520 -0
  218. data/lib/forgejo/api/organization_api.rb +3898 -0
  219. data/lib/forgejo/api/package_api.rb +334 -0
  220. data/lib/forgejo/api/repository_api.rb +12849 -0
  221. data/lib/forgejo/api/settings_api.rb +242 -0
  222. data/lib/forgejo/api/user_api.rb +4314 -0
  223. data/lib/forgejo/api_client.rb +437 -0
  224. data/lib/forgejo/api_error.rb +58 -0
  225. data/lib/forgejo/configuration.rb +392 -0
  226. data/lib/forgejo/models/access_token.rb +252 -0
  227. data/lib/forgejo/models/action_task.rb +323 -0
  228. data/lib/forgejo/models/action_task_response.rb +226 -0
  229. data/lib/forgejo/models/action_variable.rb +246 -0
  230. data/lib/forgejo/models/activity.rb +357 -0
  231. data/lib/forgejo/models/activity_pub.rb +215 -0
  232. data/lib/forgejo/models/add_collaborator_option.rb +215 -0
  233. data/lib/forgejo/models/add_time_option.rb +242 -0
  234. data/lib/forgejo/models/annotated_tag.rb +278 -0
  235. data/lib/forgejo/models/annotated_tag_object.rb +233 -0
  236. data/lib/forgejo/models/api_error.rb +224 -0
  237. data/lib/forgejo/models/attachment.rb +269 -0
  238. data/lib/forgejo/models/blocked_user.rb +223 -0
  239. data/lib/forgejo/models/branch.rb +289 -0
  240. data/lib/forgejo/models/branch_protection.rb +464 -0
  241. data/lib/forgejo/models/change_file_operation.rb +304 -0
  242. data/lib/forgejo/models/change_files_options.rb +292 -0
  243. data/lib/forgejo/models/changed_file.rb +287 -0
  244. data/lib/forgejo/models/combined_status.rb +272 -0
  245. data/lib/forgejo/models/comment.rb +307 -0
  246. data/lib/forgejo/models/commit.rb +299 -0
  247. data/lib/forgejo/models/commit_affected_files.rb +224 -0
  248. data/lib/forgejo/models/commit_date_options.rb +224 -0
  249. data/lib/forgejo/models/commit_meta.rb +232 -0
  250. data/lib/forgejo/models/commit_stats.rb +233 -0
  251. data/lib/forgejo/models/commit_status.rb +288 -0
  252. data/lib/forgejo/models/commit_user.rb +232 -0
  253. data/lib/forgejo/models/compare.rb +225 -0
  254. data/lib/forgejo/models/contents_response.rb +346 -0
  255. data/lib/forgejo/models/create_access_token_option.rb +233 -0
  256. data/lib/forgejo/models/create_branch_protection_option.rb +446 -0
  257. data/lib/forgejo/models/create_branch_repo_option.rb +243 -0
  258. data/lib/forgejo/models/create_email_option.rb +218 -0
  259. data/lib/forgejo/models/create_file_options.rb +290 -0
  260. data/lib/forgejo/models/create_fork_option.rb +226 -0
  261. data/lib/forgejo/models/create_gpg_key_option.rb +232 -0
  262. data/lib/forgejo/models/create_hook_option.rb +315 -0
  263. data/lib/forgejo/models/create_issue_comment_option.rb +231 -0
  264. data/lib/forgejo/models/create_issue_option.rb +301 -0
  265. data/lib/forgejo/models/create_key_option.rb +250 -0
  266. data/lib/forgejo/models/create_label_option.rb +265 -0
  267. data/lib/forgejo/models/create_milestone_option.rb +276 -0
  268. data/lib/forgejo/models/create_o_auth2_application_options.rb +235 -0
  269. data/lib/forgejo/models/create_or_update_secret_option.rb +223 -0
  270. data/lib/forgejo/models/create_org_option.rb +320 -0
  271. data/lib/forgejo/models/create_pull_request_option.rb +291 -0
  272. data/lib/forgejo/models/create_pull_review_comment.rb +245 -0
  273. data/lib/forgejo/models/create_pull_review_options.rb +245 -0
  274. data/lib/forgejo/models/create_push_mirror_option.rb +250 -0
  275. data/lib/forgejo/models/create_release_option.rb +276 -0
  276. data/lib/forgejo/models/create_repo_option.rb +379 -0
  277. data/lib/forgejo/models/create_status_option.rb +243 -0
  278. data/lib/forgejo/models/create_tag_option.rb +240 -0
  279. data/lib/forgejo/models/create_tag_protection_option.rb +237 -0
  280. data/lib/forgejo/models/create_team_option.rb +314 -0
  281. data/lib/forgejo/models/create_user_option.rb +320 -0
  282. data/lib/forgejo/models/create_variable_option.rb +223 -0
  283. data/lib/forgejo/models/create_wiki_page_options.rb +236 -0
  284. data/lib/forgejo/models/cron.rb +251 -0
  285. data/lib/forgejo/models/delete_email_option.rb +218 -0
  286. data/lib/forgejo/models/delete_file_options.rb +290 -0
  287. data/lib/forgejo/models/delete_labels_option.rb +215 -0
  288. data/lib/forgejo/models/deploy_key.rb +287 -0
  289. data/lib/forgejo/models/dismiss_pull_review_options.rb +224 -0
  290. data/lib/forgejo/models/dispatch_workflow_option.rb +235 -0
  291. data/lib/forgejo/models/edit_attachment_options.rb +215 -0
  292. data/lib/forgejo/models/edit_branch_protection_option.rb +427 -0
  293. data/lib/forgejo/models/edit_deadline_option.rb +222 -0
  294. data/lib/forgejo/models/edit_git_hook_option.rb +215 -0
  295. data/lib/forgejo/models/edit_hook_option.rb +255 -0
  296. data/lib/forgejo/models/edit_issue_comment_option.rb +231 -0
  297. data/lib/forgejo/models/edit_issue_option.rb +299 -0
  298. data/lib/forgejo/models/edit_label_option.rb +251 -0
  299. data/lib/forgejo/models/edit_milestone_option.rb +242 -0
  300. data/lib/forgejo/models/edit_org_option.rb +304 -0
  301. data/lib/forgejo/models/edit_pull_request_option.rb +309 -0
  302. data/lib/forgejo/models/edit_reaction_option.rb +215 -0
  303. data/lib/forgejo/models/edit_release_option.rb +269 -0
  304. data/lib/forgejo/models/edit_repo_option.rb +533 -0
  305. data/lib/forgejo/models/edit_tag_protection_option.rb +237 -0
  306. data/lib/forgejo/models/edit_team_option.rb +314 -0
  307. data/lib/forgejo/models/edit_user_option.rb +377 -0
  308. data/lib/forgejo/models/email.rb +251 -0
  309. data/lib/forgejo/models/external_tracker.rb +246 -0
  310. data/lib/forgejo/models/external_wiki.rb +216 -0
  311. data/lib/forgejo/models/file_commit_response.rb +288 -0
  312. data/lib/forgejo/models/file_delete_response.rb +233 -0
  313. data/lib/forgejo/models/file_links_response.rb +233 -0
  314. data/lib/forgejo/models/file_response.rb +233 -0
  315. data/lib/forgejo/models/files_response.rb +235 -0
  316. data/lib/forgejo/models/general_api_settings.rb +242 -0
  317. data/lib/forgejo/models/general_attachment_settings.rb +242 -0
  318. data/lib/forgejo/models/general_repo_settings.rb +269 -0
  319. data/lib/forgejo/models/general_ui_settings.rb +237 -0
  320. data/lib/forgejo/models/generate_repo_option.rb +340 -0
  321. data/lib/forgejo/models/git_blob_response.rb +251 -0
  322. data/lib/forgejo/models/git_entry.rb +260 -0
  323. data/lib/forgejo/models/git_hook.rb +233 -0
  324. data/lib/forgejo/models/git_object.rb +232 -0
  325. data/lib/forgejo/models/git_tree_response.rb +262 -0
  326. data/lib/forgejo/models/gitignore_template_info.rb +224 -0
  327. data/lib/forgejo/models/gpg_key.rb +327 -0
  328. data/lib/forgejo/models/gpg_key_email.rb +224 -0
  329. data/lib/forgejo/models/hook.rb +319 -0
  330. data/lib/forgejo/models/identity.rb +224 -0
  331. data/lib/forgejo/models/internal_tracker.rb +236 -0
  332. data/lib/forgejo/models/issue.rb +438 -0
  333. data/lib/forgejo/models/issue_config.rb +225 -0
  334. data/lib/forgejo/models/issue_config_contact_link.rb +232 -0
  335. data/lib/forgejo/models/issue_config_validation.rb +223 -0
  336. data/lib/forgejo/models/issue_deadline.rb +215 -0
  337. data/lib/forgejo/models/issue_form_field.rb +257 -0
  338. data/lib/forgejo/models/issue_labels_option.rb +227 -0
  339. data/lib/forgejo/models/issue_meta.rb +233 -0
  340. data/lib/forgejo/models/issue_template.rb +282 -0
  341. data/lib/forgejo/models/label.rb +269 -0
  342. data/lib/forgejo/models/label_template.rb +242 -0
  343. data/lib/forgejo/models/license_template_info.rb +251 -0
  344. data/lib/forgejo/models/licenses_template_list_entry.rb +233 -0
  345. data/lib/forgejo/models/markdown_option.rb +246 -0
  346. data/lib/forgejo/models/markup_option.rb +256 -0
  347. data/lib/forgejo/models/merge_pull_request_option.rb +319 -0
  348. data/lib/forgejo/models/migrate_repo_options.rb +436 -0
  349. data/lib/forgejo/models/milestone.rb +297 -0
  350. data/lib/forgejo/models/new_issue_pins_allowed.rb +224 -0
  351. data/lib/forgejo/models/node_info.rb +271 -0
  352. data/lib/forgejo/models/node_info_services.rb +228 -0
  353. data/lib/forgejo/models/node_info_software.rb +242 -0
  354. data/lib/forgejo/models/node_info_usage.rb +233 -0
  355. data/lib/forgejo/models/node_info_usage_users.rb +233 -0
  356. data/lib/forgejo/models/note.rb +224 -0
  357. data/lib/forgejo/models/notification_count.rb +215 -0
  358. data/lib/forgejo/models/notification_subject.rb +271 -0
  359. data/lib/forgejo/models/notification_thread.rb +269 -0
  360. data/lib/forgejo/models/o_auth2_application.rb +270 -0
  361. data/lib/forgejo/models/organization.rb +306 -0
  362. data/lib/forgejo/models/organization_permissions.rb +251 -0
  363. data/lib/forgejo/models/package.rb +287 -0
  364. data/lib/forgejo/models/package_file.rb +269 -0
  365. data/lib/forgejo/models/payload_commit.rb +303 -0
  366. data/lib/forgejo/models/payload_commit_verification.rb +251 -0
  367. data/lib/forgejo/models/payload_user.rb +234 -0
  368. data/lib/forgejo/models/permission.rb +233 -0
  369. data/lib/forgejo/models/pr_branch_info.rb +251 -0
  370. data/lib/forgejo/models/public_key.rb +287 -0
  371. data/lib/forgejo/models/pull_request.rb +538 -0
  372. data/lib/forgejo/models/pull_request_meta.rb +242 -0
  373. data/lib/forgejo/models/pull_review.rb +333 -0
  374. data/lib/forgejo/models/pull_review_comment.rb +341 -0
  375. data/lib/forgejo/models/pull_review_request_options.rb +228 -0
  376. data/lib/forgejo/models/push_mirror.rb +278 -0
  377. data/lib/forgejo/models/reaction.rb +233 -0
  378. data/lib/forgejo/models/reference.rb +232 -0
  379. data/lib/forgejo/models/release.rb +370 -0
  380. data/lib/forgejo/models/rename_user_option.rb +223 -0
  381. data/lib/forgejo/models/replace_flags_option.rb +217 -0
  382. data/lib/forgejo/models/repo_collaborator_permission.rb +233 -0
  383. data/lib/forgejo/models/repo_commit.rb +259 -0
  384. data/lib/forgejo/models/repo_create_release_attachment_request.rb +215 -0
  385. data/lib/forgejo/models/repo_topic_options.rb +218 -0
  386. data/lib/forgejo/models/repo_transfer.rb +235 -0
  387. data/lib/forgejo/models/repository.rb +801 -0
  388. data/lib/forgejo/models/repository_meta.rb +242 -0
  389. data/lib/forgejo/models/search_results.rb +226 -0
  390. data/lib/forgejo/models/secret.rb +225 -0
  391. data/lib/forgejo/models/server_version.rb +215 -0
  392. data/lib/forgejo/models/stop_watch.rb +269 -0
  393. data/lib/forgejo/models/submit_pull_review_options.rb +225 -0
  394. data/lib/forgejo/models/tag.rb +269 -0
  395. data/lib/forgejo/models/tag_archive_download_count.rb +224 -0
  396. data/lib/forgejo/models/tag_protection.rb +264 -0
  397. data/lib/forgejo/models/team.rb +325 -0
  398. data/lib/forgejo/models/team_search200_response.rb +225 -0
  399. data/lib/forgejo/models/timeline_comment.rb +469 -0
  400. data/lib/forgejo/models/topic_name.rb +217 -0
  401. data/lib/forgejo/models/topic_response.rb +251 -0
  402. data/lib/forgejo/models/tracked_time.rb +272 -0
  403. data/lib/forgejo/models/transfer_repo_option.rb +234 -0
  404. data/lib/forgejo/models/update_file_options.rb +317 -0
  405. data/lib/forgejo/models/update_repo_avatar_option.rb +216 -0
  406. data/lib/forgejo/models/update_user_avatar_option.rb +216 -0
  407. data/lib/forgejo/models/update_variable_option.rb +233 -0
  408. data/lib/forgejo/models/user.rb +433 -0
  409. data/lib/forgejo/models/user_heatmap_data.rb +225 -0
  410. data/lib/forgejo/models/user_search200_response.rb +225 -0
  411. data/lib/forgejo/models/user_settings.rb +306 -0
  412. data/lib/forgejo/models/user_settings_options.rb +306 -0
  413. data/lib/forgejo/models/watch_info.rb +260 -0
  414. data/lib/forgejo/models/wiki_commit.rb +242 -0
  415. data/lib/forgejo/models/wiki_commit_list.rb +226 -0
  416. data/lib/forgejo/models/wiki_page.rb +279 -0
  417. data/lib/forgejo/models/wiki_page_meta_data.rb +242 -0
  418. data/lib/forgejo/version.rb +15 -0
  419. data/lib/forgejo.rb +241 -0
  420. data/manifest.scm +2 -0
  421. data/patch +7 -0
  422. data/patch~ +1 -0
  423. data/smoke +16 -0
  424. data/smoke~ +1 -0
  425. data/spec/api/activitypub_api_spec.rb +80 -0
  426. data/spec/api/admin_api_spec.rb +308 -0
  427. data/spec/api/issue_api_spec.rb +998 -0
  428. data/spec/api/miscellaneous_api_spec.rb +161 -0
  429. data/spec/api/notification_api_spec.rb +134 -0
  430. data/spec/api/organization_api_spec.rb +752 -0
  431. data/spec/api/package_api_spec.rb +92 -0
  432. data/spec/api/repository_api_spec.rb +2366 -0
  433. data/spec/api/settings_api_spec.rb +75 -0
  434. data/spec/api/user_api_spec.rb +839 -0
  435. data/spec/models/access_token_spec.rb +60 -0
  436. data/spec/models/action_task_response_spec.rb +42 -0
  437. data/spec/models/action_task_spec.rb +108 -0
  438. data/spec/models/action_variable_spec.rb +54 -0
  439. data/spec/models/activity_pub_spec.rb +36 -0
  440. data/spec/models/activity_spec.rb +112 -0
  441. data/spec/models/add_collaborator_option_spec.rb +36 -0
  442. data/spec/models/add_time_option_spec.rb +48 -0
  443. data/spec/models/annotated_tag_object_spec.rb +48 -0
  444. data/spec/models/annotated_tag_spec.rb +78 -0
  445. data/spec/models/api_error_spec.rb +42 -0
  446. data/spec/models/attachment_spec.rb +72 -0
  447. data/spec/models/blocked_user_spec.rb +42 -0
  448. data/spec/models/branch_protection_spec.rb +192 -0
  449. data/spec/models/branch_spec.rb +84 -0
  450. data/spec/models/change_file_operation_spec.rb +64 -0
  451. data/spec/models/change_files_options_spec.rb +78 -0
  452. data/spec/models/changed_file_spec.rb +84 -0
  453. data/spec/models/combined_status_spec.rb +72 -0
  454. data/spec/models/comment_spec.rb +96 -0
  455. data/spec/models/commit_affected_files_spec.rb +42 -0
  456. data/spec/models/commit_date_options_spec.rb +42 -0
  457. data/spec/models/commit_meta_spec.rb +48 -0
  458. data/spec/models/commit_spec.rb +90 -0
  459. data/spec/models/commit_stats_spec.rb +48 -0
  460. data/spec/models/commit_status_spec.rb +84 -0
  461. data/spec/models/commit_user_spec.rb +48 -0
  462. data/spec/models/compare_spec.rb +42 -0
  463. data/spec/models/contents_response_spec.rb +120 -0
  464. data/spec/models/create_access_token_option_spec.rb +42 -0
  465. data/spec/models/create_branch_protection_option_spec.rb +180 -0
  466. data/spec/models/create_branch_repo_option_spec.rb +48 -0
  467. data/spec/models/create_email_option_spec.rb +36 -0
  468. data/spec/models/create_file_options_spec.rb +78 -0
  469. data/spec/models/create_fork_option_spec.rb +42 -0
  470. data/spec/models/create_gpg_key_option_spec.rb +42 -0
  471. data/spec/models/create_hook_option_spec.rb +70 -0
  472. data/spec/models/create_issue_comment_option_spec.rb +42 -0
  473. data/spec/models/create_issue_option_spec.rb +84 -0
  474. data/spec/models/create_key_option_spec.rb +48 -0
  475. data/spec/models/create_label_option_spec.rb +60 -0
  476. data/spec/models/create_milestone_option_spec.rb +58 -0
  477. data/spec/models/create_o_auth2_application_options_spec.rb +48 -0
  478. data/spec/models/create_or_update_secret_option_spec.rb +36 -0
  479. data/spec/models/create_org_option_spec.rb +82 -0
  480. data/spec/models/create_pull_request_option_spec.rb +84 -0
  481. data/spec/models/create_pull_review_comment_spec.rb +54 -0
  482. data/spec/models/create_pull_review_options_spec.rb +54 -0
  483. data/spec/models/create_push_mirror_option_spec.rb +60 -0
  484. data/spec/models/create_release_option_spec.rb +72 -0
  485. data/spec/models/create_repo_option_spec.rb +110 -0
  486. data/spec/models/create_status_option_spec.rb +54 -0
  487. data/spec/models/create_tag_option_spec.rb +48 -0
  488. data/spec/models/create_tag_protection_option_spec.rb +48 -0
  489. data/spec/models/create_team_option_spec.rb +76 -0
  490. data/spec/models/create_user_option_spec.rb +96 -0
  491. data/spec/models/create_variable_option_spec.rb +36 -0
  492. data/spec/models/create_wiki_page_options_spec.rb +48 -0
  493. data/spec/models/cron_spec.rb +60 -0
  494. data/spec/models/delete_email_option_spec.rb +36 -0
  495. data/spec/models/delete_file_options_spec.rb +78 -0
  496. data/spec/models/delete_labels_option_spec.rb +36 -0
  497. data/spec/models/deploy_key_spec.rb +84 -0
  498. data/spec/models/dismiss_pull_review_options_spec.rb +42 -0
  499. data/spec/models/dispatch_workflow_option_spec.rb +42 -0
  500. data/spec/models/edit_attachment_options_spec.rb +36 -0
  501. data/spec/models/edit_branch_protection_option_spec.rb +168 -0
  502. data/spec/models/edit_deadline_option_spec.rb +36 -0
  503. data/spec/models/edit_git_hook_option_spec.rb +36 -0
  504. data/spec/models/edit_hook_option_spec.rb +60 -0
  505. data/spec/models/edit_issue_comment_option_spec.rb +42 -0
  506. data/spec/models/edit_issue_option_spec.rb +90 -0
  507. data/spec/models/edit_label_option_spec.rb +60 -0
  508. data/spec/models/edit_milestone_option_spec.rb +54 -0
  509. data/spec/models/edit_org_option_spec.rb +76 -0
  510. data/spec/models/edit_pull_request_option_spec.rb +96 -0
  511. data/spec/models/edit_reaction_option_spec.rb +36 -0
  512. data/spec/models/edit_release_option_spec.rb +72 -0
  513. data/spec/models/edit_repo_option_spec.rb +228 -0
  514. data/spec/models/edit_tag_protection_option_spec.rb +48 -0
  515. data/spec/models/edit_team_option_spec.rb +76 -0
  516. data/spec/models/edit_user_option_spec.rb +144 -0
  517. data/spec/models/email_spec.rb +60 -0
  518. data/spec/models/external_tracker_spec.rb +54 -0
  519. data/spec/models/external_wiki_spec.rb +36 -0
  520. data/spec/models/file_commit_response_spec.rb +84 -0
  521. data/spec/models/file_delete_response_spec.rb +48 -0
  522. data/spec/models/file_links_response_spec.rb +48 -0
  523. data/spec/models/file_response_spec.rb +48 -0
  524. data/spec/models/files_response_spec.rb +48 -0
  525. data/spec/models/general_api_settings_spec.rb +54 -0
  526. data/spec/models/general_attachment_settings_spec.rb +54 -0
  527. data/spec/models/general_repo_settings_spec.rb +72 -0
  528. data/spec/models/general_ui_settings_spec.rb +48 -0
  529. data/spec/models/generate_repo_option_spec.rb +102 -0
  530. data/spec/models/git_blob_response_spec.rb +60 -0
  531. data/spec/models/git_entry_spec.rb +66 -0
  532. data/spec/models/git_hook_spec.rb +48 -0
  533. data/spec/models/git_object_spec.rb +48 -0
  534. data/spec/models/git_tree_response_spec.rb +66 -0
  535. data/spec/models/gitignore_template_info_spec.rb +42 -0
  536. data/spec/models/gpg_key_email_spec.rb +42 -0
  537. data/spec/models/gpg_key_spec.rb +108 -0
  538. data/spec/models/hook_spec.rb +102 -0
  539. data/spec/models/identity_spec.rb +42 -0
  540. data/spec/models/internal_tracker_spec.rb +48 -0
  541. data/spec/models/issue_config_contact_link_spec.rb +48 -0
  542. data/spec/models/issue_config_spec.rb +42 -0
  543. data/spec/models/issue_config_validation_spec.rb +42 -0
  544. data/spec/models/issue_deadline_spec.rb +36 -0
  545. data/spec/models/issue_form_field_spec.rb +60 -0
  546. data/spec/models/issue_labels_option_spec.rb +42 -0
  547. data/spec/models/issue_meta_spec.rb +48 -0
  548. data/spec/models/issue_spec.rb +180 -0
  549. data/spec/models/issue_template_spec.rb +78 -0
  550. data/spec/models/label_spec.rb +72 -0
  551. data/spec/models/label_template_spec.rb +54 -0
  552. data/spec/models/license_template_info_spec.rb +60 -0
  553. data/spec/models/licenses_template_list_entry_spec.rb +48 -0
  554. data/spec/models/markdown_option_spec.rb +54 -0
  555. data/spec/models/markup_option_spec.rb +60 -0
  556. data/spec/models/merge_pull_request_option_spec.rb +82 -0
  557. data/spec/models/migrate_repo_options_spec.rb +154 -0
  558. data/spec/models/milestone_spec.rb +90 -0
  559. data/spec/models/new_issue_pins_allowed_spec.rb +42 -0
  560. data/spec/models/node_info_services_spec.rb +42 -0
  561. data/spec/models/node_info_software_spec.rb +54 -0
  562. data/spec/models/node_info_spec.rb +72 -0
  563. data/spec/models/node_info_usage_spec.rb +48 -0
  564. data/spec/models/node_info_usage_users_spec.rb +48 -0
  565. data/spec/models/note_spec.rb +42 -0
  566. data/spec/models/notification_count_spec.rb +36 -0
  567. data/spec/models/notification_subject_spec.rb +72 -0
  568. data/spec/models/notification_thread_spec.rb +72 -0
  569. data/spec/models/o_auth2_application_spec.rb +72 -0
  570. data/spec/models/organization_permissions_spec.rb +60 -0
  571. data/spec/models/organization_spec.rb +96 -0
  572. data/spec/models/package_file_spec.rb +72 -0
  573. data/spec/models/package_spec.rb +84 -0
  574. data/spec/models/payload_commit_spec.rb +90 -0
  575. data/spec/models/payload_commit_verification_spec.rb +60 -0
  576. data/spec/models/payload_user_spec.rb +48 -0
  577. data/spec/models/permission_spec.rb +48 -0
  578. data/spec/models/pr_branch_info_spec.rb +60 -0
  579. data/spec/models/public_key_spec.rb +84 -0
  580. data/spec/models/pull_request_meta_spec.rb +54 -0
  581. data/spec/models/pull_request_spec.rb +246 -0
  582. data/spec/models/pull_review_comment_spec.rb +120 -0
  583. data/spec/models/pull_review_request_options_spec.rb +42 -0
  584. data/spec/models/pull_review_spec.rb +114 -0
  585. data/spec/models/push_mirror_spec.rb +78 -0
  586. data/spec/models/reaction_spec.rb +48 -0
  587. data/spec/models/reference_spec.rb +48 -0
  588. data/spec/models/release_spec.rb +138 -0
  589. data/spec/models/rename_user_option_spec.rb +36 -0
  590. data/spec/models/replace_flags_option_spec.rb +36 -0
  591. data/spec/models/repo_collaborator_permission_spec.rb +48 -0
  592. data/spec/models/repo_commit_spec.rb +66 -0
  593. data/spec/models/repo_create_release_attachment_request_spec.rb +36 -0
  594. data/spec/models/repo_topic_options_spec.rb +36 -0
  595. data/spec/models/repo_transfer_spec.rb +48 -0
  596. data/spec/models/repository_meta_spec.rb +54 -0
  597. data/spec/models/repository_spec.rb +406 -0
  598. data/spec/models/search_results_spec.rb +42 -0
  599. data/spec/models/secret_spec.rb +42 -0
  600. data/spec/models/server_version_spec.rb +36 -0
  601. data/spec/models/stop_watch_spec.rb +72 -0
  602. data/spec/models/submit_pull_review_options_spec.rb +42 -0
  603. data/spec/models/tag_archive_download_count_spec.rb +42 -0
  604. data/spec/models/tag_protection_spec.rb +66 -0
  605. data/spec/models/tag_spec.rb +72 -0
  606. data/spec/models/team_search200_response_spec.rb +42 -0
  607. data/spec/models/team_spec.rb +88 -0
  608. data/spec/models/timeline_comment_spec.rb +204 -0
  609. data/spec/models/topic_name_spec.rb +36 -0
  610. data/spec/models/topic_response_spec.rb +60 -0
  611. data/spec/models/tracked_time_spec.rb +72 -0
  612. data/spec/models/transfer_repo_option_spec.rb +42 -0
  613. data/spec/models/update_file_options_spec.rb +90 -0
  614. data/spec/models/update_repo_avatar_option_spec.rb +36 -0
  615. data/spec/models/update_user_avatar_option_spec.rb +36 -0
  616. data/spec/models/update_variable_option_spec.rb +42 -0
  617. data/spec/models/user_heatmap_data_spec.rb +42 -0
  618. data/spec/models/user_search200_response_spec.rb +42 -0
  619. data/spec/models/user_settings_options_spec.rb +96 -0
  620. data/spec/models/user_settings_spec.rb +96 -0
  621. data/spec/models/user_spec.rb +168 -0
  622. data/spec/models/watch_info_spec.rb +66 -0
  623. data/spec/models/wiki_commit_list_spec.rb +42 -0
  624. data/spec/models/wiki_commit_spec.rb +54 -0
  625. data/spec/models/wiki_page_meta_data_spec.rb +54 -0
  626. data/spec/models/wiki_page_spec.rb +78 -0
  627. data/spec/spec_helper.rb +111 -0
  628. data/swagger.v1.json +26802 -0
  629. data/swagger.v1.patched.json +1 -0
  630. metadata +949 -0
@@ -0,0 +1,3898 @@
1
+ =begin
2
+ #Forgejo API
3
+
4
+ #This documentation describes the Forgejo API.
5
+
6
+ The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Forgejo
16
+ class OrganizationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a repository in an organization
23
+ # @param org [String] name of organization
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [CreateRepoOption] :body
26
+ # @return [Repository]
27
+ def create_org_repo(org, opts = {})
28
+ data, _status_code, _headers = create_org_repo_with_http_info(org, opts)
29
+ data
30
+ end
31
+
32
+ # Create a repository in an organization
33
+ # @param org [String] name of organization
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [CreateRepoOption] :body
36
+ # @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
37
+ def create_org_repo_with_http_info(org, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_org_repo ...'
40
+ end
41
+ # verify the required parameter 'org' is set
42
+ if @api_client.config.client_side_validation && org.nil?
43
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.create_org_repo"
44
+ end
45
+ # resource path
46
+ local_var_path = '/orgs/{org}/repos'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'Repository'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"OrganizationApi.create_org_repo",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: OrganizationApi#create_org_repo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Create a repository in an organization
91
+ # @param org [String] name of organization
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [CreateRepoOption] :body
94
+ # @return [Repository]
95
+ def create_org_repo_deprecated(org, opts = {})
96
+ data, _status_code, _headers = create_org_repo_deprecated_with_http_info(org, opts)
97
+ data
98
+ end
99
+
100
+ # Create a repository in an organization
101
+ # @param org [String] name of organization
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [CreateRepoOption] :body
104
+ # @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
105
+ def create_org_repo_deprecated_with_http_info(org, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_org_repo_deprecated ...'
108
+ end
109
+ # verify the required parameter 'org' is set
110
+ if @api_client.config.client_side_validation && org.nil?
111
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.create_org_repo_deprecated"
112
+ end
113
+ # resource path
114
+ local_var_path = '/org/{org}/repos'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'Repository'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"OrganizationApi.create_org_repo_deprecated",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: OrganizationApi#create_org_repo_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Create an org-level variable
159
+ # @param org [String] name of the organization
160
+ # @param variablename [String] name of the variable
161
+ # @param [Hash] opts the optional parameters
162
+ # @option opts [CreateVariableOption] :body
163
+ # @return [nil]
164
+ def create_org_variable(org, variablename, opts = {})
165
+ create_org_variable_with_http_info(org, variablename, opts)
166
+ nil
167
+ end
168
+
169
+ # Create an org-level variable
170
+ # @param org [String] name of the organization
171
+ # @param variablename [String] name of the variable
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [CreateVariableOption] :body
174
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
175
+ def create_org_variable_with_http_info(org, variablename, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_org_variable ...'
178
+ end
179
+ # verify the required parameter 'org' is set
180
+ if @api_client.config.client_side_validation && org.nil?
181
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.create_org_variable"
182
+ end
183
+ # verify the required parameter 'variablename' is set
184
+ if @api_client.config.client_side_validation && variablename.nil?
185
+ fail ArgumentError, "Missing the required parameter 'variablename' when calling OrganizationApi.create_org_variable"
186
+ end
187
+ # resource path
188
+ local_var_path = '/orgs/{org}/actions/variables/{variablename}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+
193
+ # header parameters
194
+ header_params = opts[:header_params] || {}
195
+ # HTTP header 'Content-Type'
196
+ content_type = @api_client.select_header_content_type(['application/json'])
197
+ if !content_type.nil?
198
+ header_params['Content-Type'] = content_type
199
+ end
200
+
201
+ # form parameters
202
+ form_params = opts[:form_params] || {}
203
+
204
+ # http body (model)
205
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
206
+
207
+ # return_type
208
+ return_type = opts[:debug_return_type]
209
+
210
+ # auth_names
211
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
212
+
213
+ new_options = opts.merge(
214
+ :operation => :"OrganizationApi.create_org_variable",
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => return_type
221
+ )
222
+
223
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: OrganizationApi#create_org_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # Delete a secret in an organization
231
+ # @param org [String] name of organization
232
+ # @param secretname [String] name of the secret
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [nil]
235
+ def delete_org_secret(org, secretname, opts = {})
236
+ delete_org_secret_with_http_info(org, secretname, opts)
237
+ nil
238
+ end
239
+
240
+ # Delete a secret in an organization
241
+ # @param org [String] name of organization
242
+ # @param secretname [String] name of the secret
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
245
+ def delete_org_secret_with_http_info(org, secretname, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_org_secret ...'
248
+ end
249
+ # verify the required parameter 'org' is set
250
+ if @api_client.config.client_side_validation && org.nil?
251
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.delete_org_secret"
252
+ end
253
+ # verify the required parameter 'secretname' is set
254
+ if @api_client.config.client_side_validation && secretname.nil?
255
+ fail ArgumentError, "Missing the required parameter 'secretname' when calling OrganizationApi.delete_org_secret"
256
+ end
257
+ # resource path
258
+ local_var_path = '/orgs/{org}/actions/secrets/{secretname}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'secretname' + '}', CGI.escape(secretname.to_s))
259
+
260
+ # query parameters
261
+ query_params = opts[:query_params] || {}
262
+
263
+ # header parameters
264
+ header_params = opts[:header_params] || {}
265
+
266
+ # form parameters
267
+ form_params = opts[:form_params] || {}
268
+
269
+ # http body (model)
270
+ post_body = opts[:debug_body]
271
+
272
+ # return_type
273
+ return_type = opts[:debug_return_type]
274
+
275
+ # auth_names
276
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
277
+
278
+ new_options = opts.merge(
279
+ :operation => :"OrganizationApi.delete_org_secret",
280
+ :header_params => header_params,
281
+ :query_params => query_params,
282
+ :form_params => form_params,
283
+ :body => post_body,
284
+ :auth_names => auth_names,
285
+ :return_type => return_type
286
+ )
287
+
288
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: OrganizationApi#delete_org_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+
295
+ # Delete an org-level variable
296
+ # @param org [String] name of the organization
297
+ # @param variablename [String] name of the variable
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [ActionVariable]
300
+ def delete_org_variable(org, variablename, opts = {})
301
+ data, _status_code, _headers = delete_org_variable_with_http_info(org, variablename, opts)
302
+ data
303
+ end
304
+
305
+ # Delete an org-level variable
306
+ # @param org [String] name of the organization
307
+ # @param variablename [String] name of the variable
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(ActionVariable, Integer, Hash)>] ActionVariable data, response status code and response headers
310
+ def delete_org_variable_with_http_info(org, variablename, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_org_variable ...'
313
+ end
314
+ # verify the required parameter 'org' is set
315
+ if @api_client.config.client_side_validation && org.nil?
316
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.delete_org_variable"
317
+ end
318
+ # verify the required parameter 'variablename' is set
319
+ if @api_client.config.client_side_validation && variablename.nil?
320
+ fail ArgumentError, "Missing the required parameter 'variablename' when calling OrganizationApi.delete_org_variable"
321
+ end
322
+ # resource path
323
+ local_var_path = '/orgs/{org}/actions/variables/{variablename}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body]
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type] || 'ActionVariable'
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"OrganizationApi.delete_org_variable",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: OrganizationApi#delete_org_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
362
+ # Get an org-level variable
363
+ # @param org [String] name of the organization
364
+ # @param variablename [String] name of the variable
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [ActionVariable]
367
+ def get_org_variable(org, variablename, opts = {})
368
+ data, _status_code, _headers = get_org_variable_with_http_info(org, variablename, opts)
369
+ data
370
+ end
371
+
372
+ # Get an org-level variable
373
+ # @param org [String] name of the organization
374
+ # @param variablename [String] name of the variable
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [Array<(ActionVariable, Integer, Hash)>] ActionVariable data, response status code and response headers
377
+ def get_org_variable_with_http_info(org, variablename, opts = {})
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_variable ...'
380
+ end
381
+ # verify the required parameter 'org' is set
382
+ if @api_client.config.client_side_validation && org.nil?
383
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.get_org_variable"
384
+ end
385
+ # verify the required parameter 'variablename' is set
386
+ if @api_client.config.client_side_validation && variablename.nil?
387
+ fail ArgumentError, "Missing the required parameter 'variablename' when calling OrganizationApi.get_org_variable"
388
+ end
389
+ # resource path
390
+ local_var_path = '/orgs/{org}/actions/variables/{variablename}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:debug_body]
405
+
406
+ # return_type
407
+ return_type = opts[:debug_return_type] || 'ActionVariable'
408
+
409
+ # auth_names
410
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
411
+
412
+ new_options = opts.merge(
413
+ :operation => :"OrganizationApi.get_org_variable",
414
+ :header_params => header_params,
415
+ :query_params => query_params,
416
+ :form_params => form_params,
417
+ :body => post_body,
418
+ :auth_names => auth_names,
419
+ :return_type => return_type
420
+ )
421
+
422
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "API called: OrganizationApi#get_org_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
425
+ end
426
+ return data, status_code, headers
427
+ end
428
+
429
+ # Get an org-level variables list
430
+ # @param org [String] name of the organization
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [Integer] :page page number of results to return (1-based)
433
+ # @option opts [Integer] :limit page size of results
434
+ # @return [Array<ActionVariable>]
435
+ def get_org_variables_list(org, opts = {})
436
+ data, _status_code, _headers = get_org_variables_list_with_http_info(org, opts)
437
+ data
438
+ end
439
+
440
+ # Get an org-level variables list
441
+ # @param org [String] name of the organization
442
+ # @param [Hash] opts the optional parameters
443
+ # @option opts [Integer] :page page number of results to return (1-based)
444
+ # @option opts [Integer] :limit page size of results
445
+ # @return [Array<(Array<ActionVariable>, Integer, Hash)>] Array<ActionVariable> data, response status code and response headers
446
+ def get_org_variables_list_with_http_info(org, opts = {})
447
+ if @api_client.config.debugging
448
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.get_org_variables_list ...'
449
+ end
450
+ # verify the required parameter 'org' is set
451
+ if @api_client.config.client_side_validation && org.nil?
452
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.get_org_variables_list"
453
+ end
454
+ # resource path
455
+ local_var_path = '/orgs/{org}/actions/variables'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
456
+
457
+ # query parameters
458
+ query_params = opts[:query_params] || {}
459
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
460
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
461
+
462
+ # header parameters
463
+ header_params = opts[:header_params] || {}
464
+ # HTTP header 'Accept' (if needed)
465
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
466
+
467
+ # form parameters
468
+ form_params = opts[:form_params] || {}
469
+
470
+ # http body (model)
471
+ post_body = opts[:debug_body]
472
+
473
+ # return_type
474
+ return_type = opts[:debug_return_type] || 'Array<ActionVariable>'
475
+
476
+ # auth_names
477
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
478
+
479
+ new_options = opts.merge(
480
+ :operation => :"OrganizationApi.get_org_variables_list",
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: OrganizationApi#get_org_variables_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
496
+ # Add a team member
497
+ # @param id [Integer] id of the team
498
+ # @param username [String] username of the user to add
499
+ # @param [Hash] opts the optional parameters
500
+ # @return [nil]
501
+ def org_add_team_member(id, username, opts = {})
502
+ org_add_team_member_with_http_info(id, username, opts)
503
+ nil
504
+ end
505
+
506
+ # Add a team member
507
+ # @param id [Integer] id of the team
508
+ # @param username [String] username of the user to add
509
+ # @param [Hash] opts the optional parameters
510
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
511
+ def org_add_team_member_with_http_info(id, username, opts = {})
512
+ if @api_client.config.debugging
513
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_add_team_member ...'
514
+ end
515
+ # verify the required parameter 'id' is set
516
+ if @api_client.config.client_side_validation && id.nil?
517
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_add_team_member"
518
+ end
519
+ # verify the required parameter 'username' is set
520
+ if @api_client.config.client_side_validation && username.nil?
521
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_add_team_member"
522
+ end
523
+ # resource path
524
+ local_var_path = '/teams/{id}/members/{username}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
525
+
526
+ # query parameters
527
+ query_params = opts[:query_params] || {}
528
+
529
+ # header parameters
530
+ header_params = opts[:header_params] || {}
531
+
532
+ # form parameters
533
+ form_params = opts[:form_params] || {}
534
+
535
+ # http body (model)
536
+ post_body = opts[:debug_body]
537
+
538
+ # return_type
539
+ return_type = opts[:debug_return_type]
540
+
541
+ # auth_names
542
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
543
+
544
+ new_options = opts.merge(
545
+ :operation => :"OrganizationApi.org_add_team_member",
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => return_type
552
+ )
553
+
554
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: OrganizationApi#org_add_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
560
+
561
+ # Add a repository to a team
562
+ # @param id [Integer] id of the team
563
+ # @param org [String] organization that owns the repo to add
564
+ # @param repo [String] name of the repo to add
565
+ # @param [Hash] opts the optional parameters
566
+ # @return [nil]
567
+ def org_add_team_repository(id, org, repo, opts = {})
568
+ org_add_team_repository_with_http_info(id, org, repo, opts)
569
+ nil
570
+ end
571
+
572
+ # Add a repository to a team
573
+ # @param id [Integer] id of the team
574
+ # @param org [String] organization that owns the repo to add
575
+ # @param repo [String] name of the repo to add
576
+ # @param [Hash] opts the optional parameters
577
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
578
+ def org_add_team_repository_with_http_info(id, org, repo, opts = {})
579
+ if @api_client.config.debugging
580
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_add_team_repository ...'
581
+ end
582
+ # verify the required parameter 'id' is set
583
+ if @api_client.config.client_side_validation && id.nil?
584
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_add_team_repository"
585
+ end
586
+ # verify the required parameter 'org' is set
587
+ if @api_client.config.client_side_validation && org.nil?
588
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_add_team_repository"
589
+ end
590
+ # verify the required parameter 'repo' is set
591
+ if @api_client.config.client_side_validation && repo.nil?
592
+ fail ArgumentError, "Missing the required parameter 'repo' when calling OrganizationApi.org_add_team_repository"
593
+ end
594
+ # resource path
595
+ local_var_path = '/teams/{id}/repos/{org}/{repo}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
596
+
597
+ # query parameters
598
+ query_params = opts[:query_params] || {}
599
+
600
+ # header parameters
601
+ header_params = opts[:header_params] || {}
602
+
603
+ # form parameters
604
+ form_params = opts[:form_params] || {}
605
+
606
+ # http body (model)
607
+ post_body = opts[:debug_body]
608
+
609
+ # return_type
610
+ return_type = opts[:debug_return_type]
611
+
612
+ # auth_names
613
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
614
+
615
+ new_options = opts.merge(
616
+ :operation => :"OrganizationApi.org_add_team_repository",
617
+ :header_params => header_params,
618
+ :query_params => query_params,
619
+ :form_params => form_params,
620
+ :body => post_body,
621
+ :auth_names => auth_names,
622
+ :return_type => return_type
623
+ )
624
+
625
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug "API called: OrganizationApi#org_add_team_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
628
+ end
629
+ return data, status_code, headers
630
+ end
631
+
632
+ # Blocks a user from the organization
633
+ # @param org [String] name of the org
634
+ # @param username [String] username of the user
635
+ # @param [Hash] opts the optional parameters
636
+ # @return [nil]
637
+ def org_block_user(org, username, opts = {})
638
+ org_block_user_with_http_info(org, username, opts)
639
+ nil
640
+ end
641
+
642
+ # Blocks a user from the organization
643
+ # @param org [String] name of the org
644
+ # @param username [String] username of the user
645
+ # @param [Hash] opts the optional parameters
646
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
647
+ def org_block_user_with_http_info(org, username, opts = {})
648
+ if @api_client.config.debugging
649
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_block_user ...'
650
+ end
651
+ # verify the required parameter 'org' is set
652
+ if @api_client.config.client_side_validation && org.nil?
653
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_block_user"
654
+ end
655
+ # verify the required parameter 'username' is set
656
+ if @api_client.config.client_side_validation && username.nil?
657
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_block_user"
658
+ end
659
+ # resource path
660
+ local_var_path = '/orgs/{org}/block/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
661
+
662
+ # query parameters
663
+ query_params = opts[:query_params] || {}
664
+
665
+ # header parameters
666
+ header_params = opts[:header_params] || {}
667
+
668
+ # form parameters
669
+ form_params = opts[:form_params] || {}
670
+
671
+ # http body (model)
672
+ post_body = opts[:debug_body]
673
+
674
+ # return_type
675
+ return_type = opts[:debug_return_type]
676
+
677
+ # auth_names
678
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
679
+
680
+ new_options = opts.merge(
681
+ :operation => :"OrganizationApi.org_block_user",
682
+ :header_params => header_params,
683
+ :query_params => query_params,
684
+ :form_params => form_params,
685
+ :body => post_body,
686
+ :auth_names => auth_names,
687
+ :return_type => return_type
688
+ )
689
+
690
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug "API called: OrganizationApi#org_block_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
697
+ # Conceal a user's membership
698
+ # @param org [String] name of the organization
699
+ # @param username [String] username of the user
700
+ # @param [Hash] opts the optional parameters
701
+ # @return [nil]
702
+ def org_conceal_member(org, username, opts = {})
703
+ org_conceal_member_with_http_info(org, username, opts)
704
+ nil
705
+ end
706
+
707
+ # Conceal a user&#39;s membership
708
+ # @param org [String] name of the organization
709
+ # @param username [String] username of the user
710
+ # @param [Hash] opts the optional parameters
711
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
712
+ def org_conceal_member_with_http_info(org, username, opts = {})
713
+ if @api_client.config.debugging
714
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_conceal_member ...'
715
+ end
716
+ # verify the required parameter 'org' is set
717
+ if @api_client.config.client_side_validation && org.nil?
718
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_conceal_member"
719
+ end
720
+ # verify the required parameter 'username' is set
721
+ if @api_client.config.client_side_validation && username.nil?
722
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_conceal_member"
723
+ end
724
+ # resource path
725
+ local_var_path = '/orgs/{org}/public_members/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
726
+
727
+ # query parameters
728
+ query_params = opts[:query_params] || {}
729
+
730
+ # header parameters
731
+ header_params = opts[:header_params] || {}
732
+
733
+ # form parameters
734
+ form_params = opts[:form_params] || {}
735
+
736
+ # http body (model)
737
+ post_body = opts[:debug_body]
738
+
739
+ # return_type
740
+ return_type = opts[:debug_return_type]
741
+
742
+ # auth_names
743
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
744
+
745
+ new_options = opts.merge(
746
+ :operation => :"OrganizationApi.org_conceal_member",
747
+ :header_params => header_params,
748
+ :query_params => query_params,
749
+ :form_params => form_params,
750
+ :body => post_body,
751
+ :auth_names => auth_names,
752
+ :return_type => return_type
753
+ )
754
+
755
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
756
+ if @api_client.config.debugging
757
+ @api_client.config.logger.debug "API called: OrganizationApi#org_conceal_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
758
+ end
759
+ return data, status_code, headers
760
+ end
761
+
762
+ # Create an organization
763
+ # @param organization [CreateOrgOption]
764
+ # @param [Hash] opts the optional parameters
765
+ # @return [Organization]
766
+ def org_create(organization, opts = {})
767
+ data, _status_code, _headers = org_create_with_http_info(organization, opts)
768
+ data
769
+ end
770
+
771
+ # Create an organization
772
+ # @param organization [CreateOrgOption]
773
+ # @param [Hash] opts the optional parameters
774
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
775
+ def org_create_with_http_info(organization, opts = {})
776
+ if @api_client.config.debugging
777
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_create ...'
778
+ end
779
+ # verify the required parameter 'organization' is set
780
+ if @api_client.config.client_side_validation && organization.nil?
781
+ fail ArgumentError, "Missing the required parameter 'organization' when calling OrganizationApi.org_create"
782
+ end
783
+ # resource path
784
+ local_var_path = '/orgs'
785
+
786
+ # query parameters
787
+ query_params = opts[:query_params] || {}
788
+
789
+ # header parameters
790
+ header_params = opts[:header_params] || {}
791
+ # HTTP header 'Accept' (if needed)
792
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
793
+ # HTTP header 'Content-Type'
794
+ content_type = @api_client.select_header_content_type(['application/json'])
795
+ if !content_type.nil?
796
+ header_params['Content-Type'] = content_type
797
+ end
798
+
799
+ # form parameters
800
+ form_params = opts[:form_params] || {}
801
+
802
+ # http body (model)
803
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization)
804
+
805
+ # return_type
806
+ return_type = opts[:debug_return_type] || 'Organization'
807
+
808
+ # auth_names
809
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
810
+
811
+ new_options = opts.merge(
812
+ :operation => :"OrganizationApi.org_create",
813
+ :header_params => header_params,
814
+ :query_params => query_params,
815
+ :form_params => form_params,
816
+ :body => post_body,
817
+ :auth_names => auth_names,
818
+ :return_type => return_type
819
+ )
820
+
821
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
822
+ if @api_client.config.debugging
823
+ @api_client.config.logger.debug "API called: OrganizationApi#org_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
824
+ end
825
+ return data, status_code, headers
826
+ end
827
+
828
+ # Create a hook
829
+ # @param org [String] name of the organization
830
+ # @param body [CreateHookOption]
831
+ # @param [Hash] opts the optional parameters
832
+ # @return [Hook]
833
+ def org_create_hook(org, body, opts = {})
834
+ data, _status_code, _headers = org_create_hook_with_http_info(org, body, opts)
835
+ data
836
+ end
837
+
838
+ # Create a hook
839
+ # @param org [String] name of the organization
840
+ # @param body [CreateHookOption]
841
+ # @param [Hash] opts the optional parameters
842
+ # @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
843
+ def org_create_hook_with_http_info(org, body, opts = {})
844
+ if @api_client.config.debugging
845
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_create_hook ...'
846
+ end
847
+ # verify the required parameter 'org' is set
848
+ if @api_client.config.client_side_validation && org.nil?
849
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_create_hook"
850
+ end
851
+ # verify the required parameter 'body' is set
852
+ if @api_client.config.client_side_validation && body.nil?
853
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.org_create_hook"
854
+ end
855
+ # resource path
856
+ local_var_path = '/orgs/{org}/hooks'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
857
+
858
+ # query parameters
859
+ query_params = opts[:query_params] || {}
860
+
861
+ # header parameters
862
+ header_params = opts[:header_params] || {}
863
+ # HTTP header 'Accept' (if needed)
864
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
865
+ # HTTP header 'Content-Type'
866
+ content_type = @api_client.select_header_content_type(['application/json'])
867
+ if !content_type.nil?
868
+ header_params['Content-Type'] = content_type
869
+ end
870
+
871
+ # form parameters
872
+ form_params = opts[:form_params] || {}
873
+
874
+ # http body (model)
875
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
876
+
877
+ # return_type
878
+ return_type = opts[:debug_return_type] || 'Hook'
879
+
880
+ # auth_names
881
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
882
+
883
+ new_options = opts.merge(
884
+ :operation => :"OrganizationApi.org_create_hook",
885
+ :header_params => header_params,
886
+ :query_params => query_params,
887
+ :form_params => form_params,
888
+ :body => post_body,
889
+ :auth_names => auth_names,
890
+ :return_type => return_type
891
+ )
892
+
893
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
894
+ if @api_client.config.debugging
895
+ @api_client.config.logger.debug "API called: OrganizationApi#org_create_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
896
+ end
897
+ return data, status_code, headers
898
+ end
899
+
900
+ # Create a label for an organization
901
+ # @param org [String] name of the organization
902
+ # @param [Hash] opts the optional parameters
903
+ # @option opts [CreateLabelOption] :body
904
+ # @return [Label]
905
+ def org_create_label(org, opts = {})
906
+ data, _status_code, _headers = org_create_label_with_http_info(org, opts)
907
+ data
908
+ end
909
+
910
+ # Create a label for an organization
911
+ # @param org [String] name of the organization
912
+ # @param [Hash] opts the optional parameters
913
+ # @option opts [CreateLabelOption] :body
914
+ # @return [Array<(Label, Integer, Hash)>] Label data, response status code and response headers
915
+ def org_create_label_with_http_info(org, opts = {})
916
+ if @api_client.config.debugging
917
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_create_label ...'
918
+ end
919
+ # verify the required parameter 'org' is set
920
+ if @api_client.config.client_side_validation && org.nil?
921
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_create_label"
922
+ end
923
+ # resource path
924
+ local_var_path = '/orgs/{org}/labels'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
925
+
926
+ # query parameters
927
+ query_params = opts[:query_params] || {}
928
+
929
+ # header parameters
930
+ header_params = opts[:header_params] || {}
931
+ # HTTP header 'Accept' (if needed)
932
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
933
+ # HTTP header 'Content-Type'
934
+ content_type = @api_client.select_header_content_type(['application/json'])
935
+ if !content_type.nil?
936
+ header_params['Content-Type'] = content_type
937
+ end
938
+
939
+ # form parameters
940
+ form_params = opts[:form_params] || {}
941
+
942
+ # http body (model)
943
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
944
+
945
+ # return_type
946
+ return_type = opts[:debug_return_type] || 'Label'
947
+
948
+ # auth_names
949
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
950
+
951
+ new_options = opts.merge(
952
+ :operation => :"OrganizationApi.org_create_label",
953
+ :header_params => header_params,
954
+ :query_params => query_params,
955
+ :form_params => form_params,
956
+ :body => post_body,
957
+ :auth_names => auth_names,
958
+ :return_type => return_type
959
+ )
960
+
961
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug "API called: OrganizationApi#org_create_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
964
+ end
965
+ return data, status_code, headers
966
+ end
967
+
968
+ # Create a team
969
+ # @param org [String] name of the organization
970
+ # @param [Hash] opts the optional parameters
971
+ # @option opts [CreateTeamOption] :body
972
+ # @return [Team]
973
+ def org_create_team(org, opts = {})
974
+ data, _status_code, _headers = org_create_team_with_http_info(org, opts)
975
+ data
976
+ end
977
+
978
+ # Create a team
979
+ # @param org [String] name of the organization
980
+ # @param [Hash] opts the optional parameters
981
+ # @option opts [CreateTeamOption] :body
982
+ # @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
983
+ def org_create_team_with_http_info(org, opts = {})
984
+ if @api_client.config.debugging
985
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_create_team ...'
986
+ end
987
+ # verify the required parameter 'org' is set
988
+ if @api_client.config.client_side_validation && org.nil?
989
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_create_team"
990
+ end
991
+ # resource path
992
+ local_var_path = '/orgs/{org}/teams'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
993
+
994
+ # query parameters
995
+ query_params = opts[:query_params] || {}
996
+
997
+ # header parameters
998
+ header_params = opts[:header_params] || {}
999
+ # HTTP header 'Accept' (if needed)
1000
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1001
+ # HTTP header 'Content-Type'
1002
+ content_type = @api_client.select_header_content_type(['application/json'])
1003
+ if !content_type.nil?
1004
+ header_params['Content-Type'] = content_type
1005
+ end
1006
+
1007
+ # form parameters
1008
+ form_params = opts[:form_params] || {}
1009
+
1010
+ # http body (model)
1011
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
1012
+
1013
+ # return_type
1014
+ return_type = opts[:debug_return_type] || 'Team'
1015
+
1016
+ # auth_names
1017
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1018
+
1019
+ new_options = opts.merge(
1020
+ :operation => :"OrganizationApi.org_create_team",
1021
+ :header_params => header_params,
1022
+ :query_params => query_params,
1023
+ :form_params => form_params,
1024
+ :body => post_body,
1025
+ :auth_names => auth_names,
1026
+ :return_type => return_type
1027
+ )
1028
+
1029
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1030
+ if @api_client.config.debugging
1031
+ @api_client.config.logger.debug "API called: OrganizationApi#org_create_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
+ end
1033
+ return data, status_code, headers
1034
+ end
1035
+
1036
+ # Delete an organization
1037
+ # @param org [String] organization that is to be deleted
1038
+ # @param [Hash] opts the optional parameters
1039
+ # @return [nil]
1040
+ def org_delete(org, opts = {})
1041
+ org_delete_with_http_info(org, opts)
1042
+ nil
1043
+ end
1044
+
1045
+ # Delete an organization
1046
+ # @param org [String] organization that is to be deleted
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1049
+ def org_delete_with_http_info(org, opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete ...'
1052
+ end
1053
+ # verify the required parameter 'org' is set
1054
+ if @api_client.config.client_side_validation && org.nil?
1055
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_delete"
1056
+ end
1057
+ # resource path
1058
+ local_var_path = '/orgs/{org}'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
1059
+
1060
+ # query parameters
1061
+ query_params = opts[:query_params] || {}
1062
+
1063
+ # header parameters
1064
+ header_params = opts[:header_params] || {}
1065
+
1066
+ # form parameters
1067
+ form_params = opts[:form_params] || {}
1068
+
1069
+ # http body (model)
1070
+ post_body = opts[:debug_body]
1071
+
1072
+ # return_type
1073
+ return_type = opts[:debug_return_type]
1074
+
1075
+ # auth_names
1076
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1077
+
1078
+ new_options = opts.merge(
1079
+ :operation => :"OrganizationApi.org_delete",
1080
+ :header_params => header_params,
1081
+ :query_params => query_params,
1082
+ :form_params => form_params,
1083
+ :body => post_body,
1084
+ :auth_names => auth_names,
1085
+ :return_type => return_type
1086
+ )
1087
+
1088
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1089
+ if @api_client.config.debugging
1090
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1091
+ end
1092
+ return data, status_code, headers
1093
+ end
1094
+
1095
+ # Delete Avatar
1096
+ # @param org [String] name of the organization
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @return [nil]
1099
+ def org_delete_avatar(org, opts = {})
1100
+ org_delete_avatar_with_http_info(org, opts)
1101
+ nil
1102
+ end
1103
+
1104
+ # Delete Avatar
1105
+ # @param org [String] name of the organization
1106
+ # @param [Hash] opts the optional parameters
1107
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1108
+ def org_delete_avatar_with_http_info(org, opts = {})
1109
+ if @api_client.config.debugging
1110
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete_avatar ...'
1111
+ end
1112
+ # verify the required parameter 'org' is set
1113
+ if @api_client.config.client_side_validation && org.nil?
1114
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_delete_avatar"
1115
+ end
1116
+ # resource path
1117
+ local_var_path = '/orgs/{org}/avatar'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
1118
+
1119
+ # query parameters
1120
+ query_params = opts[:query_params] || {}
1121
+
1122
+ # header parameters
1123
+ header_params = opts[:header_params] || {}
1124
+
1125
+ # form parameters
1126
+ form_params = opts[:form_params] || {}
1127
+
1128
+ # http body (model)
1129
+ post_body = opts[:debug_body]
1130
+
1131
+ # return_type
1132
+ return_type = opts[:debug_return_type]
1133
+
1134
+ # auth_names
1135
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1136
+
1137
+ new_options = opts.merge(
1138
+ :operation => :"OrganizationApi.org_delete_avatar",
1139
+ :header_params => header_params,
1140
+ :query_params => query_params,
1141
+ :form_params => form_params,
1142
+ :body => post_body,
1143
+ :auth_names => auth_names,
1144
+ :return_type => return_type
1145
+ )
1146
+
1147
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1148
+ if @api_client.config.debugging
1149
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete_avatar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1150
+ end
1151
+ return data, status_code, headers
1152
+ end
1153
+
1154
+ # Delete a hook
1155
+ # @param org [String] name of the organization
1156
+ # @param id [Integer] id of the hook to delete
1157
+ # @param [Hash] opts the optional parameters
1158
+ # @return [nil]
1159
+ def org_delete_hook(org, id, opts = {})
1160
+ org_delete_hook_with_http_info(org, id, opts)
1161
+ nil
1162
+ end
1163
+
1164
+ # Delete a hook
1165
+ # @param org [String] name of the organization
1166
+ # @param id [Integer] id of the hook to delete
1167
+ # @param [Hash] opts the optional parameters
1168
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1169
+ def org_delete_hook_with_http_info(org, id, opts = {})
1170
+ if @api_client.config.debugging
1171
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete_hook ...'
1172
+ end
1173
+ # verify the required parameter 'org' is set
1174
+ if @api_client.config.client_side_validation && org.nil?
1175
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_delete_hook"
1176
+ end
1177
+ # verify the required parameter 'id' is set
1178
+ if @api_client.config.client_side_validation && id.nil?
1179
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_delete_hook"
1180
+ end
1181
+ # resource path
1182
+ local_var_path = '/orgs/{org}/hooks/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1183
+
1184
+ # query parameters
1185
+ query_params = opts[:query_params] || {}
1186
+
1187
+ # header parameters
1188
+ header_params = opts[:header_params] || {}
1189
+
1190
+ # form parameters
1191
+ form_params = opts[:form_params] || {}
1192
+
1193
+ # http body (model)
1194
+ post_body = opts[:debug_body]
1195
+
1196
+ # return_type
1197
+ return_type = opts[:debug_return_type]
1198
+
1199
+ # auth_names
1200
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1201
+
1202
+ new_options = opts.merge(
1203
+ :operation => :"OrganizationApi.org_delete_hook",
1204
+ :header_params => header_params,
1205
+ :query_params => query_params,
1206
+ :form_params => form_params,
1207
+ :body => post_body,
1208
+ :auth_names => auth_names,
1209
+ :return_type => return_type
1210
+ )
1211
+
1212
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1213
+ if @api_client.config.debugging
1214
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1215
+ end
1216
+ return data, status_code, headers
1217
+ end
1218
+
1219
+ # Delete a label
1220
+ # @param org [String] name of the organization
1221
+ # @param id [Integer] id of the label to delete
1222
+ # @param [Hash] opts the optional parameters
1223
+ # @return [nil]
1224
+ def org_delete_label(org, id, opts = {})
1225
+ org_delete_label_with_http_info(org, id, opts)
1226
+ nil
1227
+ end
1228
+
1229
+ # Delete a label
1230
+ # @param org [String] name of the organization
1231
+ # @param id [Integer] id of the label to delete
1232
+ # @param [Hash] opts the optional parameters
1233
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1234
+ def org_delete_label_with_http_info(org, id, opts = {})
1235
+ if @api_client.config.debugging
1236
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete_label ...'
1237
+ end
1238
+ # verify the required parameter 'org' is set
1239
+ if @api_client.config.client_side_validation && org.nil?
1240
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_delete_label"
1241
+ end
1242
+ # verify the required parameter 'id' is set
1243
+ if @api_client.config.client_side_validation && id.nil?
1244
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_delete_label"
1245
+ end
1246
+ # resource path
1247
+ local_var_path = '/orgs/{org}/labels/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1248
+
1249
+ # query parameters
1250
+ query_params = opts[:query_params] || {}
1251
+
1252
+ # header parameters
1253
+ header_params = opts[:header_params] || {}
1254
+
1255
+ # form parameters
1256
+ form_params = opts[:form_params] || {}
1257
+
1258
+ # http body (model)
1259
+ post_body = opts[:debug_body]
1260
+
1261
+ # return_type
1262
+ return_type = opts[:debug_return_type]
1263
+
1264
+ # auth_names
1265
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1266
+
1267
+ new_options = opts.merge(
1268
+ :operation => :"OrganizationApi.org_delete_label",
1269
+ :header_params => header_params,
1270
+ :query_params => query_params,
1271
+ :form_params => form_params,
1272
+ :body => post_body,
1273
+ :auth_names => auth_names,
1274
+ :return_type => return_type
1275
+ )
1276
+
1277
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1278
+ if @api_client.config.debugging
1279
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1280
+ end
1281
+ return data, status_code, headers
1282
+ end
1283
+
1284
+ # Remove a member from an organization
1285
+ # @param org [String] name of the organization
1286
+ # @param username [String] username of the user
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [nil]
1289
+ def org_delete_member(org, username, opts = {})
1290
+ org_delete_member_with_http_info(org, username, opts)
1291
+ nil
1292
+ end
1293
+
1294
+ # Remove a member from an organization
1295
+ # @param org [String] name of the organization
1296
+ # @param username [String] username of the user
1297
+ # @param [Hash] opts the optional parameters
1298
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1299
+ def org_delete_member_with_http_info(org, username, opts = {})
1300
+ if @api_client.config.debugging
1301
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete_member ...'
1302
+ end
1303
+ # verify the required parameter 'org' is set
1304
+ if @api_client.config.client_side_validation && org.nil?
1305
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_delete_member"
1306
+ end
1307
+ # verify the required parameter 'username' is set
1308
+ if @api_client.config.client_side_validation && username.nil?
1309
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_delete_member"
1310
+ end
1311
+ # resource path
1312
+ local_var_path = '/orgs/{org}/members/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
1313
+
1314
+ # query parameters
1315
+ query_params = opts[:query_params] || {}
1316
+
1317
+ # header parameters
1318
+ header_params = opts[:header_params] || {}
1319
+
1320
+ # form parameters
1321
+ form_params = opts[:form_params] || {}
1322
+
1323
+ # http body (model)
1324
+ post_body = opts[:debug_body]
1325
+
1326
+ # return_type
1327
+ return_type = opts[:debug_return_type]
1328
+
1329
+ # auth_names
1330
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1331
+
1332
+ new_options = opts.merge(
1333
+ :operation => :"OrganizationApi.org_delete_member",
1334
+ :header_params => header_params,
1335
+ :query_params => query_params,
1336
+ :form_params => form_params,
1337
+ :body => post_body,
1338
+ :auth_names => auth_names,
1339
+ :return_type => return_type
1340
+ )
1341
+
1342
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1343
+ if @api_client.config.debugging
1344
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1345
+ end
1346
+ return data, status_code, headers
1347
+ end
1348
+
1349
+ # Delete a team
1350
+ # @param id [Integer] id of the team to delete
1351
+ # @param [Hash] opts the optional parameters
1352
+ # @return [nil]
1353
+ def org_delete_team(id, opts = {})
1354
+ org_delete_team_with_http_info(id, opts)
1355
+ nil
1356
+ end
1357
+
1358
+ # Delete a team
1359
+ # @param id [Integer] id of the team to delete
1360
+ # @param [Hash] opts the optional parameters
1361
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1362
+ def org_delete_team_with_http_info(id, opts = {})
1363
+ if @api_client.config.debugging
1364
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_delete_team ...'
1365
+ end
1366
+ # verify the required parameter 'id' is set
1367
+ if @api_client.config.client_side_validation && id.nil?
1368
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_delete_team"
1369
+ end
1370
+ # resource path
1371
+ local_var_path = '/teams/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1372
+
1373
+ # query parameters
1374
+ query_params = opts[:query_params] || {}
1375
+
1376
+ # header parameters
1377
+ header_params = opts[:header_params] || {}
1378
+
1379
+ # form parameters
1380
+ form_params = opts[:form_params] || {}
1381
+
1382
+ # http body (model)
1383
+ post_body = opts[:debug_body]
1384
+
1385
+ # return_type
1386
+ return_type = opts[:debug_return_type]
1387
+
1388
+ # auth_names
1389
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1390
+
1391
+ new_options = opts.merge(
1392
+ :operation => :"OrganizationApi.org_delete_team",
1393
+ :header_params => header_params,
1394
+ :query_params => query_params,
1395
+ :form_params => form_params,
1396
+ :body => post_body,
1397
+ :auth_names => auth_names,
1398
+ :return_type => return_type
1399
+ )
1400
+
1401
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1402
+ if @api_client.config.debugging
1403
+ @api_client.config.logger.debug "API called: OrganizationApi#org_delete_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1404
+ end
1405
+ return data, status_code, headers
1406
+ end
1407
+
1408
+ # Edit an organization
1409
+ # @param org [String] name of the organization to edit
1410
+ # @param body [EditOrgOption]
1411
+ # @param [Hash] opts the optional parameters
1412
+ # @return [Organization]
1413
+ def org_edit(org, body, opts = {})
1414
+ data, _status_code, _headers = org_edit_with_http_info(org, body, opts)
1415
+ data
1416
+ end
1417
+
1418
+ # Edit an organization
1419
+ # @param org [String] name of the organization to edit
1420
+ # @param body [EditOrgOption]
1421
+ # @param [Hash] opts the optional parameters
1422
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
1423
+ def org_edit_with_http_info(org, body, opts = {})
1424
+ if @api_client.config.debugging
1425
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_edit ...'
1426
+ end
1427
+ # verify the required parameter 'org' is set
1428
+ if @api_client.config.client_side_validation && org.nil?
1429
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_edit"
1430
+ end
1431
+ # verify the required parameter 'body' is set
1432
+ if @api_client.config.client_side_validation && body.nil?
1433
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.org_edit"
1434
+ end
1435
+ # resource path
1436
+ local_var_path = '/orgs/{org}'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
1437
+
1438
+ # query parameters
1439
+ query_params = opts[:query_params] || {}
1440
+
1441
+ # header parameters
1442
+ header_params = opts[:header_params] || {}
1443
+ # HTTP header 'Accept' (if needed)
1444
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1445
+ # HTTP header 'Content-Type'
1446
+ content_type = @api_client.select_header_content_type(['application/json'])
1447
+ if !content_type.nil?
1448
+ header_params['Content-Type'] = content_type
1449
+ end
1450
+
1451
+ # form parameters
1452
+ form_params = opts[:form_params] || {}
1453
+
1454
+ # http body (model)
1455
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1456
+
1457
+ # return_type
1458
+ return_type = opts[:debug_return_type] || 'Organization'
1459
+
1460
+ # auth_names
1461
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1462
+
1463
+ new_options = opts.merge(
1464
+ :operation => :"OrganizationApi.org_edit",
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names,
1470
+ :return_type => return_type
1471
+ )
1472
+
1473
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1474
+ if @api_client.config.debugging
1475
+ @api_client.config.logger.debug "API called: OrganizationApi#org_edit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1476
+ end
1477
+ return data, status_code, headers
1478
+ end
1479
+
1480
+ # Update a hook
1481
+ # @param org [String] name of the organization
1482
+ # @param id [Integer] id of the hook to update
1483
+ # @param [Hash] opts the optional parameters
1484
+ # @option opts [EditHookOption] :body
1485
+ # @return [Hook]
1486
+ def org_edit_hook(org, id, opts = {})
1487
+ data, _status_code, _headers = org_edit_hook_with_http_info(org, id, opts)
1488
+ data
1489
+ end
1490
+
1491
+ # Update a hook
1492
+ # @param org [String] name of the organization
1493
+ # @param id [Integer] id of the hook to update
1494
+ # @param [Hash] opts the optional parameters
1495
+ # @option opts [EditHookOption] :body
1496
+ # @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
1497
+ def org_edit_hook_with_http_info(org, id, opts = {})
1498
+ if @api_client.config.debugging
1499
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_edit_hook ...'
1500
+ end
1501
+ # verify the required parameter 'org' is set
1502
+ if @api_client.config.client_side_validation && org.nil?
1503
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_edit_hook"
1504
+ end
1505
+ # verify the required parameter 'id' is set
1506
+ if @api_client.config.client_side_validation && id.nil?
1507
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_edit_hook"
1508
+ end
1509
+ # resource path
1510
+ local_var_path = '/orgs/{org}/hooks/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1511
+
1512
+ # query parameters
1513
+ query_params = opts[:query_params] || {}
1514
+
1515
+ # header parameters
1516
+ header_params = opts[:header_params] || {}
1517
+ # HTTP header 'Accept' (if needed)
1518
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1519
+ # HTTP header 'Content-Type'
1520
+ content_type = @api_client.select_header_content_type(['application/json'])
1521
+ if !content_type.nil?
1522
+ header_params['Content-Type'] = content_type
1523
+ end
1524
+
1525
+ # form parameters
1526
+ form_params = opts[:form_params] || {}
1527
+
1528
+ # http body (model)
1529
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
1530
+
1531
+ # return_type
1532
+ return_type = opts[:debug_return_type] || 'Hook'
1533
+
1534
+ # auth_names
1535
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1536
+
1537
+ new_options = opts.merge(
1538
+ :operation => :"OrganizationApi.org_edit_hook",
1539
+ :header_params => header_params,
1540
+ :query_params => query_params,
1541
+ :form_params => form_params,
1542
+ :body => post_body,
1543
+ :auth_names => auth_names,
1544
+ :return_type => return_type
1545
+ )
1546
+
1547
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1548
+ if @api_client.config.debugging
1549
+ @api_client.config.logger.debug "API called: OrganizationApi#org_edit_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1550
+ end
1551
+ return data, status_code, headers
1552
+ end
1553
+
1554
+ # Update a label
1555
+ # @param org [String] name of the organization
1556
+ # @param id [Integer] id of the label to edit
1557
+ # @param [Hash] opts the optional parameters
1558
+ # @option opts [EditLabelOption] :body
1559
+ # @return [Label]
1560
+ def org_edit_label(org, id, opts = {})
1561
+ data, _status_code, _headers = org_edit_label_with_http_info(org, id, opts)
1562
+ data
1563
+ end
1564
+
1565
+ # Update a label
1566
+ # @param org [String] name of the organization
1567
+ # @param id [Integer] id of the label to edit
1568
+ # @param [Hash] opts the optional parameters
1569
+ # @option opts [EditLabelOption] :body
1570
+ # @return [Array<(Label, Integer, Hash)>] Label data, response status code and response headers
1571
+ def org_edit_label_with_http_info(org, id, opts = {})
1572
+ if @api_client.config.debugging
1573
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_edit_label ...'
1574
+ end
1575
+ # verify the required parameter 'org' is set
1576
+ if @api_client.config.client_side_validation && org.nil?
1577
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_edit_label"
1578
+ end
1579
+ # verify the required parameter 'id' is set
1580
+ if @api_client.config.client_side_validation && id.nil?
1581
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_edit_label"
1582
+ end
1583
+ # resource path
1584
+ local_var_path = '/orgs/{org}/labels/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1585
+
1586
+ # query parameters
1587
+ query_params = opts[:query_params] || {}
1588
+
1589
+ # header parameters
1590
+ header_params = opts[:header_params] || {}
1591
+ # HTTP header 'Accept' (if needed)
1592
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1593
+ # HTTP header 'Content-Type'
1594
+ content_type = @api_client.select_header_content_type(['application/json'])
1595
+ if !content_type.nil?
1596
+ header_params['Content-Type'] = content_type
1597
+ end
1598
+
1599
+ # form parameters
1600
+ form_params = opts[:form_params] || {}
1601
+
1602
+ # http body (model)
1603
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
1604
+
1605
+ # return_type
1606
+ return_type = opts[:debug_return_type] || 'Label'
1607
+
1608
+ # auth_names
1609
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1610
+
1611
+ new_options = opts.merge(
1612
+ :operation => :"OrganizationApi.org_edit_label",
1613
+ :header_params => header_params,
1614
+ :query_params => query_params,
1615
+ :form_params => form_params,
1616
+ :body => post_body,
1617
+ :auth_names => auth_names,
1618
+ :return_type => return_type
1619
+ )
1620
+
1621
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1622
+ if @api_client.config.debugging
1623
+ @api_client.config.logger.debug "API called: OrganizationApi#org_edit_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1624
+ end
1625
+ return data, status_code, headers
1626
+ end
1627
+
1628
+ # Edit a team
1629
+ # @param id [Integer] id of the team to edit
1630
+ # @param [Hash] opts the optional parameters
1631
+ # @option opts [EditTeamOption] :body
1632
+ # @return [Team]
1633
+ def org_edit_team(id, opts = {})
1634
+ data, _status_code, _headers = org_edit_team_with_http_info(id, opts)
1635
+ data
1636
+ end
1637
+
1638
+ # Edit a team
1639
+ # @param id [Integer] id of the team to edit
1640
+ # @param [Hash] opts the optional parameters
1641
+ # @option opts [EditTeamOption] :body
1642
+ # @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
1643
+ def org_edit_team_with_http_info(id, opts = {})
1644
+ if @api_client.config.debugging
1645
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_edit_team ...'
1646
+ end
1647
+ # verify the required parameter 'id' is set
1648
+ if @api_client.config.client_side_validation && id.nil?
1649
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_edit_team"
1650
+ end
1651
+ # resource path
1652
+ local_var_path = '/teams/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1653
+
1654
+ # query parameters
1655
+ query_params = opts[:query_params] || {}
1656
+
1657
+ # header parameters
1658
+ header_params = opts[:header_params] || {}
1659
+ # HTTP header 'Accept' (if needed)
1660
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1661
+ # HTTP header 'Content-Type'
1662
+ content_type = @api_client.select_header_content_type(['application/json'])
1663
+ if !content_type.nil?
1664
+ header_params['Content-Type'] = content_type
1665
+ end
1666
+
1667
+ # form parameters
1668
+ form_params = opts[:form_params] || {}
1669
+
1670
+ # http body (model)
1671
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
1672
+
1673
+ # return_type
1674
+ return_type = opts[:debug_return_type] || 'Team'
1675
+
1676
+ # auth_names
1677
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1678
+
1679
+ new_options = opts.merge(
1680
+ :operation => :"OrganizationApi.org_edit_team",
1681
+ :header_params => header_params,
1682
+ :query_params => query_params,
1683
+ :form_params => form_params,
1684
+ :body => post_body,
1685
+ :auth_names => auth_names,
1686
+ :return_type => return_type
1687
+ )
1688
+
1689
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1690
+ if @api_client.config.debugging
1691
+ @api_client.config.logger.debug "API called: OrganizationApi#org_edit_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1692
+ end
1693
+ return data, status_code, headers
1694
+ end
1695
+
1696
+ # Get an organization
1697
+ # @param org [String] name of the organization to get
1698
+ # @param [Hash] opts the optional parameters
1699
+ # @return [Organization]
1700
+ def org_get(org, opts = {})
1701
+ data, _status_code, _headers = org_get_with_http_info(org, opts)
1702
+ data
1703
+ end
1704
+
1705
+ # Get an organization
1706
+ # @param org [String] name of the organization to get
1707
+ # @param [Hash] opts the optional parameters
1708
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
1709
+ def org_get_with_http_info(org, opts = {})
1710
+ if @api_client.config.debugging
1711
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get ...'
1712
+ end
1713
+ # verify the required parameter 'org' is set
1714
+ if @api_client.config.client_side_validation && org.nil?
1715
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_get"
1716
+ end
1717
+ # resource path
1718
+ local_var_path = '/orgs/{org}'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
1719
+
1720
+ # query parameters
1721
+ query_params = opts[:query_params] || {}
1722
+
1723
+ # header parameters
1724
+ header_params = opts[:header_params] || {}
1725
+ # HTTP header 'Accept' (if needed)
1726
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1727
+
1728
+ # form parameters
1729
+ form_params = opts[:form_params] || {}
1730
+
1731
+ # http body (model)
1732
+ post_body = opts[:debug_body]
1733
+
1734
+ # return_type
1735
+ return_type = opts[:debug_return_type] || 'Organization'
1736
+
1737
+ # auth_names
1738
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1739
+
1740
+ new_options = opts.merge(
1741
+ :operation => :"OrganizationApi.org_get",
1742
+ :header_params => header_params,
1743
+ :query_params => query_params,
1744
+ :form_params => form_params,
1745
+ :body => post_body,
1746
+ :auth_names => auth_names,
1747
+ :return_type => return_type
1748
+ )
1749
+
1750
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1751
+ if @api_client.config.debugging
1752
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1753
+ end
1754
+ return data, status_code, headers
1755
+ end
1756
+
1757
+ # Get list of organizations
1758
+ # @param [Hash] opts the optional parameters
1759
+ # @option opts [Integer] :page page number of results to return (1-based)
1760
+ # @option opts [Integer] :limit page size of results
1761
+ # @return [Array<Organization>]
1762
+ def org_get_all(opts = {})
1763
+ data, _status_code, _headers = org_get_all_with_http_info(opts)
1764
+ data
1765
+ end
1766
+
1767
+ # Get list of organizations
1768
+ # @param [Hash] opts the optional parameters
1769
+ # @option opts [Integer] :page page number of results to return (1-based)
1770
+ # @option opts [Integer] :limit page size of results
1771
+ # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
1772
+ def org_get_all_with_http_info(opts = {})
1773
+ if @api_client.config.debugging
1774
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_all ...'
1775
+ end
1776
+ # resource path
1777
+ local_var_path = '/orgs'
1778
+
1779
+ # query parameters
1780
+ query_params = opts[:query_params] || {}
1781
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1782
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1783
+
1784
+ # header parameters
1785
+ header_params = opts[:header_params] || {}
1786
+ # HTTP header 'Accept' (if needed)
1787
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1788
+
1789
+ # form parameters
1790
+ form_params = opts[:form_params] || {}
1791
+
1792
+ # http body (model)
1793
+ post_body = opts[:debug_body]
1794
+
1795
+ # return_type
1796
+ return_type = opts[:debug_return_type] || 'Array<Organization>'
1797
+
1798
+ # auth_names
1799
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1800
+
1801
+ new_options = opts.merge(
1802
+ :operation => :"OrganizationApi.org_get_all",
1803
+ :header_params => header_params,
1804
+ :query_params => query_params,
1805
+ :form_params => form_params,
1806
+ :body => post_body,
1807
+ :auth_names => auth_names,
1808
+ :return_type => return_type
1809
+ )
1810
+
1811
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1812
+ if @api_client.config.debugging
1813
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1814
+ end
1815
+ return data, status_code, headers
1816
+ end
1817
+
1818
+ # Get a hook
1819
+ # @param org [String] name of the organization
1820
+ # @param id [Integer] id of the hook to get
1821
+ # @param [Hash] opts the optional parameters
1822
+ # @return [Hook]
1823
+ def org_get_hook(org, id, opts = {})
1824
+ data, _status_code, _headers = org_get_hook_with_http_info(org, id, opts)
1825
+ data
1826
+ end
1827
+
1828
+ # Get a hook
1829
+ # @param org [String] name of the organization
1830
+ # @param id [Integer] id of the hook to get
1831
+ # @param [Hash] opts the optional parameters
1832
+ # @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
1833
+ def org_get_hook_with_http_info(org, id, opts = {})
1834
+ if @api_client.config.debugging
1835
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_hook ...'
1836
+ end
1837
+ # verify the required parameter 'org' is set
1838
+ if @api_client.config.client_side_validation && org.nil?
1839
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_get_hook"
1840
+ end
1841
+ # verify the required parameter 'id' is set
1842
+ if @api_client.config.client_side_validation && id.nil?
1843
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_get_hook"
1844
+ end
1845
+ # resource path
1846
+ local_var_path = '/orgs/{org}/hooks/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1847
+
1848
+ # query parameters
1849
+ query_params = opts[:query_params] || {}
1850
+
1851
+ # header parameters
1852
+ header_params = opts[:header_params] || {}
1853
+ # HTTP header 'Accept' (if needed)
1854
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1855
+
1856
+ # form parameters
1857
+ form_params = opts[:form_params] || {}
1858
+
1859
+ # http body (model)
1860
+ post_body = opts[:debug_body]
1861
+
1862
+ # return_type
1863
+ return_type = opts[:debug_return_type] || 'Hook'
1864
+
1865
+ # auth_names
1866
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1867
+
1868
+ new_options = opts.merge(
1869
+ :operation => :"OrganizationApi.org_get_hook",
1870
+ :header_params => header_params,
1871
+ :query_params => query_params,
1872
+ :form_params => form_params,
1873
+ :body => post_body,
1874
+ :auth_names => auth_names,
1875
+ :return_type => return_type
1876
+ )
1877
+
1878
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1879
+ if @api_client.config.debugging
1880
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1881
+ end
1882
+ return data, status_code, headers
1883
+ end
1884
+
1885
+ # Get a single label
1886
+ # @param org [String] name of the organization
1887
+ # @param id [Integer] id of the label to get
1888
+ # @param [Hash] opts the optional parameters
1889
+ # @return [Label]
1890
+ def org_get_label(org, id, opts = {})
1891
+ data, _status_code, _headers = org_get_label_with_http_info(org, id, opts)
1892
+ data
1893
+ end
1894
+
1895
+ # Get a single label
1896
+ # @param org [String] name of the organization
1897
+ # @param id [Integer] id of the label to get
1898
+ # @param [Hash] opts the optional parameters
1899
+ # @return [Array<(Label, Integer, Hash)>] Label data, response status code and response headers
1900
+ def org_get_label_with_http_info(org, id, opts = {})
1901
+ if @api_client.config.debugging
1902
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_label ...'
1903
+ end
1904
+ # verify the required parameter 'org' is set
1905
+ if @api_client.config.client_side_validation && org.nil?
1906
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_get_label"
1907
+ end
1908
+ # verify the required parameter 'id' is set
1909
+ if @api_client.config.client_side_validation && id.nil?
1910
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_get_label"
1911
+ end
1912
+ # resource path
1913
+ local_var_path = '/orgs/{org}/labels/{id}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1914
+
1915
+ # query parameters
1916
+ query_params = opts[:query_params] || {}
1917
+
1918
+ # header parameters
1919
+ header_params = opts[:header_params] || {}
1920
+ # HTTP header 'Accept' (if needed)
1921
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1922
+
1923
+ # form parameters
1924
+ form_params = opts[:form_params] || {}
1925
+
1926
+ # http body (model)
1927
+ post_body = opts[:debug_body]
1928
+
1929
+ # return_type
1930
+ return_type = opts[:debug_return_type] || 'Label'
1931
+
1932
+ # auth_names
1933
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1934
+
1935
+ new_options = opts.merge(
1936
+ :operation => :"OrganizationApi.org_get_label",
1937
+ :header_params => header_params,
1938
+ :query_params => query_params,
1939
+ :form_params => form_params,
1940
+ :body => post_body,
1941
+ :auth_names => auth_names,
1942
+ :return_type => return_type
1943
+ )
1944
+
1945
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1946
+ if @api_client.config.debugging
1947
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1948
+ end
1949
+ return data, status_code, headers
1950
+ end
1951
+
1952
+ # Get an organization's actions runner registration token
1953
+ # @param org [String] name of the organization
1954
+ # @param [Hash] opts the optional parameters
1955
+ # @return [nil]
1956
+ def org_get_runner_registration_token(org, opts = {})
1957
+ org_get_runner_registration_token_with_http_info(org, opts)
1958
+ nil
1959
+ end
1960
+
1961
+ # Get an organization&#39;s actions runner registration token
1962
+ # @param org [String] name of the organization
1963
+ # @param [Hash] opts the optional parameters
1964
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1965
+ def org_get_runner_registration_token_with_http_info(org, opts = {})
1966
+ if @api_client.config.debugging
1967
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_runner_registration_token ...'
1968
+ end
1969
+ # verify the required parameter 'org' is set
1970
+ if @api_client.config.client_side_validation && org.nil?
1971
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_get_runner_registration_token"
1972
+ end
1973
+ # resource path
1974
+ local_var_path = '/orgs/{org}/actions/runners/registration-token'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
1975
+
1976
+ # query parameters
1977
+ query_params = opts[:query_params] || {}
1978
+
1979
+ # header parameters
1980
+ header_params = opts[:header_params] || {}
1981
+
1982
+ # form parameters
1983
+ form_params = opts[:form_params] || {}
1984
+
1985
+ # http body (model)
1986
+ post_body = opts[:debug_body]
1987
+
1988
+ # return_type
1989
+ return_type = opts[:debug_return_type]
1990
+
1991
+ # auth_names
1992
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1993
+
1994
+ new_options = opts.merge(
1995
+ :operation => :"OrganizationApi.org_get_runner_registration_token",
1996
+ :header_params => header_params,
1997
+ :query_params => query_params,
1998
+ :form_params => form_params,
1999
+ :body => post_body,
2000
+ :auth_names => auth_names,
2001
+ :return_type => return_type
2002
+ )
2003
+
2004
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2005
+ if @api_client.config.debugging
2006
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2007
+ end
2008
+ return data, status_code, headers
2009
+ end
2010
+
2011
+ # Get a team
2012
+ # @param id [Integer] id of the team to get
2013
+ # @param [Hash] opts the optional parameters
2014
+ # @return [Team]
2015
+ def org_get_team(id, opts = {})
2016
+ data, _status_code, _headers = org_get_team_with_http_info(id, opts)
2017
+ data
2018
+ end
2019
+
2020
+ # Get a team
2021
+ # @param id [Integer] id of the team to get
2022
+ # @param [Hash] opts the optional parameters
2023
+ # @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
2024
+ def org_get_team_with_http_info(id, opts = {})
2025
+ if @api_client.config.debugging
2026
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_team ...'
2027
+ end
2028
+ # verify the required parameter 'id' is set
2029
+ if @api_client.config.client_side_validation && id.nil?
2030
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_get_team"
2031
+ end
2032
+ # resource path
2033
+ local_var_path = '/teams/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2034
+
2035
+ # query parameters
2036
+ query_params = opts[:query_params] || {}
2037
+
2038
+ # header parameters
2039
+ header_params = opts[:header_params] || {}
2040
+ # HTTP header 'Accept' (if needed)
2041
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2042
+
2043
+ # form parameters
2044
+ form_params = opts[:form_params] || {}
2045
+
2046
+ # http body (model)
2047
+ post_body = opts[:debug_body]
2048
+
2049
+ # return_type
2050
+ return_type = opts[:debug_return_type] || 'Team'
2051
+
2052
+ # auth_names
2053
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2054
+
2055
+ new_options = opts.merge(
2056
+ :operation => :"OrganizationApi.org_get_team",
2057
+ :header_params => header_params,
2058
+ :query_params => query_params,
2059
+ :form_params => form_params,
2060
+ :body => post_body,
2061
+ :auth_names => auth_names,
2062
+ :return_type => return_type
2063
+ )
2064
+
2065
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2066
+ if @api_client.config.debugging
2067
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2068
+ end
2069
+ return data, status_code, headers
2070
+ end
2071
+
2072
+ # Get user permissions in organization
2073
+ # @param username [String] username of user
2074
+ # @param org [String] name of the organization
2075
+ # @param [Hash] opts the optional parameters
2076
+ # @return [OrganizationPermissions]
2077
+ def org_get_user_permissions(username, org, opts = {})
2078
+ data, _status_code, _headers = org_get_user_permissions_with_http_info(username, org, opts)
2079
+ data
2080
+ end
2081
+
2082
+ # Get user permissions in organization
2083
+ # @param username [String] username of user
2084
+ # @param org [String] name of the organization
2085
+ # @param [Hash] opts the optional parameters
2086
+ # @return [Array<(OrganizationPermissions, Integer, Hash)>] OrganizationPermissions data, response status code and response headers
2087
+ def org_get_user_permissions_with_http_info(username, org, opts = {})
2088
+ if @api_client.config.debugging
2089
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_get_user_permissions ...'
2090
+ end
2091
+ # verify the required parameter 'username' is set
2092
+ if @api_client.config.client_side_validation && username.nil?
2093
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_get_user_permissions"
2094
+ end
2095
+ # verify the required parameter 'org' is set
2096
+ if @api_client.config.client_side_validation && org.nil?
2097
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_get_user_permissions"
2098
+ end
2099
+ # resource path
2100
+ local_var_path = '/users/{username}/orgs/{org}/permissions'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'org' + '}', CGI.escape(org.to_s))
2101
+
2102
+ # query parameters
2103
+ query_params = opts[:query_params] || {}
2104
+
2105
+ # header parameters
2106
+ header_params = opts[:header_params] || {}
2107
+ # HTTP header 'Accept' (if needed)
2108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2109
+
2110
+ # form parameters
2111
+ form_params = opts[:form_params] || {}
2112
+
2113
+ # http body (model)
2114
+ post_body = opts[:debug_body]
2115
+
2116
+ # return_type
2117
+ return_type = opts[:debug_return_type] || 'OrganizationPermissions'
2118
+
2119
+ # auth_names
2120
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2121
+
2122
+ new_options = opts.merge(
2123
+ :operation => :"OrganizationApi.org_get_user_permissions",
2124
+ :header_params => header_params,
2125
+ :query_params => query_params,
2126
+ :form_params => form_params,
2127
+ :body => post_body,
2128
+ :auth_names => auth_names,
2129
+ :return_type => return_type
2130
+ )
2131
+
2132
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2133
+ if @api_client.config.debugging
2134
+ @api_client.config.logger.debug "API called: OrganizationApi#org_get_user_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2135
+ end
2136
+ return data, status_code, headers
2137
+ end
2138
+
2139
+ # Check if a user is a member of an organization
2140
+ # @param org [String] name of the organization
2141
+ # @param username [String] username of the user
2142
+ # @param [Hash] opts the optional parameters
2143
+ # @return [nil]
2144
+ def org_is_member(org, username, opts = {})
2145
+ org_is_member_with_http_info(org, username, opts)
2146
+ nil
2147
+ end
2148
+
2149
+ # Check if a user is a member of an organization
2150
+ # @param org [String] name of the organization
2151
+ # @param username [String] username of the user
2152
+ # @param [Hash] opts the optional parameters
2153
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2154
+ def org_is_member_with_http_info(org, username, opts = {})
2155
+ if @api_client.config.debugging
2156
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_is_member ...'
2157
+ end
2158
+ # verify the required parameter 'org' is set
2159
+ if @api_client.config.client_side_validation && org.nil?
2160
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_is_member"
2161
+ end
2162
+ # verify the required parameter 'username' is set
2163
+ if @api_client.config.client_side_validation && username.nil?
2164
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_is_member"
2165
+ end
2166
+ # resource path
2167
+ local_var_path = '/orgs/{org}/members/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
2168
+
2169
+ # query parameters
2170
+ query_params = opts[:query_params] || {}
2171
+
2172
+ # header parameters
2173
+ header_params = opts[:header_params] || {}
2174
+
2175
+ # form parameters
2176
+ form_params = opts[:form_params] || {}
2177
+
2178
+ # http body (model)
2179
+ post_body = opts[:debug_body]
2180
+
2181
+ # return_type
2182
+ return_type = opts[:debug_return_type]
2183
+
2184
+ # auth_names
2185
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2186
+
2187
+ new_options = opts.merge(
2188
+ :operation => :"OrganizationApi.org_is_member",
2189
+ :header_params => header_params,
2190
+ :query_params => query_params,
2191
+ :form_params => form_params,
2192
+ :body => post_body,
2193
+ :auth_names => auth_names,
2194
+ :return_type => return_type
2195
+ )
2196
+
2197
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2198
+ if @api_client.config.debugging
2199
+ @api_client.config.logger.debug "API called: OrganizationApi#org_is_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2200
+ end
2201
+ return data, status_code, headers
2202
+ end
2203
+
2204
+ # Check if a user is a public member of an organization
2205
+ # @param org [String] name of the organization
2206
+ # @param username [String] username of the user
2207
+ # @param [Hash] opts the optional parameters
2208
+ # @return [nil]
2209
+ def org_is_public_member(org, username, opts = {})
2210
+ org_is_public_member_with_http_info(org, username, opts)
2211
+ nil
2212
+ end
2213
+
2214
+ # Check if a user is a public member of an organization
2215
+ # @param org [String] name of the organization
2216
+ # @param username [String] username of the user
2217
+ # @param [Hash] opts the optional parameters
2218
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2219
+ def org_is_public_member_with_http_info(org, username, opts = {})
2220
+ if @api_client.config.debugging
2221
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_is_public_member ...'
2222
+ end
2223
+ # verify the required parameter 'org' is set
2224
+ if @api_client.config.client_side_validation && org.nil?
2225
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_is_public_member"
2226
+ end
2227
+ # verify the required parameter 'username' is set
2228
+ if @api_client.config.client_side_validation && username.nil?
2229
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_is_public_member"
2230
+ end
2231
+ # resource path
2232
+ local_var_path = '/orgs/{org}/public_members/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
2233
+
2234
+ # query parameters
2235
+ query_params = opts[:query_params] || {}
2236
+
2237
+ # header parameters
2238
+ header_params = opts[:header_params] || {}
2239
+
2240
+ # form parameters
2241
+ form_params = opts[:form_params] || {}
2242
+
2243
+ # http body (model)
2244
+ post_body = opts[:debug_body]
2245
+
2246
+ # return_type
2247
+ return_type = opts[:debug_return_type]
2248
+
2249
+ # auth_names
2250
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2251
+
2252
+ new_options = opts.merge(
2253
+ :operation => :"OrganizationApi.org_is_public_member",
2254
+ :header_params => header_params,
2255
+ :query_params => query_params,
2256
+ :form_params => form_params,
2257
+ :body => post_body,
2258
+ :auth_names => auth_names,
2259
+ :return_type => return_type
2260
+ )
2261
+
2262
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2263
+ if @api_client.config.debugging
2264
+ @api_client.config.logger.debug "API called: OrganizationApi#org_is_public_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2265
+ end
2266
+ return data, status_code, headers
2267
+ end
2268
+
2269
+ # List an organization's actions secrets
2270
+ # @param org [String] name of the organization
2271
+ # @param [Hash] opts the optional parameters
2272
+ # @option opts [Integer] :page page number of results to return (1-based)
2273
+ # @option opts [Integer] :limit page size of results
2274
+ # @return [Array<Secret>]
2275
+ def org_list_actions_secrets(org, opts = {})
2276
+ data, _status_code, _headers = org_list_actions_secrets_with_http_info(org, opts)
2277
+ data
2278
+ end
2279
+
2280
+ # List an organization&#39;s actions secrets
2281
+ # @param org [String] name of the organization
2282
+ # @param [Hash] opts the optional parameters
2283
+ # @option opts [Integer] :page page number of results to return (1-based)
2284
+ # @option opts [Integer] :limit page size of results
2285
+ # @return [Array<(Array<Secret>, Integer, Hash)>] Array<Secret> data, response status code and response headers
2286
+ def org_list_actions_secrets_with_http_info(org, opts = {})
2287
+ if @api_client.config.debugging
2288
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_actions_secrets ...'
2289
+ end
2290
+ # verify the required parameter 'org' is set
2291
+ if @api_client.config.client_side_validation && org.nil?
2292
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_actions_secrets"
2293
+ end
2294
+ # resource path
2295
+ local_var_path = '/orgs/{org}/actions/secrets'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2296
+
2297
+ # query parameters
2298
+ query_params = opts[:query_params] || {}
2299
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2300
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2301
+
2302
+ # header parameters
2303
+ header_params = opts[:header_params] || {}
2304
+ # HTTP header 'Accept' (if needed)
2305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2306
+
2307
+ # form parameters
2308
+ form_params = opts[:form_params] || {}
2309
+
2310
+ # http body (model)
2311
+ post_body = opts[:debug_body]
2312
+
2313
+ # return_type
2314
+ return_type = opts[:debug_return_type] || 'Array<Secret>'
2315
+
2316
+ # auth_names
2317
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2318
+
2319
+ new_options = opts.merge(
2320
+ :operation => :"OrganizationApi.org_list_actions_secrets",
2321
+ :header_params => header_params,
2322
+ :query_params => query_params,
2323
+ :form_params => form_params,
2324
+ :body => post_body,
2325
+ :auth_names => auth_names,
2326
+ :return_type => return_type
2327
+ )
2328
+
2329
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2330
+ if @api_client.config.debugging
2331
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_actions_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2332
+ end
2333
+ return data, status_code, headers
2334
+ end
2335
+
2336
+ # List an organization's activity feeds
2337
+ # @param org [String] name of the org
2338
+ # @param [Hash] opts the optional parameters
2339
+ # @option opts [Date] :date the date of the activities to be found
2340
+ # @option opts [Integer] :page page number of results to return (1-based)
2341
+ # @option opts [Integer] :limit page size of results
2342
+ # @return [Array<Activity>]
2343
+ def org_list_activity_feeds(org, opts = {})
2344
+ data, _status_code, _headers = org_list_activity_feeds_with_http_info(org, opts)
2345
+ data
2346
+ end
2347
+
2348
+ # List an organization&#39;s activity feeds
2349
+ # @param org [String] name of the org
2350
+ # @param [Hash] opts the optional parameters
2351
+ # @option opts [Date] :date the date of the activities to be found
2352
+ # @option opts [Integer] :page page number of results to return (1-based)
2353
+ # @option opts [Integer] :limit page size of results
2354
+ # @return [Array<(Array<Activity>, Integer, Hash)>] Array<Activity> data, response status code and response headers
2355
+ def org_list_activity_feeds_with_http_info(org, opts = {})
2356
+ if @api_client.config.debugging
2357
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_activity_feeds ...'
2358
+ end
2359
+ # verify the required parameter 'org' is set
2360
+ if @api_client.config.client_side_validation && org.nil?
2361
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_activity_feeds"
2362
+ end
2363
+ # resource path
2364
+ local_var_path = '/orgs/{org}/activities/feeds'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2365
+
2366
+ # query parameters
2367
+ query_params = opts[:query_params] || {}
2368
+ query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
2369
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2370
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2371
+
2372
+ # header parameters
2373
+ header_params = opts[:header_params] || {}
2374
+ # HTTP header 'Accept' (if needed)
2375
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2376
+
2377
+ # form parameters
2378
+ form_params = opts[:form_params] || {}
2379
+
2380
+ # http body (model)
2381
+ post_body = opts[:debug_body]
2382
+
2383
+ # return_type
2384
+ return_type = opts[:debug_return_type] || 'Array<Activity>'
2385
+
2386
+ # auth_names
2387
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2388
+
2389
+ new_options = opts.merge(
2390
+ :operation => :"OrganizationApi.org_list_activity_feeds",
2391
+ :header_params => header_params,
2392
+ :query_params => query_params,
2393
+ :form_params => form_params,
2394
+ :body => post_body,
2395
+ :auth_names => auth_names,
2396
+ :return_type => return_type
2397
+ )
2398
+
2399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2400
+ if @api_client.config.debugging
2401
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_activity_feeds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2402
+ end
2403
+ return data, status_code, headers
2404
+ end
2405
+
2406
+ # List the organization's blocked users
2407
+ # @param org [String] name of the org
2408
+ # @param [Hash] opts the optional parameters
2409
+ # @option opts [Integer] :page page number of results to return (1-based)
2410
+ # @option opts [Integer] :limit page size of results
2411
+ # @return [Array<BlockedUser>]
2412
+ def org_list_blocked_users(org, opts = {})
2413
+ data, _status_code, _headers = org_list_blocked_users_with_http_info(org, opts)
2414
+ data
2415
+ end
2416
+
2417
+ # List the organization&#39;s blocked users
2418
+ # @param org [String] name of the org
2419
+ # @param [Hash] opts the optional parameters
2420
+ # @option opts [Integer] :page page number of results to return (1-based)
2421
+ # @option opts [Integer] :limit page size of results
2422
+ # @return [Array<(Array<BlockedUser>, Integer, Hash)>] Array<BlockedUser> data, response status code and response headers
2423
+ def org_list_blocked_users_with_http_info(org, opts = {})
2424
+ if @api_client.config.debugging
2425
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_blocked_users ...'
2426
+ end
2427
+ # verify the required parameter 'org' is set
2428
+ if @api_client.config.client_side_validation && org.nil?
2429
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_blocked_users"
2430
+ end
2431
+ # resource path
2432
+ local_var_path = '/orgs/{org}/list_blocked'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2433
+
2434
+ # query parameters
2435
+ query_params = opts[:query_params] || {}
2436
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2437
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2438
+
2439
+ # header parameters
2440
+ header_params = opts[:header_params] || {}
2441
+ # HTTP header 'Accept' (if needed)
2442
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2443
+
2444
+ # form parameters
2445
+ form_params = opts[:form_params] || {}
2446
+
2447
+ # http body (model)
2448
+ post_body = opts[:debug_body]
2449
+
2450
+ # return_type
2451
+ return_type = opts[:debug_return_type] || 'Array<BlockedUser>'
2452
+
2453
+ # auth_names
2454
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2455
+
2456
+ new_options = opts.merge(
2457
+ :operation => :"OrganizationApi.org_list_blocked_users",
2458
+ :header_params => header_params,
2459
+ :query_params => query_params,
2460
+ :form_params => form_params,
2461
+ :body => post_body,
2462
+ :auth_names => auth_names,
2463
+ :return_type => return_type
2464
+ )
2465
+
2466
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2467
+ if @api_client.config.debugging
2468
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_blocked_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2469
+ end
2470
+ return data, status_code, headers
2471
+ end
2472
+
2473
+ # List the current user's organizations
2474
+ # @param [Hash] opts the optional parameters
2475
+ # @option opts [Integer] :page page number of results to return (1-based)
2476
+ # @option opts [Integer] :limit page size of results
2477
+ # @return [Array<Organization>]
2478
+ def org_list_current_user_orgs(opts = {})
2479
+ data, _status_code, _headers = org_list_current_user_orgs_with_http_info(opts)
2480
+ data
2481
+ end
2482
+
2483
+ # List the current user&#39;s organizations
2484
+ # @param [Hash] opts the optional parameters
2485
+ # @option opts [Integer] :page page number of results to return (1-based)
2486
+ # @option opts [Integer] :limit page size of results
2487
+ # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
2488
+ def org_list_current_user_orgs_with_http_info(opts = {})
2489
+ if @api_client.config.debugging
2490
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_current_user_orgs ...'
2491
+ end
2492
+ # resource path
2493
+ local_var_path = '/user/orgs'
2494
+
2495
+ # query parameters
2496
+ query_params = opts[:query_params] || {}
2497
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2498
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2499
+
2500
+ # header parameters
2501
+ header_params = opts[:header_params] || {}
2502
+ # HTTP header 'Accept' (if needed)
2503
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2504
+
2505
+ # form parameters
2506
+ form_params = opts[:form_params] || {}
2507
+
2508
+ # http body (model)
2509
+ post_body = opts[:debug_body]
2510
+
2511
+ # return_type
2512
+ return_type = opts[:debug_return_type] || 'Array<Organization>'
2513
+
2514
+ # auth_names
2515
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2516
+
2517
+ new_options = opts.merge(
2518
+ :operation => :"OrganizationApi.org_list_current_user_orgs",
2519
+ :header_params => header_params,
2520
+ :query_params => query_params,
2521
+ :form_params => form_params,
2522
+ :body => post_body,
2523
+ :auth_names => auth_names,
2524
+ :return_type => return_type
2525
+ )
2526
+
2527
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2528
+ if @api_client.config.debugging
2529
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_current_user_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2530
+ end
2531
+ return data, status_code, headers
2532
+ end
2533
+
2534
+ # List an organization's webhooks
2535
+ # @param org [String] name of the organization
2536
+ # @param [Hash] opts the optional parameters
2537
+ # @option opts [Integer] :page page number of results to return (1-based)
2538
+ # @option opts [Integer] :limit page size of results
2539
+ # @return [Array<Hook>]
2540
+ def org_list_hooks(org, opts = {})
2541
+ data, _status_code, _headers = org_list_hooks_with_http_info(org, opts)
2542
+ data
2543
+ end
2544
+
2545
+ # List an organization&#39;s webhooks
2546
+ # @param org [String] name of the organization
2547
+ # @param [Hash] opts the optional parameters
2548
+ # @option opts [Integer] :page page number of results to return (1-based)
2549
+ # @option opts [Integer] :limit page size of results
2550
+ # @return [Array<(Array<Hook>, Integer, Hash)>] Array<Hook> data, response status code and response headers
2551
+ def org_list_hooks_with_http_info(org, opts = {})
2552
+ if @api_client.config.debugging
2553
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_hooks ...'
2554
+ end
2555
+ # verify the required parameter 'org' is set
2556
+ if @api_client.config.client_side_validation && org.nil?
2557
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_hooks"
2558
+ end
2559
+ # resource path
2560
+ local_var_path = '/orgs/{org}/hooks'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2561
+
2562
+ # query parameters
2563
+ query_params = opts[:query_params] || {}
2564
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2565
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2566
+
2567
+ # header parameters
2568
+ header_params = opts[:header_params] || {}
2569
+ # HTTP header 'Accept' (if needed)
2570
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2571
+
2572
+ # form parameters
2573
+ form_params = opts[:form_params] || {}
2574
+
2575
+ # http body (model)
2576
+ post_body = opts[:debug_body]
2577
+
2578
+ # return_type
2579
+ return_type = opts[:debug_return_type] || 'Array<Hook>'
2580
+
2581
+ # auth_names
2582
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2583
+
2584
+ new_options = opts.merge(
2585
+ :operation => :"OrganizationApi.org_list_hooks",
2586
+ :header_params => header_params,
2587
+ :query_params => query_params,
2588
+ :form_params => form_params,
2589
+ :body => post_body,
2590
+ :auth_names => auth_names,
2591
+ :return_type => return_type
2592
+ )
2593
+
2594
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2595
+ if @api_client.config.debugging
2596
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2597
+ end
2598
+ return data, status_code, headers
2599
+ end
2600
+
2601
+ # List an organization's labels
2602
+ # @param org [String] name of the organization
2603
+ # @param [Hash] opts the optional parameters
2604
+ # @option opts [Integer] :page page number of results to return (1-based)
2605
+ # @option opts [Integer] :limit page size of results
2606
+ # @return [Array<Label>]
2607
+ def org_list_labels(org, opts = {})
2608
+ data, _status_code, _headers = org_list_labels_with_http_info(org, opts)
2609
+ data
2610
+ end
2611
+
2612
+ # List an organization&#39;s labels
2613
+ # @param org [String] name of the organization
2614
+ # @param [Hash] opts the optional parameters
2615
+ # @option opts [Integer] :page page number of results to return (1-based)
2616
+ # @option opts [Integer] :limit page size of results
2617
+ # @return [Array<(Array<Label>, Integer, Hash)>] Array<Label> data, response status code and response headers
2618
+ def org_list_labels_with_http_info(org, opts = {})
2619
+ if @api_client.config.debugging
2620
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_labels ...'
2621
+ end
2622
+ # verify the required parameter 'org' is set
2623
+ if @api_client.config.client_side_validation && org.nil?
2624
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_labels"
2625
+ end
2626
+ # resource path
2627
+ local_var_path = '/orgs/{org}/labels'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2628
+
2629
+ # query parameters
2630
+ query_params = opts[:query_params] || {}
2631
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2632
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2633
+
2634
+ # header parameters
2635
+ header_params = opts[:header_params] || {}
2636
+ # HTTP header 'Accept' (if needed)
2637
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2638
+
2639
+ # form parameters
2640
+ form_params = opts[:form_params] || {}
2641
+
2642
+ # http body (model)
2643
+ post_body = opts[:debug_body]
2644
+
2645
+ # return_type
2646
+ return_type = opts[:debug_return_type] || 'Array<Label>'
2647
+
2648
+ # auth_names
2649
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2650
+
2651
+ new_options = opts.merge(
2652
+ :operation => :"OrganizationApi.org_list_labels",
2653
+ :header_params => header_params,
2654
+ :query_params => query_params,
2655
+ :form_params => form_params,
2656
+ :body => post_body,
2657
+ :auth_names => auth_names,
2658
+ :return_type => return_type
2659
+ )
2660
+
2661
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2662
+ if @api_client.config.debugging
2663
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2664
+ end
2665
+ return data, status_code, headers
2666
+ end
2667
+
2668
+ # List an organization's members
2669
+ # @param org [String] name of the organization
2670
+ # @param [Hash] opts the optional parameters
2671
+ # @option opts [Integer] :page page number of results to return (1-based)
2672
+ # @option opts [Integer] :limit page size of results
2673
+ # @return [Array<User>]
2674
+ def org_list_members(org, opts = {})
2675
+ data, _status_code, _headers = org_list_members_with_http_info(org, opts)
2676
+ data
2677
+ end
2678
+
2679
+ # List an organization&#39;s members
2680
+ # @param org [String] name of the organization
2681
+ # @param [Hash] opts the optional parameters
2682
+ # @option opts [Integer] :page page number of results to return (1-based)
2683
+ # @option opts [Integer] :limit page size of results
2684
+ # @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
2685
+ def org_list_members_with_http_info(org, opts = {})
2686
+ if @api_client.config.debugging
2687
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_members ...'
2688
+ end
2689
+ # verify the required parameter 'org' is set
2690
+ if @api_client.config.client_side_validation && org.nil?
2691
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_members"
2692
+ end
2693
+ # resource path
2694
+ local_var_path = '/orgs/{org}/members'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2695
+
2696
+ # query parameters
2697
+ query_params = opts[:query_params] || {}
2698
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2699
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2700
+
2701
+ # header parameters
2702
+ header_params = opts[:header_params] || {}
2703
+ # HTTP header 'Accept' (if needed)
2704
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2705
+
2706
+ # form parameters
2707
+ form_params = opts[:form_params] || {}
2708
+
2709
+ # http body (model)
2710
+ post_body = opts[:debug_body]
2711
+
2712
+ # return_type
2713
+ return_type = opts[:debug_return_type] || 'Array<User>'
2714
+
2715
+ # auth_names
2716
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2717
+
2718
+ new_options = opts.merge(
2719
+ :operation => :"OrganizationApi.org_list_members",
2720
+ :header_params => header_params,
2721
+ :query_params => query_params,
2722
+ :form_params => form_params,
2723
+ :body => post_body,
2724
+ :auth_names => auth_names,
2725
+ :return_type => return_type
2726
+ )
2727
+
2728
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2729
+ if @api_client.config.debugging
2730
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2731
+ end
2732
+ return data, status_code, headers
2733
+ end
2734
+
2735
+ # List an organization's public members
2736
+ # @param org [String] name of the organization
2737
+ # @param [Hash] opts the optional parameters
2738
+ # @option opts [Integer] :page page number of results to return (1-based)
2739
+ # @option opts [Integer] :limit page size of results
2740
+ # @return [Array<User>]
2741
+ def org_list_public_members(org, opts = {})
2742
+ data, _status_code, _headers = org_list_public_members_with_http_info(org, opts)
2743
+ data
2744
+ end
2745
+
2746
+ # List an organization&#39;s public members
2747
+ # @param org [String] name of the organization
2748
+ # @param [Hash] opts the optional parameters
2749
+ # @option opts [Integer] :page page number of results to return (1-based)
2750
+ # @option opts [Integer] :limit page size of results
2751
+ # @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
2752
+ def org_list_public_members_with_http_info(org, opts = {})
2753
+ if @api_client.config.debugging
2754
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_public_members ...'
2755
+ end
2756
+ # verify the required parameter 'org' is set
2757
+ if @api_client.config.client_side_validation && org.nil?
2758
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_public_members"
2759
+ end
2760
+ # resource path
2761
+ local_var_path = '/orgs/{org}/public_members'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2762
+
2763
+ # query parameters
2764
+ query_params = opts[:query_params] || {}
2765
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2766
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2767
+
2768
+ # header parameters
2769
+ header_params = opts[:header_params] || {}
2770
+ # HTTP header 'Accept' (if needed)
2771
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2772
+
2773
+ # form parameters
2774
+ form_params = opts[:form_params] || {}
2775
+
2776
+ # http body (model)
2777
+ post_body = opts[:debug_body]
2778
+
2779
+ # return_type
2780
+ return_type = opts[:debug_return_type] || 'Array<User>'
2781
+
2782
+ # auth_names
2783
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2784
+
2785
+ new_options = opts.merge(
2786
+ :operation => :"OrganizationApi.org_list_public_members",
2787
+ :header_params => header_params,
2788
+ :query_params => query_params,
2789
+ :form_params => form_params,
2790
+ :body => post_body,
2791
+ :auth_names => auth_names,
2792
+ :return_type => return_type
2793
+ )
2794
+
2795
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2796
+ if @api_client.config.debugging
2797
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_public_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2798
+ end
2799
+ return data, status_code, headers
2800
+ end
2801
+
2802
+ # List an organization's repos
2803
+ # @param org [String] name of the organization
2804
+ # @param [Hash] opts the optional parameters
2805
+ # @option opts [Integer] :page page number of results to return (1-based)
2806
+ # @option opts [Integer] :limit page size of results
2807
+ # @return [Array<Repository>]
2808
+ def org_list_repos(org, opts = {})
2809
+ data, _status_code, _headers = org_list_repos_with_http_info(org, opts)
2810
+ data
2811
+ end
2812
+
2813
+ # List an organization&#39;s repos
2814
+ # @param org [String] name of the organization
2815
+ # @param [Hash] opts the optional parameters
2816
+ # @option opts [Integer] :page page number of results to return (1-based)
2817
+ # @option opts [Integer] :limit page size of results
2818
+ # @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
2819
+ def org_list_repos_with_http_info(org, opts = {})
2820
+ if @api_client.config.debugging
2821
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_repos ...'
2822
+ end
2823
+ # verify the required parameter 'org' is set
2824
+ if @api_client.config.client_side_validation && org.nil?
2825
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_repos"
2826
+ end
2827
+ # resource path
2828
+ local_var_path = '/orgs/{org}/repos'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
2829
+
2830
+ # query parameters
2831
+ query_params = opts[:query_params] || {}
2832
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2833
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2834
+
2835
+ # header parameters
2836
+ header_params = opts[:header_params] || {}
2837
+ # HTTP header 'Accept' (if needed)
2838
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2839
+
2840
+ # form parameters
2841
+ form_params = opts[:form_params] || {}
2842
+
2843
+ # http body (model)
2844
+ post_body = opts[:debug_body]
2845
+
2846
+ # return_type
2847
+ return_type = opts[:debug_return_type] || 'Array<Repository>'
2848
+
2849
+ # auth_names
2850
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2851
+
2852
+ new_options = opts.merge(
2853
+ :operation => :"OrganizationApi.org_list_repos",
2854
+ :header_params => header_params,
2855
+ :query_params => query_params,
2856
+ :form_params => form_params,
2857
+ :body => post_body,
2858
+ :auth_names => auth_names,
2859
+ :return_type => return_type
2860
+ )
2861
+
2862
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2863
+ if @api_client.config.debugging
2864
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_repos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2865
+ end
2866
+ return data, status_code, headers
2867
+ end
2868
+
2869
+ # List a team's activity feeds
2870
+ # @param id [Integer] id of the team
2871
+ # @param [Hash] opts the optional parameters
2872
+ # @option opts [Date] :date the date of the activities to be found
2873
+ # @option opts [Integer] :page page number of results to return (1-based)
2874
+ # @option opts [Integer] :limit page size of results
2875
+ # @return [Array<Activity>]
2876
+ def org_list_team_activity_feeds(id, opts = {})
2877
+ data, _status_code, _headers = org_list_team_activity_feeds_with_http_info(id, opts)
2878
+ data
2879
+ end
2880
+
2881
+ # List a team&#39;s activity feeds
2882
+ # @param id [Integer] id of the team
2883
+ # @param [Hash] opts the optional parameters
2884
+ # @option opts [Date] :date the date of the activities to be found
2885
+ # @option opts [Integer] :page page number of results to return (1-based)
2886
+ # @option opts [Integer] :limit page size of results
2887
+ # @return [Array<(Array<Activity>, Integer, Hash)>] Array<Activity> data, response status code and response headers
2888
+ def org_list_team_activity_feeds_with_http_info(id, opts = {})
2889
+ if @api_client.config.debugging
2890
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_team_activity_feeds ...'
2891
+ end
2892
+ # verify the required parameter 'id' is set
2893
+ if @api_client.config.client_side_validation && id.nil?
2894
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_list_team_activity_feeds"
2895
+ end
2896
+ # resource path
2897
+ local_var_path = '/teams/{id}/activities/feeds'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2898
+
2899
+ # query parameters
2900
+ query_params = opts[:query_params] || {}
2901
+ query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
2902
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2903
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2904
+
2905
+ # header parameters
2906
+ header_params = opts[:header_params] || {}
2907
+ # HTTP header 'Accept' (if needed)
2908
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2909
+
2910
+ # form parameters
2911
+ form_params = opts[:form_params] || {}
2912
+
2913
+ # http body (model)
2914
+ post_body = opts[:debug_body]
2915
+
2916
+ # return_type
2917
+ return_type = opts[:debug_return_type] || 'Array<Activity>'
2918
+
2919
+ # auth_names
2920
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2921
+
2922
+ new_options = opts.merge(
2923
+ :operation => :"OrganizationApi.org_list_team_activity_feeds",
2924
+ :header_params => header_params,
2925
+ :query_params => query_params,
2926
+ :form_params => form_params,
2927
+ :body => post_body,
2928
+ :auth_names => auth_names,
2929
+ :return_type => return_type
2930
+ )
2931
+
2932
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2933
+ if @api_client.config.debugging
2934
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_team_activity_feeds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2935
+ end
2936
+ return data, status_code, headers
2937
+ end
2938
+
2939
+ # List a particular member of team
2940
+ # @param id [Integer] id of the team
2941
+ # @param username [String] username of the member to list
2942
+ # @param [Hash] opts the optional parameters
2943
+ # @return [User]
2944
+ def org_list_team_member(id, username, opts = {})
2945
+ data, _status_code, _headers = org_list_team_member_with_http_info(id, username, opts)
2946
+ data
2947
+ end
2948
+
2949
+ # List a particular member of team
2950
+ # @param id [Integer] id of the team
2951
+ # @param username [String] username of the member to list
2952
+ # @param [Hash] opts the optional parameters
2953
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
2954
+ def org_list_team_member_with_http_info(id, username, opts = {})
2955
+ if @api_client.config.debugging
2956
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_team_member ...'
2957
+ end
2958
+ # verify the required parameter 'id' is set
2959
+ if @api_client.config.client_side_validation && id.nil?
2960
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_list_team_member"
2961
+ end
2962
+ # verify the required parameter 'username' is set
2963
+ if @api_client.config.client_side_validation && username.nil?
2964
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_list_team_member"
2965
+ end
2966
+ # resource path
2967
+ local_var_path = '/teams/{id}/members/{username}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
2968
+
2969
+ # query parameters
2970
+ query_params = opts[:query_params] || {}
2971
+
2972
+ # header parameters
2973
+ header_params = opts[:header_params] || {}
2974
+ # HTTP header 'Accept' (if needed)
2975
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2976
+
2977
+ # form parameters
2978
+ form_params = opts[:form_params] || {}
2979
+
2980
+ # http body (model)
2981
+ post_body = opts[:debug_body]
2982
+
2983
+ # return_type
2984
+ return_type = opts[:debug_return_type] || 'User'
2985
+
2986
+ # auth_names
2987
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2988
+
2989
+ new_options = opts.merge(
2990
+ :operation => :"OrganizationApi.org_list_team_member",
2991
+ :header_params => header_params,
2992
+ :query_params => query_params,
2993
+ :form_params => form_params,
2994
+ :body => post_body,
2995
+ :auth_names => auth_names,
2996
+ :return_type => return_type
2997
+ )
2998
+
2999
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3000
+ if @api_client.config.debugging
3001
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3002
+ end
3003
+ return data, status_code, headers
3004
+ end
3005
+
3006
+ # List a team's members
3007
+ # @param id [Integer] id of the team
3008
+ # @param [Hash] opts the optional parameters
3009
+ # @option opts [Integer] :page page number of results to return (1-based)
3010
+ # @option opts [Integer] :limit page size of results
3011
+ # @return [Array<User>]
3012
+ def org_list_team_members(id, opts = {})
3013
+ data, _status_code, _headers = org_list_team_members_with_http_info(id, opts)
3014
+ data
3015
+ end
3016
+
3017
+ # List a team&#39;s members
3018
+ # @param id [Integer] id of the team
3019
+ # @param [Hash] opts the optional parameters
3020
+ # @option opts [Integer] :page page number of results to return (1-based)
3021
+ # @option opts [Integer] :limit page size of results
3022
+ # @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
3023
+ def org_list_team_members_with_http_info(id, opts = {})
3024
+ if @api_client.config.debugging
3025
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_team_members ...'
3026
+ end
3027
+ # verify the required parameter 'id' is set
3028
+ if @api_client.config.client_side_validation && id.nil?
3029
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_list_team_members"
3030
+ end
3031
+ # resource path
3032
+ local_var_path = '/teams/{id}/members'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3033
+
3034
+ # query parameters
3035
+ query_params = opts[:query_params] || {}
3036
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3037
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3038
+
3039
+ # header parameters
3040
+ header_params = opts[:header_params] || {}
3041
+ # HTTP header 'Accept' (if needed)
3042
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3043
+
3044
+ # form parameters
3045
+ form_params = opts[:form_params] || {}
3046
+
3047
+ # http body (model)
3048
+ post_body = opts[:debug_body]
3049
+
3050
+ # return_type
3051
+ return_type = opts[:debug_return_type] || 'Array<User>'
3052
+
3053
+ # auth_names
3054
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3055
+
3056
+ new_options = opts.merge(
3057
+ :operation => :"OrganizationApi.org_list_team_members",
3058
+ :header_params => header_params,
3059
+ :query_params => query_params,
3060
+ :form_params => form_params,
3061
+ :body => post_body,
3062
+ :auth_names => auth_names,
3063
+ :return_type => return_type
3064
+ )
3065
+
3066
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3067
+ if @api_client.config.debugging
3068
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_team_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3069
+ end
3070
+ return data, status_code, headers
3071
+ end
3072
+
3073
+ # List a particular repo of team
3074
+ # @param id [Integer] id of the team
3075
+ # @param org [String] organization that owns the repo to list
3076
+ # @param repo [String] name of the repo to list
3077
+ # @param [Hash] opts the optional parameters
3078
+ # @return [Repository]
3079
+ def org_list_team_repo(id, org, repo, opts = {})
3080
+ data, _status_code, _headers = org_list_team_repo_with_http_info(id, org, repo, opts)
3081
+ data
3082
+ end
3083
+
3084
+ # List a particular repo of team
3085
+ # @param id [Integer] id of the team
3086
+ # @param org [String] organization that owns the repo to list
3087
+ # @param repo [String] name of the repo to list
3088
+ # @param [Hash] opts the optional parameters
3089
+ # @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
3090
+ def org_list_team_repo_with_http_info(id, org, repo, opts = {})
3091
+ if @api_client.config.debugging
3092
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_team_repo ...'
3093
+ end
3094
+ # verify the required parameter 'id' is set
3095
+ if @api_client.config.client_side_validation && id.nil?
3096
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_list_team_repo"
3097
+ end
3098
+ # verify the required parameter 'org' is set
3099
+ if @api_client.config.client_side_validation && org.nil?
3100
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_team_repo"
3101
+ end
3102
+ # verify the required parameter 'repo' is set
3103
+ if @api_client.config.client_side_validation && repo.nil?
3104
+ fail ArgumentError, "Missing the required parameter 'repo' when calling OrganizationApi.org_list_team_repo"
3105
+ end
3106
+ # resource path
3107
+ local_var_path = '/teams/{id}/repos/{org}/{repo}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
3108
+
3109
+ # query parameters
3110
+ query_params = opts[:query_params] || {}
3111
+
3112
+ # header parameters
3113
+ header_params = opts[:header_params] || {}
3114
+ # HTTP header 'Accept' (if needed)
3115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3116
+
3117
+ # form parameters
3118
+ form_params = opts[:form_params] || {}
3119
+
3120
+ # http body (model)
3121
+ post_body = opts[:debug_body]
3122
+
3123
+ # return_type
3124
+ return_type = opts[:debug_return_type] || 'Repository'
3125
+
3126
+ # auth_names
3127
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3128
+
3129
+ new_options = opts.merge(
3130
+ :operation => :"OrganizationApi.org_list_team_repo",
3131
+ :header_params => header_params,
3132
+ :query_params => query_params,
3133
+ :form_params => form_params,
3134
+ :body => post_body,
3135
+ :auth_names => auth_names,
3136
+ :return_type => return_type
3137
+ )
3138
+
3139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3140
+ if @api_client.config.debugging
3141
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_team_repo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3142
+ end
3143
+ return data, status_code, headers
3144
+ end
3145
+
3146
+ # List a team's repos
3147
+ # @param id [Integer] id of the team
3148
+ # @param [Hash] opts the optional parameters
3149
+ # @option opts [Integer] :page page number of results to return (1-based)
3150
+ # @option opts [Integer] :limit page size of results
3151
+ # @return [Array<Repository>]
3152
+ def org_list_team_repos(id, opts = {})
3153
+ data, _status_code, _headers = org_list_team_repos_with_http_info(id, opts)
3154
+ data
3155
+ end
3156
+
3157
+ # List a team&#39;s repos
3158
+ # @param id [Integer] id of the team
3159
+ # @param [Hash] opts the optional parameters
3160
+ # @option opts [Integer] :page page number of results to return (1-based)
3161
+ # @option opts [Integer] :limit page size of results
3162
+ # @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
3163
+ def org_list_team_repos_with_http_info(id, opts = {})
3164
+ if @api_client.config.debugging
3165
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_team_repos ...'
3166
+ end
3167
+ # verify the required parameter 'id' is set
3168
+ if @api_client.config.client_side_validation && id.nil?
3169
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_list_team_repos"
3170
+ end
3171
+ # resource path
3172
+ local_var_path = '/teams/{id}/repos'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3173
+
3174
+ # query parameters
3175
+ query_params = opts[:query_params] || {}
3176
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3177
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3178
+
3179
+ # header parameters
3180
+ header_params = opts[:header_params] || {}
3181
+ # HTTP header 'Accept' (if needed)
3182
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3183
+
3184
+ # form parameters
3185
+ form_params = opts[:form_params] || {}
3186
+
3187
+ # http body (model)
3188
+ post_body = opts[:debug_body]
3189
+
3190
+ # return_type
3191
+ return_type = opts[:debug_return_type] || 'Array<Repository>'
3192
+
3193
+ # auth_names
3194
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3195
+
3196
+ new_options = opts.merge(
3197
+ :operation => :"OrganizationApi.org_list_team_repos",
3198
+ :header_params => header_params,
3199
+ :query_params => query_params,
3200
+ :form_params => form_params,
3201
+ :body => post_body,
3202
+ :auth_names => auth_names,
3203
+ :return_type => return_type
3204
+ )
3205
+
3206
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3207
+ if @api_client.config.debugging
3208
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_team_repos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3209
+ end
3210
+ return data, status_code, headers
3211
+ end
3212
+
3213
+ # List an organization's teams
3214
+ # @param org [String] name of the organization
3215
+ # @param [Hash] opts the optional parameters
3216
+ # @option opts [Integer] :page page number of results to return (1-based)
3217
+ # @option opts [Integer] :limit page size of results
3218
+ # @return [Array<Team>]
3219
+ def org_list_teams(org, opts = {})
3220
+ data, _status_code, _headers = org_list_teams_with_http_info(org, opts)
3221
+ data
3222
+ end
3223
+
3224
+ # List an organization&#39;s teams
3225
+ # @param org [String] name of the organization
3226
+ # @param [Hash] opts the optional parameters
3227
+ # @option opts [Integer] :page page number of results to return (1-based)
3228
+ # @option opts [Integer] :limit page size of results
3229
+ # @return [Array<(Array<Team>, Integer, Hash)>] Array<Team> data, response status code and response headers
3230
+ def org_list_teams_with_http_info(org, opts = {})
3231
+ if @api_client.config.debugging
3232
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_teams ...'
3233
+ end
3234
+ # verify the required parameter 'org' is set
3235
+ if @api_client.config.client_side_validation && org.nil?
3236
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_list_teams"
3237
+ end
3238
+ # resource path
3239
+ local_var_path = '/orgs/{org}/teams'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
3240
+
3241
+ # query parameters
3242
+ query_params = opts[:query_params] || {}
3243
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3244
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3245
+
3246
+ # header parameters
3247
+ header_params = opts[:header_params] || {}
3248
+ # HTTP header 'Accept' (if needed)
3249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3250
+
3251
+ # form parameters
3252
+ form_params = opts[:form_params] || {}
3253
+
3254
+ # http body (model)
3255
+ post_body = opts[:debug_body]
3256
+
3257
+ # return_type
3258
+ return_type = opts[:debug_return_type] || 'Array<Team>'
3259
+
3260
+ # auth_names
3261
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3262
+
3263
+ new_options = opts.merge(
3264
+ :operation => :"OrganizationApi.org_list_teams",
3265
+ :header_params => header_params,
3266
+ :query_params => query_params,
3267
+ :form_params => form_params,
3268
+ :body => post_body,
3269
+ :auth_names => auth_names,
3270
+ :return_type => return_type
3271
+ )
3272
+
3273
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3274
+ if @api_client.config.debugging
3275
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3276
+ end
3277
+ return data, status_code, headers
3278
+ end
3279
+
3280
+ # List a user's organizations
3281
+ # @param username [String] username of user
3282
+ # @param [Hash] opts the optional parameters
3283
+ # @option opts [Integer] :page page number of results to return (1-based)
3284
+ # @option opts [Integer] :limit page size of results
3285
+ # @return [Array<Organization>]
3286
+ def org_list_user_orgs(username, opts = {})
3287
+ data, _status_code, _headers = org_list_user_orgs_with_http_info(username, opts)
3288
+ data
3289
+ end
3290
+
3291
+ # List a user&#39;s organizations
3292
+ # @param username [String] username of user
3293
+ # @param [Hash] opts the optional parameters
3294
+ # @option opts [Integer] :page page number of results to return (1-based)
3295
+ # @option opts [Integer] :limit page size of results
3296
+ # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
3297
+ def org_list_user_orgs_with_http_info(username, opts = {})
3298
+ if @api_client.config.debugging
3299
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_list_user_orgs ...'
3300
+ end
3301
+ # verify the required parameter 'username' is set
3302
+ if @api_client.config.client_side_validation && username.nil?
3303
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_list_user_orgs"
3304
+ end
3305
+ # resource path
3306
+ local_var_path = '/users/{username}/orgs'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
3307
+
3308
+ # query parameters
3309
+ query_params = opts[:query_params] || {}
3310
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3311
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3312
+
3313
+ # header parameters
3314
+ header_params = opts[:header_params] || {}
3315
+ # HTTP header 'Accept' (if needed)
3316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3317
+
3318
+ # form parameters
3319
+ form_params = opts[:form_params] || {}
3320
+
3321
+ # http body (model)
3322
+ post_body = opts[:debug_body]
3323
+
3324
+ # return_type
3325
+ return_type = opts[:debug_return_type] || 'Array<Organization>'
3326
+
3327
+ # auth_names
3328
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3329
+
3330
+ new_options = opts.merge(
3331
+ :operation => :"OrganizationApi.org_list_user_orgs",
3332
+ :header_params => header_params,
3333
+ :query_params => query_params,
3334
+ :form_params => form_params,
3335
+ :body => post_body,
3336
+ :auth_names => auth_names,
3337
+ :return_type => return_type
3338
+ )
3339
+
3340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3341
+ if @api_client.config.debugging
3342
+ @api_client.config.logger.debug "API called: OrganizationApi#org_list_user_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3343
+ end
3344
+ return data, status_code, headers
3345
+ end
3346
+
3347
+ # Publicize a user's membership
3348
+ # @param org [String] name of the organization
3349
+ # @param username [String] username of the user
3350
+ # @param [Hash] opts the optional parameters
3351
+ # @return [nil]
3352
+ def org_publicize_member(org, username, opts = {})
3353
+ org_publicize_member_with_http_info(org, username, opts)
3354
+ nil
3355
+ end
3356
+
3357
+ # Publicize a user&#39;s membership
3358
+ # @param org [String] name of the organization
3359
+ # @param username [String] username of the user
3360
+ # @param [Hash] opts the optional parameters
3361
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3362
+ def org_publicize_member_with_http_info(org, username, opts = {})
3363
+ if @api_client.config.debugging
3364
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_publicize_member ...'
3365
+ end
3366
+ # verify the required parameter 'org' is set
3367
+ if @api_client.config.client_side_validation && org.nil?
3368
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_publicize_member"
3369
+ end
3370
+ # verify the required parameter 'username' is set
3371
+ if @api_client.config.client_side_validation && username.nil?
3372
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_publicize_member"
3373
+ end
3374
+ # resource path
3375
+ local_var_path = '/orgs/{org}/public_members/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
3376
+
3377
+ # query parameters
3378
+ query_params = opts[:query_params] || {}
3379
+
3380
+ # header parameters
3381
+ header_params = opts[:header_params] || {}
3382
+
3383
+ # form parameters
3384
+ form_params = opts[:form_params] || {}
3385
+
3386
+ # http body (model)
3387
+ post_body = opts[:debug_body]
3388
+
3389
+ # return_type
3390
+ return_type = opts[:debug_return_type]
3391
+
3392
+ # auth_names
3393
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3394
+
3395
+ new_options = opts.merge(
3396
+ :operation => :"OrganizationApi.org_publicize_member",
3397
+ :header_params => header_params,
3398
+ :query_params => query_params,
3399
+ :form_params => form_params,
3400
+ :body => post_body,
3401
+ :auth_names => auth_names,
3402
+ :return_type => return_type
3403
+ )
3404
+
3405
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3406
+ if @api_client.config.debugging
3407
+ @api_client.config.logger.debug "API called: OrganizationApi#org_publicize_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3408
+ end
3409
+ return data, status_code, headers
3410
+ end
3411
+
3412
+ # Remove a team member
3413
+ # @param id [Integer] id of the team
3414
+ # @param username [String] username of the user to remove
3415
+ # @param [Hash] opts the optional parameters
3416
+ # @return [nil]
3417
+ def org_remove_team_member(id, username, opts = {})
3418
+ org_remove_team_member_with_http_info(id, username, opts)
3419
+ nil
3420
+ end
3421
+
3422
+ # Remove a team member
3423
+ # @param id [Integer] id of the team
3424
+ # @param username [String] username of the user to remove
3425
+ # @param [Hash] opts the optional parameters
3426
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3427
+ def org_remove_team_member_with_http_info(id, username, opts = {})
3428
+ if @api_client.config.debugging
3429
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_remove_team_member ...'
3430
+ end
3431
+ # verify the required parameter 'id' is set
3432
+ if @api_client.config.client_side_validation && id.nil?
3433
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_remove_team_member"
3434
+ end
3435
+ # verify the required parameter 'username' is set
3436
+ if @api_client.config.client_side_validation && username.nil?
3437
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_remove_team_member"
3438
+ end
3439
+ # resource path
3440
+ local_var_path = '/teams/{id}/members/{username}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
3441
+
3442
+ # query parameters
3443
+ query_params = opts[:query_params] || {}
3444
+
3445
+ # header parameters
3446
+ header_params = opts[:header_params] || {}
3447
+
3448
+ # form parameters
3449
+ form_params = opts[:form_params] || {}
3450
+
3451
+ # http body (model)
3452
+ post_body = opts[:debug_body]
3453
+
3454
+ # return_type
3455
+ return_type = opts[:debug_return_type]
3456
+
3457
+ # auth_names
3458
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3459
+
3460
+ new_options = opts.merge(
3461
+ :operation => :"OrganizationApi.org_remove_team_member",
3462
+ :header_params => header_params,
3463
+ :query_params => query_params,
3464
+ :form_params => form_params,
3465
+ :body => post_body,
3466
+ :auth_names => auth_names,
3467
+ :return_type => return_type
3468
+ )
3469
+
3470
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
3471
+ if @api_client.config.debugging
3472
+ @api_client.config.logger.debug "API called: OrganizationApi#org_remove_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3473
+ end
3474
+ return data, status_code, headers
3475
+ end
3476
+
3477
+ # Remove a repository from a team
3478
+ # This does not delete the repository, it only removes the repository from the team.
3479
+ # @param id [Integer] id of the team
3480
+ # @param org [String] organization that owns the repo to remove
3481
+ # @param repo [String] name of the repo to remove
3482
+ # @param [Hash] opts the optional parameters
3483
+ # @return [nil]
3484
+ def org_remove_team_repository(id, org, repo, opts = {})
3485
+ org_remove_team_repository_with_http_info(id, org, repo, opts)
3486
+ nil
3487
+ end
3488
+
3489
+ # Remove a repository from a team
3490
+ # This does not delete the repository, it only removes the repository from the team.
3491
+ # @param id [Integer] id of the team
3492
+ # @param org [String] organization that owns the repo to remove
3493
+ # @param repo [String] name of the repo to remove
3494
+ # @param [Hash] opts the optional parameters
3495
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3496
+ def org_remove_team_repository_with_http_info(id, org, repo, opts = {})
3497
+ if @api_client.config.debugging
3498
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_remove_team_repository ...'
3499
+ end
3500
+ # verify the required parameter 'id' is set
3501
+ if @api_client.config.client_side_validation && id.nil?
3502
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationApi.org_remove_team_repository"
3503
+ end
3504
+ # verify the required parameter 'org' is set
3505
+ if @api_client.config.client_side_validation && org.nil?
3506
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_remove_team_repository"
3507
+ end
3508
+ # verify the required parameter 'repo' is set
3509
+ if @api_client.config.client_side_validation && repo.nil?
3510
+ fail ArgumentError, "Missing the required parameter 'repo' when calling OrganizationApi.org_remove_team_repository"
3511
+ end
3512
+ # resource path
3513
+ local_var_path = '/teams/{id}/repos/{org}/{repo}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
3514
+
3515
+ # query parameters
3516
+ query_params = opts[:query_params] || {}
3517
+
3518
+ # header parameters
3519
+ header_params = opts[:header_params] || {}
3520
+
3521
+ # form parameters
3522
+ form_params = opts[:form_params] || {}
3523
+
3524
+ # http body (model)
3525
+ post_body = opts[:debug_body]
3526
+
3527
+ # return_type
3528
+ return_type = opts[:debug_return_type]
3529
+
3530
+ # auth_names
3531
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3532
+
3533
+ new_options = opts.merge(
3534
+ :operation => :"OrganizationApi.org_remove_team_repository",
3535
+ :header_params => header_params,
3536
+ :query_params => query_params,
3537
+ :form_params => form_params,
3538
+ :body => post_body,
3539
+ :auth_names => auth_names,
3540
+ :return_type => return_type
3541
+ )
3542
+
3543
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
3544
+ if @api_client.config.debugging
3545
+ @api_client.config.logger.debug "API called: OrganizationApi#org_remove_team_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3546
+ end
3547
+ return data, status_code, headers
3548
+ end
3549
+
3550
+ # Unblock a user from the organization
3551
+ # @param org [String] name of the org
3552
+ # @param username [String] username of the user
3553
+ # @param [Hash] opts the optional parameters
3554
+ # @return [nil]
3555
+ def org_unblock_user(org, username, opts = {})
3556
+ org_unblock_user_with_http_info(org, username, opts)
3557
+ nil
3558
+ end
3559
+
3560
+ # Unblock a user from the organization
3561
+ # @param org [String] name of the org
3562
+ # @param username [String] username of the user
3563
+ # @param [Hash] opts the optional parameters
3564
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3565
+ def org_unblock_user_with_http_info(org, username, opts = {})
3566
+ if @api_client.config.debugging
3567
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_unblock_user ...'
3568
+ end
3569
+ # verify the required parameter 'org' is set
3570
+ if @api_client.config.client_side_validation && org.nil?
3571
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_unblock_user"
3572
+ end
3573
+ # verify the required parameter 'username' is set
3574
+ if @api_client.config.client_side_validation && username.nil?
3575
+ fail ArgumentError, "Missing the required parameter 'username' when calling OrganizationApi.org_unblock_user"
3576
+ end
3577
+ # resource path
3578
+ local_var_path = '/orgs/{org}/unblock/{username}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
3579
+
3580
+ # query parameters
3581
+ query_params = opts[:query_params] || {}
3582
+
3583
+ # header parameters
3584
+ header_params = opts[:header_params] || {}
3585
+
3586
+ # form parameters
3587
+ form_params = opts[:form_params] || {}
3588
+
3589
+ # http body (model)
3590
+ post_body = opts[:debug_body]
3591
+
3592
+ # return_type
3593
+ return_type = opts[:debug_return_type]
3594
+
3595
+ # auth_names
3596
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3597
+
3598
+ new_options = opts.merge(
3599
+ :operation => :"OrganizationApi.org_unblock_user",
3600
+ :header_params => header_params,
3601
+ :query_params => query_params,
3602
+ :form_params => form_params,
3603
+ :body => post_body,
3604
+ :auth_names => auth_names,
3605
+ :return_type => return_type
3606
+ )
3607
+
3608
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3609
+ if @api_client.config.debugging
3610
+ @api_client.config.logger.debug "API called: OrganizationApi#org_unblock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3611
+ end
3612
+ return data, status_code, headers
3613
+ end
3614
+
3615
+ # Update Avatar
3616
+ # @param org [String] name of the organization
3617
+ # @param [Hash] opts the optional parameters
3618
+ # @option opts [UpdateUserAvatarOption] :body
3619
+ # @return [nil]
3620
+ def org_update_avatar(org, opts = {})
3621
+ org_update_avatar_with_http_info(org, opts)
3622
+ nil
3623
+ end
3624
+
3625
+ # Update Avatar
3626
+ # @param org [String] name of the organization
3627
+ # @param [Hash] opts the optional parameters
3628
+ # @option opts [UpdateUserAvatarOption] :body
3629
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3630
+ def org_update_avatar_with_http_info(org, opts = {})
3631
+ if @api_client.config.debugging
3632
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.org_update_avatar ...'
3633
+ end
3634
+ # verify the required parameter 'org' is set
3635
+ if @api_client.config.client_side_validation && org.nil?
3636
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.org_update_avatar"
3637
+ end
3638
+ # resource path
3639
+ local_var_path = '/orgs/{org}/avatar'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
3640
+
3641
+ # query parameters
3642
+ query_params = opts[:query_params] || {}
3643
+
3644
+ # header parameters
3645
+ header_params = opts[:header_params] || {}
3646
+ # HTTP header 'Content-Type'
3647
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
3648
+ if !content_type.nil?
3649
+ header_params['Content-Type'] = content_type
3650
+ end
3651
+
3652
+ # form parameters
3653
+ form_params = opts[:form_params] || {}
3654
+
3655
+ # http body (model)
3656
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
3657
+
3658
+ # return_type
3659
+ return_type = opts[:debug_return_type]
3660
+
3661
+ # auth_names
3662
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3663
+
3664
+ new_options = opts.merge(
3665
+ :operation => :"OrganizationApi.org_update_avatar",
3666
+ :header_params => header_params,
3667
+ :query_params => query_params,
3668
+ :form_params => form_params,
3669
+ :body => post_body,
3670
+ :auth_names => auth_names,
3671
+ :return_type => return_type
3672
+ )
3673
+
3674
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3675
+ if @api_client.config.debugging
3676
+ @api_client.config.logger.debug "API called: OrganizationApi#org_update_avatar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3677
+ end
3678
+ return data, status_code, headers
3679
+ end
3680
+
3681
+ # Search for teams within an organization
3682
+ # @param org [String] name of the organization
3683
+ # @param [Hash] opts the optional parameters
3684
+ # @option opts [String] :q keywords to search
3685
+ # @option opts [Boolean] :include_desc include search within team description (defaults to true)
3686
+ # @option opts [Integer] :page page number of results to return (1-based)
3687
+ # @option opts [Integer] :limit page size of results
3688
+ # @return [TeamSearch200Response]
3689
+ def team_search(org, opts = {})
3690
+ data, _status_code, _headers = team_search_with_http_info(org, opts)
3691
+ data
3692
+ end
3693
+
3694
+ # Search for teams within an organization
3695
+ # @param org [String] name of the organization
3696
+ # @param [Hash] opts the optional parameters
3697
+ # @option opts [String] :q keywords to search
3698
+ # @option opts [Boolean] :include_desc include search within team description (defaults to true)
3699
+ # @option opts [Integer] :page page number of results to return (1-based)
3700
+ # @option opts [Integer] :limit page size of results
3701
+ # @return [Array<(TeamSearch200Response, Integer, Hash)>] TeamSearch200Response data, response status code and response headers
3702
+ def team_search_with_http_info(org, opts = {})
3703
+ if @api_client.config.debugging
3704
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.team_search ...'
3705
+ end
3706
+ # verify the required parameter 'org' is set
3707
+ if @api_client.config.client_side_validation && org.nil?
3708
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.team_search"
3709
+ end
3710
+ # resource path
3711
+ local_var_path = '/orgs/{org}/teams/search'.sub('{' + 'org' + '}', CGI.escape(org.to_s))
3712
+
3713
+ # query parameters
3714
+ query_params = opts[:query_params] || {}
3715
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
3716
+ query_params[:'include_desc'] = opts[:'include_desc'] if !opts[:'include_desc'].nil?
3717
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3718
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3719
+
3720
+ # header parameters
3721
+ header_params = opts[:header_params] || {}
3722
+ # HTTP header 'Accept' (if needed)
3723
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3724
+
3725
+ # form parameters
3726
+ form_params = opts[:form_params] || {}
3727
+
3728
+ # http body (model)
3729
+ post_body = opts[:debug_body]
3730
+
3731
+ # return_type
3732
+ return_type = opts[:debug_return_type] || 'TeamSearch200Response'
3733
+
3734
+ # auth_names
3735
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3736
+
3737
+ new_options = opts.merge(
3738
+ :operation => :"OrganizationApi.team_search",
3739
+ :header_params => header_params,
3740
+ :query_params => query_params,
3741
+ :form_params => form_params,
3742
+ :body => post_body,
3743
+ :auth_names => auth_names,
3744
+ :return_type => return_type
3745
+ )
3746
+
3747
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3748
+ if @api_client.config.debugging
3749
+ @api_client.config.logger.debug "API called: OrganizationApi#team_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3750
+ end
3751
+ return data, status_code, headers
3752
+ end
3753
+
3754
+ # Create or Update a secret value in an organization
3755
+ # @param org [String] name of organization
3756
+ # @param secretname [String] name of the secret
3757
+ # @param [Hash] opts the optional parameters
3758
+ # @option opts [CreateOrUpdateSecretOption] :body
3759
+ # @return [nil]
3760
+ def update_org_secret(org, secretname, opts = {})
3761
+ update_org_secret_with_http_info(org, secretname, opts)
3762
+ nil
3763
+ end
3764
+
3765
+ # Create or Update a secret value in an organization
3766
+ # @param org [String] name of organization
3767
+ # @param secretname [String] name of the secret
3768
+ # @param [Hash] opts the optional parameters
3769
+ # @option opts [CreateOrUpdateSecretOption] :body
3770
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3771
+ def update_org_secret_with_http_info(org, secretname, opts = {})
3772
+ if @api_client.config.debugging
3773
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.update_org_secret ...'
3774
+ end
3775
+ # verify the required parameter 'org' is set
3776
+ if @api_client.config.client_side_validation && org.nil?
3777
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.update_org_secret"
3778
+ end
3779
+ # verify the required parameter 'secretname' is set
3780
+ if @api_client.config.client_side_validation && secretname.nil?
3781
+ fail ArgumentError, "Missing the required parameter 'secretname' when calling OrganizationApi.update_org_secret"
3782
+ end
3783
+ # resource path
3784
+ local_var_path = '/orgs/{org}/actions/secrets/{secretname}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'secretname' + '}', CGI.escape(secretname.to_s))
3785
+
3786
+ # query parameters
3787
+ query_params = opts[:query_params] || {}
3788
+
3789
+ # header parameters
3790
+ header_params = opts[:header_params] || {}
3791
+ # HTTP header 'Content-Type'
3792
+ content_type = @api_client.select_header_content_type(['application/json'])
3793
+ if !content_type.nil?
3794
+ header_params['Content-Type'] = content_type
3795
+ end
3796
+
3797
+ # form parameters
3798
+ form_params = opts[:form_params] || {}
3799
+
3800
+ # http body (model)
3801
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
3802
+
3803
+ # return_type
3804
+ return_type = opts[:debug_return_type]
3805
+
3806
+ # auth_names
3807
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3808
+
3809
+ new_options = opts.merge(
3810
+ :operation => :"OrganizationApi.update_org_secret",
3811
+ :header_params => header_params,
3812
+ :query_params => query_params,
3813
+ :form_params => form_params,
3814
+ :body => post_body,
3815
+ :auth_names => auth_names,
3816
+ :return_type => return_type
3817
+ )
3818
+
3819
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3820
+ if @api_client.config.debugging
3821
+ @api_client.config.logger.debug "API called: OrganizationApi#update_org_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3822
+ end
3823
+ return data, status_code, headers
3824
+ end
3825
+
3826
+ # Update an org-level variable
3827
+ # @param org [String] name of the organization
3828
+ # @param variablename [String] name of the variable
3829
+ # @param [Hash] opts the optional parameters
3830
+ # @option opts [UpdateVariableOption] :body
3831
+ # @return [nil]
3832
+ def update_org_variable(org, variablename, opts = {})
3833
+ update_org_variable_with_http_info(org, variablename, opts)
3834
+ nil
3835
+ end
3836
+
3837
+ # Update an org-level variable
3838
+ # @param org [String] name of the organization
3839
+ # @param variablename [String] name of the variable
3840
+ # @param [Hash] opts the optional parameters
3841
+ # @option opts [UpdateVariableOption] :body
3842
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3843
+ def update_org_variable_with_http_info(org, variablename, opts = {})
3844
+ if @api_client.config.debugging
3845
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.update_org_variable ...'
3846
+ end
3847
+ # verify the required parameter 'org' is set
3848
+ if @api_client.config.client_side_validation && org.nil?
3849
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrganizationApi.update_org_variable"
3850
+ end
3851
+ # verify the required parameter 'variablename' is set
3852
+ if @api_client.config.client_side_validation && variablename.nil?
3853
+ fail ArgumentError, "Missing the required parameter 'variablename' when calling OrganizationApi.update_org_variable"
3854
+ end
3855
+ # resource path
3856
+ local_var_path = '/orgs/{org}/actions/variables/{variablename}'.sub('{' + 'org' + '}', CGI.escape(org.to_s)).sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
3857
+
3858
+ # query parameters
3859
+ query_params = opts[:query_params] || {}
3860
+
3861
+ # header parameters
3862
+ header_params = opts[:header_params] || {}
3863
+ # HTTP header 'Content-Type'
3864
+ content_type = @api_client.select_header_content_type(['application/json'])
3865
+ if !content_type.nil?
3866
+ header_params['Content-Type'] = content_type
3867
+ end
3868
+
3869
+ # form parameters
3870
+ form_params = opts[:form_params] || {}
3871
+
3872
+ # http body (model)
3873
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
3874
+
3875
+ # return_type
3876
+ return_type = opts[:debug_return_type]
3877
+
3878
+ # auth_names
3879
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
3880
+
3881
+ new_options = opts.merge(
3882
+ :operation => :"OrganizationApi.update_org_variable",
3883
+ :header_params => header_params,
3884
+ :query_params => query_params,
3885
+ :form_params => form_params,
3886
+ :body => post_body,
3887
+ :auth_names => auth_names,
3888
+ :return_type => return_type
3889
+ )
3890
+
3891
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3892
+ if @api_client.config.debugging
3893
+ @api_client.config.logger.debug "API called: OrganizationApi#update_org_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3894
+ end
3895
+ return data, status_code, headers
3896
+ end
3897
+ end
3898
+ end