keinaufwand 0.1.0 → 0.3.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 +4 -4
- data/README.md +1 -1
- data/lib/keinaufwand/api/client/error.rb +11 -8
- data/lib/keinaufwand/api/client/list.rb +8 -16
- data/lib/keinaufwand/api/client/record.rb +15 -18
- data/lib/keinaufwand/api/client.rb +26 -28
- data/lib/keinaufwand/api/configuration.rb +4 -1
- data/lib/keinaufwand/api/schema.rb +2 -2
- data/lib/keinaufwand/api/version.rb +1 -1
- data/lib/keinaufwand/api.rb +18 -18
- data/lib/keinaufwand.rb +1 -1
- data/schemas/2026-07-02.json +95 -80
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5249cbdcf269eff5fdabdfb5ee23782f6fb3962a423c34acc5430df67210e4d
|
|
4
|
+
data.tar.gz: 138267b2da9e24c0d6a744b984bcc00e0fc73f41ef2fdd6a95f50a3821bc3bde
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 283358698456cff0f1c09735be92f43e6e0618862b3a4e85230ba53a1ed6fcef9d22d0c52773de5f2e36d68f95382fc14b2be871818cbca5b3cc3c0b0cae30ab
|
|
7
|
+
data.tar.gz: 6aca505df53f3b11f4c518d59be0cc35867319542d49e81d2e1da1799a6d6cc0b41c645c39b9423aa6a4d645e6a34806ba6b88c84a5ce6551dfc35df8a98979a
|
data/README.md
CHANGED
|
@@ -6,17 +6,20 @@ module Keinaufwand
|
|
|
6
6
|
|
|
7
7
|
def initialize(response)
|
|
8
8
|
@response = response
|
|
9
|
-
|
|
9
|
+
super(response.is_a?(String) ? response : message_from(response))
|
|
10
|
+
end
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
private
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
end
|
|
14
|
+
def message_from(response)
|
|
15
|
+
fallback = response.body.presence || "#{response.code} #{response.message}"
|
|
16
|
+
parsed_error_message(response.body) || fallback
|
|
17
|
+
end
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
def parsed_error_message(body)
|
|
20
|
+
JSON.parse(body).dig('error', 'message')
|
|
21
|
+
rescue JSON::ParserError, TypeError
|
|
22
|
+
nil
|
|
20
23
|
end
|
|
21
24
|
end
|
|
22
25
|
end
|
|
@@ -13,35 +13,27 @@ module Keinaufwand
|
|
|
13
13
|
@request_context = request_context
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def each(&
|
|
17
|
-
data.each(&
|
|
16
|
+
def each(&)
|
|
17
|
+
data.each(&)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
data.empty?
|
|
22
|
-
end
|
|
20
|
+
delegate :empty?, to: :data
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
data.size
|
|
26
|
-
end
|
|
22
|
+
delegate :size, to: :data
|
|
27
23
|
|
|
28
24
|
alias count size
|
|
29
25
|
alias length size
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
data.last
|
|
33
|
-
end
|
|
27
|
+
delegate :last, to: :data
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
data[index]
|
|
37
|
-
end
|
|
29
|
+
delegate :[], to: :data
|
|
38
30
|
|
|
39
31
|
def next
|
|
40
|
-
next_page = meta.dig(
|
|
32
|
+
next_page = meta.dig('pagination', 'next')
|
|
41
33
|
return unless next_page
|
|
42
34
|
|
|
43
35
|
current_page = @request_context.dig(:params, :page)
|
|
44
|
-
raise Error,
|
|
36
|
+
raise Error, 'Infinite pagination loop detected' if current_page == next_page
|
|
45
37
|
|
|
46
38
|
params = @request_context[:params].merge(page: next_page)
|
|
47
39
|
@client.send(:perform_request, @request_context[:verb], @request_context[:path], params, model_name: @request_context[:model_name])
|
|
@@ -16,22 +16,16 @@ module Keinaufwand
|
|
|
16
16
|
raw_attributes[:id]
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
raw_attributes[key]
|
|
21
|
-
end
|
|
19
|
+
delegate :[], to: :raw_attributes
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
raw_attributes[key] = value
|
|
25
|
-
end
|
|
21
|
+
delegate :[]=, to: :raw_attributes
|
|
26
22
|
|
|
27
|
-
def method_missing(method, *args, &
|
|
23
|
+
def method_missing(method, *args, &)
|
|
28
24
|
method_name = method.to_s
|
|
29
25
|
|
|
30
|
-
if raw_attributes.key?(method_name)
|
|
31
|
-
return read_value(method_name)
|
|
32
|
-
end
|
|
26
|
+
return read_value(method_name) if raw_attributes.key?(method_name)
|
|
33
27
|
|
|
34
|
-
return nil if args.empty? && !method_name.end_with?(
|
|
28
|
+
return nil if args.empty? && !method_name.end_with?('=')
|
|
35
29
|
|
|
36
30
|
super
|
|
37
31
|
end
|
|
@@ -44,16 +38,13 @@ module Keinaufwand
|
|
|
44
38
|
|
|
45
39
|
def read_value(name)
|
|
46
40
|
value = raw_attributes[name]
|
|
47
|
-
type = schema&.dig(
|
|
41
|
+
type = schema&.dig('attributes', name)
|
|
48
42
|
|
|
49
|
-
if client.schema.association?(model_name, name)
|
|
50
|
-
return build_association(name, value)
|
|
51
|
-
end
|
|
43
|
+
return build_association(name, value) if client.schema.association?(model_name, name)
|
|
52
44
|
|
|
53
45
|
case type.to_s
|
|
54
|
-
when
|
|
55
|
-
when
|
|
56
|
-
when "amount" then value
|
|
46
|
+
when 'datetime' then parse_time(value) || value
|
|
47
|
+
when 'date' then parse_date(value) || value
|
|
57
48
|
else value
|
|
58
49
|
end
|
|
59
50
|
end
|
|
@@ -75,6 +66,12 @@ module Keinaufwand
|
|
|
75
66
|
rescue ArgumentError
|
|
76
67
|
nil
|
|
77
68
|
end
|
|
69
|
+
|
|
70
|
+
def parse_date(value)
|
|
71
|
+
Date.parse(value.to_s) if value.present?
|
|
72
|
+
rescue Date::Error
|
|
73
|
+
nil
|
|
74
|
+
end
|
|
78
75
|
end
|
|
79
76
|
end
|
|
80
77
|
end
|
|
@@ -3,10 +3,10 @@ module Keinaufwand
|
|
|
3
3
|
class Client
|
|
4
4
|
attr_reader :access_token, :endpoint, :version, :schema, :host
|
|
5
5
|
|
|
6
|
-
def initialize(access_token:, endpoint:
|
|
6
|
+
def initialize(access_token:, endpoint: 'https://api.keinaufwand.com', version: nil, schema: nil, host: nil)
|
|
7
7
|
@access_token = access_token
|
|
8
|
-
@endpoint = endpoint.chomp(
|
|
9
|
-
@version = version || Keinaufwand::Api.configuration.version
|
|
8
|
+
@endpoint = endpoint.chomp('/')
|
|
9
|
+
@version = version || Keinaufwand::Api.configuration.version
|
|
10
10
|
@host = host
|
|
11
11
|
@schema = schema || load_schema
|
|
12
12
|
define_methods_from_schema
|
|
@@ -30,10 +30,10 @@ module Keinaufwand
|
|
|
30
30
|
def define_methods_from_schema
|
|
31
31
|
schema.endpoints.each do |resource, endpoints|
|
|
32
32
|
endpoints.each do |endpoint_config|
|
|
33
|
-
path = endpoint_config.fetch(
|
|
34
|
-
verb = endpoint_config.fetch(
|
|
33
|
+
path = endpoint_config.fetch('path')
|
|
34
|
+
verb = endpoint_config.fetch('verb')
|
|
35
35
|
model_name = resource.singularize.classify
|
|
36
|
-
method_name = method_name_for(endpoint_config.fetch(
|
|
36
|
+
method_name = method_name_for(endpoint_config.fetch('action'), resource)
|
|
37
37
|
|
|
38
38
|
define_singleton_method(method_name) do |*args|
|
|
39
39
|
params = args.last.is_a?(Hash) ? args.pop : {}
|
|
@@ -52,28 +52,28 @@ module Keinaufwand
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def method_name_for(action, resource)
|
|
55
|
-
prefix =
|
|
56
|
-
noun = action ==
|
|
57
|
-
"#{prefix}_#{noun}"
|
|
55
|
+
prefix = ['show', 'index'].include?(action) ? 'retrieve' : action
|
|
56
|
+
noun = action == 'index' ? resource.pluralize : resource.singularize
|
|
57
|
+
:"#{prefix}_#{noun}"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def perform_request(verb, path, params = {}, model_name:)
|
|
61
61
|
payload = perform_json(verb, path, params)
|
|
62
|
-
data = payload.is_a?(Hash) && payload.key?(
|
|
62
|
+
data = payload.is_a?(Hash) && payload.key?('data') ? payload['data'] : payload
|
|
63
63
|
|
|
64
64
|
records = if data.is_a?(Array)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
data.map { |attributes| build_record(model_name, attributes) }
|
|
66
|
+
elsif data.is_a?(Hash)
|
|
67
|
+
build_record(model_name, data)
|
|
68
|
+
else
|
|
69
|
+
data
|
|
70
|
+
end
|
|
71
71
|
|
|
72
72
|
return records unless records.is_a?(Array)
|
|
73
73
|
|
|
74
74
|
List.new(
|
|
75
75
|
data: records,
|
|
76
|
-
meta: payload[
|
|
76
|
+
meta: payload['meta'],
|
|
77
77
|
client: self,
|
|
78
78
|
request_context: { verb: verb, path: path, params: params, model_name: model_name }
|
|
79
79
|
)
|
|
@@ -81,19 +81,17 @@ module Keinaufwand
|
|
|
81
81
|
|
|
82
82
|
def perform_json(verb, path, params)
|
|
83
83
|
uri = URI("#{endpoint}#{path}")
|
|
84
|
-
if verb ==
|
|
85
|
-
uri.query = encode_query(params)
|
|
86
|
-
end
|
|
84
|
+
uri.query = encode_query(params) if verb == 'GET' && params.present?
|
|
87
85
|
|
|
88
86
|
request = request_for(verb, uri)
|
|
89
|
-
request[
|
|
90
|
-
request[
|
|
91
|
-
request[
|
|
92
|
-
request[
|
|
93
|
-
request.body = JSON.generate(params) if verb !=
|
|
87
|
+
request['Authorization'] = "Token #{access_token}"
|
|
88
|
+
request['Accept'] = 'application/json'
|
|
89
|
+
request['Content-Type'] = 'application/json'
|
|
90
|
+
request['Host'] = host if host
|
|
91
|
+
request.body = JSON.generate(params) if verb != 'GET' && params.present?
|
|
94
92
|
|
|
95
|
-
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme ==
|
|
96
|
-
raise Error
|
|
93
|
+
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') { |http| http.request(request) }
|
|
94
|
+
raise Error, response unless response.is_a?(Net::HTTPSuccess)
|
|
97
95
|
|
|
98
96
|
JSON.parse(response.body)
|
|
99
97
|
end
|
|
@@ -112,7 +110,7 @@ module Keinaufwand
|
|
|
112
110
|
else
|
|
113
111
|
"#{URI.encode_www_form_component(full_key)}=#{URI.encode_www_form_component(value.to_s)}"
|
|
114
112
|
end
|
|
115
|
-
end.join(
|
|
113
|
+
end.join('&')
|
|
116
114
|
end
|
|
117
115
|
end
|
|
118
116
|
end
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module Keinaufwand
|
|
2
2
|
module Api
|
|
3
3
|
class Configuration
|
|
4
|
+
# The API version clients use unless the configuration names one.
|
|
5
|
+
DEFAULT_VERSION = '2026-07-02'.freeze
|
|
6
|
+
|
|
4
7
|
attr_accessor :path
|
|
5
8
|
|
|
6
9
|
def initialize(path = nil)
|
|
@@ -12,7 +15,7 @@ module Keinaufwand
|
|
|
12
15
|
end
|
|
13
16
|
|
|
14
17
|
def version
|
|
15
|
-
values.dig(:api, :version) || values[:version]
|
|
18
|
+
values.dig(:api, :version) || values[:version] || DEFAULT_VERSION
|
|
16
19
|
end
|
|
17
20
|
|
|
18
21
|
def schema_path(version = self.version)
|
|
@@ -29,7 +29,7 @@ module Keinaufwand
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def association_type?(type)
|
|
32
|
-
|
|
32
|
+
['association', 'has_one', 'has_many', 'belongs_to', ':has_one', ':has_many', ':belongs_to'].include?(type.to_s)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def attribute_type(model_name, attribute)
|
|
@@ -48,7 +48,7 @@ module Keinaufwand
|
|
|
48
48
|
|
|
49
49
|
def association_collection?(model_name, attribute)
|
|
50
50
|
type = association_metadata(model_name, attribute)[:type] || attribute_type(model_name, attribute)
|
|
51
|
-
type.to_s.include?(
|
|
51
|
+
type.to_s.include?('many')
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
data/lib/keinaufwand/api.rb
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
3
|
-
require
|
|
4
|
-
require
|
|
5
|
-
require
|
|
6
|
-
require
|
|
7
|
-
require
|
|
8
|
-
require
|
|
9
|
-
require
|
|
10
|
-
require
|
|
1
|
+
require 'active_support'
|
|
2
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
|
3
|
+
require 'active_support/core_ext/object/blank'
|
|
4
|
+
require 'active_support/inflector'
|
|
5
|
+
require 'active_support/core_ext/module/delegation'
|
|
6
|
+
require 'json'
|
|
7
|
+
require 'net/http'
|
|
8
|
+
require 'time'
|
|
9
|
+
require 'uri'
|
|
10
|
+
require 'yaml'
|
|
11
11
|
|
|
12
|
-
require_relative
|
|
13
|
-
require_relative
|
|
14
|
-
require_relative
|
|
15
|
-
require_relative
|
|
16
|
-
require_relative
|
|
17
|
-
require_relative
|
|
18
|
-
require_relative
|
|
12
|
+
require_relative 'api/version'
|
|
13
|
+
require_relative 'api/configuration'
|
|
14
|
+
require_relative 'api/schema'
|
|
15
|
+
require_relative 'api/client/error'
|
|
16
|
+
require_relative 'api/client/list'
|
|
17
|
+
require_relative 'api/client/record'
|
|
18
|
+
require_relative 'api/client'
|
|
19
19
|
|
|
20
20
|
module Keinaufwand
|
|
21
21
|
module Api
|
|
@@ -31,7 +31,7 @@ module Keinaufwand
|
|
|
31
31
|
private
|
|
32
32
|
|
|
33
33
|
def default_config_path
|
|
34
|
-
Rails.root.join(
|
|
34
|
+
Rails.root.join('config/keinaufwand.yml') if defined?(Rails) && Rails.respond_to?(:root) && Rails.root
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
data/lib/keinaufwand.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require_relative
|
|
1
|
+
require_relative 'keinaufwand/api'
|
data/schemas/2026-07-02.json
CHANGED
|
@@ -66,6 +66,16 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
+
"EventCategory": {
|
|
70
|
+
"resource_name": "event_categories",
|
|
71
|
+
"attributes": {
|
|
72
|
+
"id": "integer",
|
|
73
|
+
"name": "virtual",
|
|
74
|
+
"position": "virtual",
|
|
75
|
+
"created_at": "datetime",
|
|
76
|
+
"updated_at": "datetime"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
69
79
|
"EventDetail": {
|
|
70
80
|
"resource_name": "event_details",
|
|
71
81
|
"attributes": {
|
|
@@ -74,13 +84,18 @@
|
|
|
74
84
|
"body": "virtual",
|
|
75
85
|
"image_url": "virtual",
|
|
76
86
|
"slug": "virtual",
|
|
77
|
-
"
|
|
87
|
+
"event_category_id": "integer",
|
|
78
88
|
"product_ids": "integer_array",
|
|
79
89
|
"position": "virtual",
|
|
80
90
|
"created_at": "datetime",
|
|
81
91
|
"updated_at": "datetime"
|
|
82
92
|
},
|
|
83
93
|
"associations": {
|
|
94
|
+
"event_category": {
|
|
95
|
+
"type": "belongs_to",
|
|
96
|
+
"class_name": "EventCategory",
|
|
97
|
+
"inline": true
|
|
98
|
+
},
|
|
84
99
|
"products": {
|
|
85
100
|
"type": "has_and_belongs_to_many",
|
|
86
101
|
"class_name": "Product",
|
|
@@ -107,82 +122,6 @@
|
|
|
107
122
|
}
|
|
108
123
|
}
|
|
109
124
|
},
|
|
110
|
-
"Instructor": {
|
|
111
|
-
"resource_name": "instructors",
|
|
112
|
-
"attributes": {
|
|
113
|
-
"id": "integer",
|
|
114
|
-
"first_name": "virtual",
|
|
115
|
-
"last_name": "virtual",
|
|
116
|
-
"created_at": "datetime",
|
|
117
|
-
"updated_at": "datetime"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"InstructorDetail": {
|
|
121
|
-
"resource_name": "instructor_details",
|
|
122
|
-
"attributes": {
|
|
123
|
-
"id": "integer",
|
|
124
|
-
"instructor_id": "integer",
|
|
125
|
-
"default": "virtual",
|
|
126
|
-
"name": "virtual",
|
|
127
|
-
"avatar_url": "virtual",
|
|
128
|
-
"skills": "virtual",
|
|
129
|
-
"created_at": "datetime",
|
|
130
|
-
"updated_at": "datetime"
|
|
131
|
-
},
|
|
132
|
-
"associations": {
|
|
133
|
-
"instructor": {
|
|
134
|
-
"type": "belongs_to",
|
|
135
|
-
"class_name": "Instructor",
|
|
136
|
-
"inline": true
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"InstructorGroup": {
|
|
141
|
-
"resource_name": "instructor_groups",
|
|
142
|
-
"attributes": {
|
|
143
|
-
"id": "integer",
|
|
144
|
-
"name": "virtual",
|
|
145
|
-
"position": "virtual",
|
|
146
|
-
"location_id": "integer",
|
|
147
|
-
"created_at": "datetime",
|
|
148
|
-
"updated_at": "datetime"
|
|
149
|
-
},
|
|
150
|
-
"associations": {
|
|
151
|
-
"location": {
|
|
152
|
-
"type": "belongs_to",
|
|
153
|
-
"class_name": "Location",
|
|
154
|
-
"inline": false
|
|
155
|
-
},
|
|
156
|
-
"instructor_group_members": {
|
|
157
|
-
"type": "has_many",
|
|
158
|
-
"class_name": "InstructorGroupMember",
|
|
159
|
-
"inline": true
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"InstructorGroupMember": {
|
|
164
|
-
"resource_name": "instructor_group_members",
|
|
165
|
-
"attributes": {
|
|
166
|
-
"id": "integer",
|
|
167
|
-
"instructor_group_id": "integer",
|
|
168
|
-
"instructor_detail_id": "integer",
|
|
169
|
-
"position": "virtual",
|
|
170
|
-
"created_at": "datetime",
|
|
171
|
-
"updated_at": "datetime"
|
|
172
|
-
},
|
|
173
|
-
"associations": {
|
|
174
|
-
"instructor_group": {
|
|
175
|
-
"type": "belongs_to",
|
|
176
|
-
"class_name": "InstructorGroup",
|
|
177
|
-
"inline": false
|
|
178
|
-
},
|
|
179
|
-
"instructor_detail": {
|
|
180
|
-
"type": "belongs_to",
|
|
181
|
-
"class_name": "InstructorDetail",
|
|
182
|
-
"inline": true
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
125
|
"Location": {
|
|
187
126
|
"resource_name": "locations",
|
|
188
127
|
"attributes": {
|
|
@@ -302,6 +241,82 @@
|
|
|
302
241
|
"created_at": "datetime",
|
|
303
242
|
"updated_at": "datetime"
|
|
304
243
|
}
|
|
244
|
+
},
|
|
245
|
+
"StaffMember": {
|
|
246
|
+
"resource_name": "staff_members",
|
|
247
|
+
"attributes": {
|
|
248
|
+
"id": "integer",
|
|
249
|
+
"first_name": "virtual",
|
|
250
|
+
"last_name": "virtual",
|
|
251
|
+
"created_at": "datetime",
|
|
252
|
+
"updated_at": "datetime"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"StaffProfile": {
|
|
256
|
+
"resource_name": "staff_profiles",
|
|
257
|
+
"attributes": {
|
|
258
|
+
"id": "integer",
|
|
259
|
+
"staff_member_id": "integer",
|
|
260
|
+
"default": "virtual",
|
|
261
|
+
"name": "virtual",
|
|
262
|
+
"avatar_url": "virtual",
|
|
263
|
+
"skills": "virtual",
|
|
264
|
+
"created_at": "datetime",
|
|
265
|
+
"updated_at": "datetime"
|
|
266
|
+
},
|
|
267
|
+
"associations": {
|
|
268
|
+
"staff_member": {
|
|
269
|
+
"type": "belongs_to",
|
|
270
|
+
"class_name": "StaffMember",
|
|
271
|
+
"inline": true
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"StaffTeam": {
|
|
276
|
+
"resource_name": "staff_teams",
|
|
277
|
+
"attributes": {
|
|
278
|
+
"id": "integer",
|
|
279
|
+
"name": "virtual",
|
|
280
|
+
"position": "virtual",
|
|
281
|
+
"location_id": "integer",
|
|
282
|
+
"created_at": "datetime",
|
|
283
|
+
"updated_at": "datetime"
|
|
284
|
+
},
|
|
285
|
+
"associations": {
|
|
286
|
+
"location": {
|
|
287
|
+
"type": "belongs_to",
|
|
288
|
+
"class_name": "Location",
|
|
289
|
+
"inline": false
|
|
290
|
+
},
|
|
291
|
+
"staff_team_members": {
|
|
292
|
+
"type": "has_many",
|
|
293
|
+
"class_name": "StaffTeamMember",
|
|
294
|
+
"inline": true
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"StaffTeamMember": {
|
|
299
|
+
"resource_name": "staff_team_members",
|
|
300
|
+
"attributes": {
|
|
301
|
+
"id": "integer",
|
|
302
|
+
"staff_team_id": "integer",
|
|
303
|
+
"staff_profile_id": "integer",
|
|
304
|
+
"position": "virtual",
|
|
305
|
+
"created_at": "datetime",
|
|
306
|
+
"updated_at": "datetime"
|
|
307
|
+
},
|
|
308
|
+
"associations": {
|
|
309
|
+
"staff_team": {
|
|
310
|
+
"type": "belongs_to",
|
|
311
|
+
"class_name": "StaffTeam",
|
|
312
|
+
"inline": false
|
|
313
|
+
},
|
|
314
|
+
"staff_profile": {
|
|
315
|
+
"type": "belongs_to",
|
|
316
|
+
"class_name": "StaffProfile",
|
|
317
|
+
"inline": true
|
|
318
|
+
}
|
|
319
|
+
}
|
|
305
320
|
}
|
|
306
321
|
},
|
|
307
322
|
"endpoints": {
|
|
@@ -384,16 +399,16 @@
|
|
|
384
399
|
"path": "/2026-07-02/posts/:id"
|
|
385
400
|
}
|
|
386
401
|
],
|
|
387
|
-
"
|
|
402
|
+
"staff_teams": [
|
|
388
403
|
{
|
|
389
404
|
"action": "index",
|
|
390
405
|
"verb": "GET",
|
|
391
|
-
"path": "/2026-07-02/
|
|
406
|
+
"path": "/2026-07-02/staff_teams"
|
|
392
407
|
},
|
|
393
408
|
{
|
|
394
409
|
"action": "show",
|
|
395
410
|
"verb": "GET",
|
|
396
|
-
"path": "/2026-07-02/
|
|
411
|
+
"path": "/2026-07-02/staff_teams/:id"
|
|
397
412
|
}
|
|
398
413
|
]
|
|
399
414
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: keinaufwand
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Codegestalt
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -24,8 +23,6 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '7.2'
|
|
27
|
-
description:
|
|
28
|
-
email:
|
|
29
26
|
executables: []
|
|
30
27
|
extensions: []
|
|
31
28
|
extra_rdoc_files: []
|
|
@@ -45,7 +42,7 @@ homepage: https://keinaufwand.com
|
|
|
45
42
|
licenses: []
|
|
46
43
|
metadata:
|
|
47
44
|
allowed_push_host: https://rubygems.org
|
|
48
|
-
|
|
45
|
+
rubygems_mfa_required: 'true'
|
|
49
46
|
rdoc_options: []
|
|
50
47
|
require_paths:
|
|
51
48
|
- lib
|
|
@@ -60,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
60
57
|
- !ruby/object:Gem::Version
|
|
61
58
|
version: '0'
|
|
62
59
|
requirements: []
|
|
63
|
-
rubygems_version:
|
|
64
|
-
signing_key:
|
|
60
|
+
rubygems_version: 4.0.20
|
|
65
61
|
specification_version: 4
|
|
66
62
|
summary: Schema-aware Keinaufwand API client
|
|
67
63
|
test_files: []
|