wcc_ministries_client 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +68 -0
  4. data/README.md +108 -0
  5. data/Rakefile +10 -0
  6. data/bin/gen +32 -0
  7. data/docs/Asset.md +22 -0
  8. data/docs/AssetFile.md +24 -0
  9. data/docs/AssetFileDetails.md +20 -0
  10. data/docs/AssetFileDetailsImage.md +20 -0
  11. data/docs/CachingMeta.md +20 -0
  12. data/docs/DeletedMinistry.md +20 -0
  13. data/docs/InlineResponse200.md +24 -0
  14. data/docs/InlineResponse2001.md +20 -0
  15. data/docs/InlineResponse200Links.md +26 -0
  16. data/docs/InlineResponse200Meta.md +22 -0
  17. data/docs/Ministry.md +28 -0
  18. data/docs/MinistryApi.md +141 -0
  19. data/docs/MinistryAttributes.md +24 -0
  20. data/docs/MinistryLinks.md +18 -0
  21. data/docs/MinistryRelationships.md +18 -0
  22. data/docs/Page.md +26 -0
  23. data/docs/PageAttributes.md +24 -0
  24. data/docs/PageLinks.md +18 -0
  25. data/docs/PageRelationship.md +18 -0
  26. data/docs/PageRelationshipData.md +20 -0
  27. data/git_push.sh +58 -0
  28. data/lib/wcc_ministries_client/api/ministry_api.rb +149 -0
  29. data/lib/wcc_ministries_client/api_client.rb +389 -0
  30. data/lib/wcc_ministries_client/api_error.rb +57 -0
  31. data/lib/wcc_ministries_client/configuration.rb +270 -0
  32. data/lib/wcc_ministries_client/models/asset.rb +244 -0
  33. data/lib/wcc_ministries_client/models/asset_file.rb +249 -0
  34. data/lib/wcc_ministries_client/models/asset_file_details.rb +226 -0
  35. data/lib/wcc_ministries_client/models/asset_file_details_image.rb +237 -0
  36. data/lib/wcc_ministries_client/models/caching_meta.rb +237 -0
  37. data/lib/wcc_ministries_client/models/deleted_ministry.rb +271 -0
  38. data/lib/wcc_ministries_client/models/inline_response200.rb +262 -0
  39. data/lib/wcc_ministries_client/models/inline_response2001.rb +232 -0
  40. data/lib/wcc_ministries_client/models/inline_response200_links.rb +272 -0
  41. data/lib/wcc_ministries_client/models/inline_response200_meta.rb +252 -0
  42. data/lib/wcc_ministries_client/models/ministry.rb +327 -0
  43. data/lib/wcc_ministries_client/models/ministry_attributes.rb +258 -0
  44. data/lib/wcc_ministries_client/models/ministry_links.rb +222 -0
  45. data/lib/wcc_ministries_client/models/ministry_relationships.rb +216 -0
  46. data/lib/wcc_ministries_client/models/page.rb +313 -0
  47. data/lib/wcc_ministries_client/models/page_attributes.rb +263 -0
  48. data/lib/wcc_ministries_client/models/page_links.rb +222 -0
  49. data/lib/wcc_ministries_client/models/page_relationship.rb +221 -0
  50. data/lib/wcc_ministries_client/models/page_relationship_data.rb +269 -0
  51. data/lib/wcc_ministries_client/version.rb +19 -0
  52. data/lib/wcc_ministries_client.rb +59 -0
  53. data/openapitools.json +23 -0
  54. data/pkg/wcc_ministries_client-1.0.0.gem +0 -0
  55. data/spec/api/ministry_api_spec.rb +60 -0
  56. data/spec/api_client_spec.rb +226 -0
  57. data/spec/configuration_spec.rb +42 -0
  58. data/spec/models/asset_file_details_image_spec.rb +40 -0
  59. data/spec/models/asset_file_details_spec.rb +40 -0
  60. data/spec/models/asset_file_spec.rb +52 -0
  61. data/spec/models/asset_spec.rb +46 -0
  62. data/spec/models/caching_meta_spec.rb +40 -0
  63. data/spec/models/deleted_ministry_spec.rb +44 -0
  64. data/spec/models/inline_response2001_spec.rb +40 -0
  65. data/spec/models/inline_response200_links_spec.rb +58 -0
  66. data/spec/models/inline_response200_meta_spec.rb +46 -0
  67. data/spec/models/inline_response200_spec.rb +52 -0
  68. data/spec/models/ministry_attributes_spec.rb +52 -0
  69. data/spec/models/ministry_links_spec.rb +34 -0
  70. data/spec/models/ministry_relationships_spec.rb +34 -0
  71. data/spec/models/ministry_spec.rb +68 -0
  72. data/spec/models/page_attributes_spec.rb +52 -0
  73. data/spec/models/page_links_spec.rb +34 -0
  74. data/spec/models/page_relationship_data_spec.rb +44 -0
  75. data/spec/models/page_relationship_spec.rb +34 -0
  76. data/spec/models/page_spec.rb +62 -0
  77. data/spec/spec_helper.rb +111 -0
  78. data/swagger.json +425 -0
  79. data/wcc_ministries_client.gemspec +38 -0
  80. metadata +185 -0
