gopad 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c80f16670e8c67cf59de788ae0691f29dcc4e28ff63013e699cefa4e1a630f4b
4
+ data.tar.gz: 87cafb319781a1b95262f7dfc4a24e112d1ed7ccc8601827e6c43df4bc8ea434
5
+ SHA512:
6
+ metadata.gz: f230a243c0c5f616087986b26f9360af251c4d69dfe108931164529d3b360c5f2885fd0202743ecf5f7305b5e807b26de31308e2c3a5973131acd5d63024e100
7
+ data.tar.gz: 0317432cce69eb629f8c50eec0a4edf5aad047e8962f6396c5febb1dc57c37762688dd2f8fc7a6732ffafa55e8dfb4c725d123bceed275baf1b91342308cbb6e
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2024-05-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * automated openapi client update ([449aef4](https://github.com/gopad/gopad-ruby/commit/449aef42b020679b6cc20890703e57bcb9ec205f))
9
+ * **deps:** update dependency rake to '~> 13.2.0' ([8557c3c](https://github.com/gopad/gopad-ruby/commit/8557c3ccdc8ef0b5e1abae6be94ddcf029bacd40))
10
+ * **deps:** update dependency rspec to '~> 3.13.0' ([2cb4a4a](https://github.com/gopad/gopad-ruby/commit/2cb4a4aafeb2518280ec88bce0198d911b26f58a))
11
+ * **deps:** update dependency rubocop to '~> 0.93.0' ([9c7be3c](https://github.com/gopad/gopad-ruby/commit/9c7be3c3d65fda448ce9b98328505133602c6a12))
12
+ * **deps:** update dependency rubocop to v1 ([2fa7355](https://github.com/gopad/gopad-ruby/commit/2fa7355962596968208ca6b0be7aa66cdd716bff))
13
+ * integrate openapi client sdk ([e72ee82](https://github.com/gopad/gopad-ruby/commit/e72ee82a7aa8f87cccf33027cd1fdaab1bb137b2))
14
+
15
+
16
+ ### Bugfixes
17
+
18
+ * always use bundle exec ([a1e9744](https://github.com/gopad/gopad-ruby/commit/a1e9744beb544e1cd79ff9104f982ae850c3281f))
19
+ * make the linter happy again ([b68a44f](https://github.com/gopad/gopad-ruby/commit/b68a44f16642ee8c86202bae17e52060a58c8862))
20
+ * use faraday instead of typhoeus ([3eac24f](https://github.com/gopad/gopad-ruby/commit/3eac24f8c0437758cd70a6f7010318dba8faf59c))
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,121 @@
1
+ # Contributing to Gopad
2
+
3
+ Welcome! Our community focuses on helping others and making this project the
4
+ best it can be. We gladly accept contributions and encourage you to get
5
+ involved!
6
+
7
+ ## Bug reports
8
+
9
+ Please search the issues on the issue tracker with a variety of keywords to
10
+ ensure your bug is not already reported.
11
+
12
+ If unique, [open an issue][issues] and
13
+ answer the questions so we can understand and reproduce the problematic
14
+ behavior.
15
+
16
+ The burden is on you to convince us that it is actually a bug in our project.
17
+ This is easiest to do when you write clear, concise instructions so we can
18
+ reproduce the behavior (even if it seems obvious). The more detailed and
19
+ specific you are, the faster we will be able to help you. Check out
20
+ [How to Report Bugs Effectively][bugreport].
21
+
22
+ Please be kind, remember that this project comes at no cost to you, and you're
23
+ getting free help.
24
+
25
+ ## Check for assigned people
26
+
27
+ We are using Github Issues for submitting known issues, e.g. bugs, features,
28
+ etc. Some issues will have someone assigned, meaning that there's already
29
+ someone that takes responsability for fixing said issue. This is not done to
30
+ discourage contributions, rather to not step in the work that has already been
31
+ done by the assignee. If you want to work on a known issue with someone already
32
+ assigned to it, please consider contacting the assignee first, e.g. by
33
+ mentioning the assignee in a new comment on the specific issue. This way you can
34
+ contribute with ideas, or even with code if the assignee decides that you can
35
+ step in.
36
+
37
+ If you plan to work on a non assigned issue, please add a comment on the issue
38
+ to prevent duplicated work.
39
+
40
+ ## Minor improvements and new tests
41
+
42
+ Submit pull requests at any time for minor changes or new tests. Make sure to
43
+ write tests to assert your change is working properly and is thoroughly covered.
44
+ We'll ask most pull requests to be squashed, especially with small commits.
45
+
46
+ Your pull request may be thoroughly reviewed. This is because if we accept the
47
+ PR, we also assume responsibility for it, although we would prefer you to help
48
+ maintain your code after it gets merged.
49
+
50
+ ## Mind the Style
51
+
52
+ We believe that in order to have a healthy codebase we need to abide to a
53
+ certain code style. We use `gofmt` with Go and `eslint` with Javscript for this
54
+ matter, which are tools that has proved to be useful. So, before submitting your
55
+ pull request, make sure that `gofmt` and if viable `eslint` are passing for you.
56
+
57
+ Finally, note that `gofmt` and if viable `eslint` are called on the CI system.
58
+ This means that your pull request will not be merged until the changes are
59
+ approved.
60
+
61
+ ## Update the Changelog
62
+
63
+ We keep a changelog in the `CHANGELOG.md` file. This is useful to understand
64
+ what has changed between each version. When you implement a new feature, or a
65
+ fix for an issue, please also update the `CHANGELOG.md` file accordingly. We
66
+ don't follow a strict style for the changelog, just try to be consistent with
67
+ the rest of the file.
68
+
69
+ ## Sign your work
70
+
71
+ The sign-off is a simple line at the end of the explanation for the patch. Your
72
+ signature certifies that you wrote the patch or otherwise have the right to pass
73
+ it on as an open-source patch. The rules are pretty simple: If you can certify
74
+ [DCO](./DCO), then you just add a line to every git commit message:
75
+
76
+ ```console
77
+ Signed-off-by: Joe Smith <joe.smith@example.com>
78
+ ```
79
+
80
+ Please use your real name, we really dislike pseudonyms or anonymous
81
+ contributions. We are in the opensource world without secrets. If you set your
82
+ `user.name` and `user.email` git configs, you can sign your commit automatically
83
+ with `git commit -s`.
84
+
85
+ ## Collaborator status
86
+
87
+ If your pull request is merged, congratulations! You're technically a
88
+ collaborator. We may also grant you "collaborator status" which means you can
89
+ push to the repository and merge other pull requests. We hope that you will stay
90
+ involved by reviewing pull requests, submitting more of your own, and resolving
91
+ issues as you are able to. Thanks for making this project amazing!
92
+
93
+ We ask that collaborators will conduct thorough code reviews and be nice to new
94
+ contributors. Before merging a PR, it's best to get the approval of at least one
95
+ or two other collaborators and/or the project owner. We prefer squashed commits
96
+ instead of many little, semantically-unimportant commits. Also, CI and other
97
+ post-commit hooks must pass before being merged except in certain unusual
98
+ circumstances.
99
+
100
+ Collaborator status may be removed for inactive users from time to time as we
101
+ see fit; this is not an insult, just a basic security precaution in case the
102
+ account becomes inactive or abandoned. Privileges can always be restored later.
103
+
104
+ **Reviewing pull requests:** Please help submit and review pull requests as you
105
+ are able! We would ask that every pull request be reviewed by at least one
106
+ collaborator who did not open the pull request before merging. This will help
107
+ ensure high code quality as new collaborators are added to the project.
108
+
109
+ ## Vulnerabilities
110
+
111
+ If you've found a vulnerability that is serious, please email to
112
+ gopad@webhippie.de. If it's not a big deal, a pull request will probably be
113
+ faster.
114
+
115
+ ## Thank you
116
+
117
+ Thanks for your help! This project would not be what it is today without your
118
+ contributions.
119
+
120
+ [issues]: https://github.com/gopad/gopad-ruby/issues
121
+ [bugreport]: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
data/DCO ADDED
@@ -0,0 +1,34 @@
1
+ Developer Certificate of Origin
2
+ Version 1.1
3
+
4
+ Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies of this
7
+ license document, but changing it is not allowed.
8
+
9
+
10
+ Developer's Certificate of Origin 1.1
11
+
12
+ By making a contribution to this project, I certify that:
13
+
14
+ (a) The contribution was created in whole or in part by me and I
15
+ have the right to submit it under the open source license
16
+ indicated in the file; or
17
+
18
+ (b) The contribution is based upon previous work that, to the best
19
+ of my knowledge, is covered under an appropriate open source
20
+ license and I have the right under that license to submit that
21
+ work with modifications, whether created in whole or in part
22
+ by me, under the same open source license (unless I am
23
+ permitted to submit under a different license), as indicated
24
+ in the file; or
25
+
26
+ (c) The contribution was provided directly to me by some other
27
+ person who certified (a), (b) or (c) and I have not modified
28
+ it.
29
+
30
+ (d) I understand and agree that this project and the contribution
31
+ are public and that a record of the contribution (including all
32
+ personal information I submit with it, including my sign-off) is
33
+ maintained indefinitely and may be redistributed consistent with
34
+ this project or the open source license(s) involved.
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Gopad: SDK for Ruby
2
+
3
+ [![General Workflow](https://github.com/gopad/gopad-ruby/actions/workflows/general.yml/badge.svg)](https://github.com/gopad/gopad-ruby/actions/workflows/general.yml) [![Join the Matrix chat at https://matrix.to/#/#gopad:matrix.org](https://img.shields.io/badge/matrix-%23gopad%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gopad:matrix.org) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a67aa8f794e5454b9106c73a7da5a57a)](https://app.codacy.com/gh/gopad/gopad-ruby/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Gem Version](https://badge.fury.io/rb/gopad.svg)](https://badge.fury.io/rb/gopad)
4
+
5
+ This repository provides a client SDK for Ruby. This SDK is automatically
6
+ generated by the [OpenAPI Generator][generator] project:
7
+
8
+ - API version: 1.0.0-alpha1
9
+ - Package version: 1.0.0
10
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
11
+
12
+ For more information, please visit [https://gopad.eu](https://gopad.eu)
13
+
14
+ ## Installation
15
+
16
+ ### Build a gem
17
+
18
+ If you want to build an unreleased version of this library you are able to build
19
+ it locally with the following command, afterwards you should be able to install
20
+ the built gem:
21
+
22
+ ```console
23
+ gem build gopad.gemspec
24
+ gem install ./gopad-1.0.0.gem
25
+ ```
26
+
27
+ ### Install from Rubygems
28
+
29
+ If you want to use a a properly released version hosted Rubygems you just need
30
+ to add the following line to your Gemfile:
31
+
32
+ ```ruby
33
+ gem 'gopad', '~> 1.0.0'
34
+ ```
35
+
36
+ ### Install from Git
37
+
38
+ If the gem is hosted at a git repository, then add the following in the Gemfile:
39
+
40
+ ```ruby
41
+ gem 'gopad', :git => 'https://github.com/gopad/gopad-ruby.git'
42
+ ```
43
+
44
+ ## Security
45
+
46
+ If you find a security issue please contact
47
+ [gopad@webhippie.de](mailto:gopad@webhippie.de) first.
48
+
49
+ ## Contributing
50
+
51
+ Fork -> Patch -> Push -> Pull Request
52
+
53
+ ## Authors
54
+
55
+ - [Thomas Boerger](https://github.com/tboerger)
56
+
57
+ ## License
58
+
59
+ Apache-2.0
60
+
61
+ ## Copyright
62
+
63
+ ```console
64
+ Copyright (c) 2018 Thomas Boerger <thomas@webhippie.de>
65
+ ```
66
+
67
+ [generator]: https://openapi-generator.tech
@@ -0,0 +1,154 @@
1
+ # Gopad OpenAPI
2
+ #
3
+ # API definition for Gopad, Etherpad for markdown with go
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0-alpha1
6
+ # Contact: gopad@webhippie.de
7
+ # Generated by: https://openapi-generator.tech
8
+ # Generator version: 7.6.0
9
+ #
10
+
11
+ require 'cgi'
12
+
13
+ module Gopad
14
+ class AuthApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+
21
+ # Callback for external authentication
22
+ # @param provider [String] An identifier for the auth provider
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [String] :state Auth state
25
+ # @option opts [String] :code Auth code
26
+ # @return [Notification]
27
+ def external_callback(provider, opts = {})
28
+ data, _status_code, _headers = external_callback_with_http_info(provider, opts)
29
+ data
30
+ end
31
+
32
+ # Callback for external authentication
33
+ # @param provider [String] An identifier for the auth provider
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :state Auth state
36
+ # @option opts [String] :code Auth code
37
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
38
+ def external_callback_with_http_info(provider, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: AuthApi.external_callback ...'
41
+ end
42
+ # verify the required parameter 'provider' is set
43
+ if @api_client.config.client_side_validation && provider.nil?
44
+ raise ArgumentError, "Missing the required parameter 'provider' when calling AuthApi.external_callback"
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = '/auth/{provider}/callback'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:state] = opts[:state] unless opts[:state].nil?
53
+ query_params[:code] = opts[:code] unless opts[:code].nil?
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body]
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'Notification'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || []
71
+
72
+ new_options = opts.merge(
73
+ operation: :'AuthApi.external_callback',
74
+ header_params: header_params,
75
+ query_params: query_params,
76
+ form_params: form_params,
77
+ body: post_body,
78
+ auth_names: auth_names,
79
+ return_type: return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: AuthApi#external_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ [data, status_code, headers]
87
+ end
88
+
89
+ # Initialize the external authentication
90
+ # @param provider [String] An identifier for the auth provider
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :state Auth state
93
+ # @return [Notification]
94
+ def external_initialize(provider, opts = {})
95
+ data, _status_code, _headers = external_initialize_with_http_info(provider, opts)
96
+ data
97
+ end
98
+
99
+ # Initialize the external authentication
100
+ # @param provider [String] An identifier for the auth provider
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :state Auth state
103
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
104
+ def external_initialize_with_http_info(provider, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: AuthApi.external_initialize ...'
107
+ end
108
+ # verify the required parameter 'provider' is set
109
+ if @api_client.config.client_side_validation && provider.nil?
110
+ raise ArgumentError, "Missing the required parameter 'provider' when calling AuthApi.external_initialize"
111
+ end
112
+
113
+ # resource path
114
+ local_var_path = '/auth/{provider}/initialize'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+ query_params[:state] = opts[:state] unless opts[:state].nil?
119
+
120
+ # header parameters
121
+ header_params = opts[:header_params] || {}
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:debug_body]
130
+
131
+ # return_type
132
+ return_type = opts[:debug_return_type] || 'Notification'
133
+
134
+ # auth_names
135
+ auth_names = opts[:debug_auth_names] || []
136
+
137
+ new_options = opts.merge(
138
+ operation: :'AuthApi.external_initialize',
139
+ header_params: header_params,
140
+ query_params: query_params,
141
+ form_params: form_params,
142
+ body: post_body,
143
+ auth_names: auth_names,
144
+ return_type: return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: AuthApi#external_initialize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ [data, status_code, headers]
152
+ end
153
+ end
154
+ end