@@ -0,0 +1,18 @@
1
+ # WCC::Ministries::Client::MinistryRelationships
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **homepage** | [**PageRelationship**](PageRelationship.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'wcc_ministries_client'
13
+
14
+ instance = WCC::Ministries::Client::MinistryRelationships.new(
15
+ homepage: null
16
+ )
17
+ ```
18
+
data/docs/Page.md ADDED
@@ -0,0 +1,26 @@
1
+ # WCC::Ministries::Client::Page
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The unique ID of the Page. Referenced by the Ministry Homepage. | |
8
+ | **type** | **String** | Always the literal string 'page'. This is used as a discriminator. | |
9
+ | **attributes** | [**PageAttributes**](PageAttributes.md) | | |
10
+ | **links** | [**PageLinks**](PageLinks.md) | | |
11
+ | **meta** | [**CachingMeta**](CachingMeta.md) | | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'wcc_ministries_client'
17
+
18
+ instance = WCC::Ministries::Client::Page.new(
19
+ id: 5GFx0YjJTczOBNyFUASQAu,
20
+ type: page,
21
+ attributes: null,
22
+ links: null,
23
+ meta: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,24 @@
1
+ # WCC::Ministries::Client::PageAttributes
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **slug** | **String** | | |
8
+ | **title** | **String** | | |
9
+ | **description** | **String** | | |
10
+ | **display_title** | **Boolean** | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'wcc_ministries_client'
16
+
17
+ instance = WCC::Ministries::Client::PageAttributes.new(
18
+ slug: /re-generation,
19
+ title: Re:Generation,
20
+ description: A biblically-based 12-step recovery program,
21
+ display_title: null
22
+ )
23
+ ```
24
+
data/docs/PageLinks.md ADDED
@@ -0,0 +1,18 @@
1
+ # WCC::Ministries::Client::PageLinks
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **canonical** | **String** | A link to the canonical landing page for this ministry. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'wcc_ministries_client'
13
+
14
+ instance = WCC::Ministries::Client::PageLinks.new(
15
+ canonical: https://www.watermark.org/ministries/re-generation
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # WCC::Ministries::Client::PageRelationship
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**PageRelationshipData**](PageRelationshipData.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'wcc_ministries_client'
13
+
14
+ instance = WCC::Ministries::Client::PageRelationship.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # WCC::Ministries::Client::PageRelationshipData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | | |
8
+ | **id** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'wcc_ministries_client'
14
+
15
+ instance = WCC::Ministries::Client::PageRelationshipData.new(
16
+ type: null,
17
+ id: 5GFx0YjJTczOBNyFUASQAu
18
+ )
19
+ ```
20
+
data/git_push.sh ADDED
@@ -0,0 +1,58 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=`git remote`
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
58
+
@@ -0,0 +1,149 @@
1
+ =begin
2
+ #WCC Ministries API
3
+
4
+ #WCC Ministries API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: dev@watermark.org
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: unset
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module WCC::Ministries::Client
16
+ class MinistryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a single ministry by ID
23
+ # @param id [String] The UUID of the ministry
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [InlineResponse2001]
26
+ def get_ministry(id, opts = {})
27
+ data, _status_code, _headers = get_ministry_with_http_info(id, opts)
28
+ data
29
+ end
30
+
31
+ # Get a single ministry by ID
32
+ # @param id [String] The UUID of the ministry
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
35
+ def get_ministry_with_http_info(id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: MinistryApi.get_ministry ...'
38
+ end
39
+ # verify the required parameter 'id' is set
40
+ if @api_client.config.client_side_validation && id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'id' when calling MinistryApi.get_ministry"
42
+ end
43
+ # resource path
44
+ local_var_path = '/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'InlineResponse2001'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || []
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"MinistryApi.get_ministry",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: MinistryApi#get_ministry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Query for a list of ministries matching some criteria
84
+ # Search for ministries by some query parameters
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :filter_slug Match a single ministry by unique slug
87
+ # @option opts [Integer] :skip Number of records to skip for pagination
88
+ # @option opts [Integer] :limit Number of records to return in this page
89
+ # @return [InlineResponse200]
90
+ def list_ministries(opts = {})
91
+ data, _status_code, _headers = list_ministries_with_http_info(opts)
92
+ data
93
+ end
94
+
95
+ # Query for a list of ministries matching some criteria
96
+ # Search for ministries by some query parameters
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :filter_slug Match a single ministry by unique slug
99
+ # @option opts [Integer] :skip Number of records to skip for pagination
100
+ # @option opts [Integer] :limit Number of records to return in this page
101
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
102
+ def list_ministries_with_http_info(opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: MinistryApi.list_ministries ...'
105
+ end
106
+ # resource path
107
+ local_var_path = '/'
108
+
109
+ # query parameters
110
+ query_params = opts[:query_params] || {}
111
+ query_params[:'filter[slug]'] = opts[:'filter_slug'] if !opts[:'filter_slug'].nil?
112
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
113
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:debug_body]
125
+
126
+ # return_type
127
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
128
+
129
+ # auth_names
130
+ auth_names = opts[:debug_auth_names] || []
131
+
132
+ new_options = opts.merge(
133
+ :operation => :"MinistryApi.list_ministries",
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: MinistryApi#list_ministries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+ end
149
+ end