abliteration 0.0.1 → 0.1.1

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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.md +135 -9
  4. data/Rakefile +10 -0
  5. data/abliteration.gemspec +38 -21
  6. data/docs/Author.md +28 -0
  7. data/docs/AuthorDetail.md +30 -0
  8. data/docs/AuthorsApi.md +153 -0
  9. data/docs/DaiPoint.md +22 -0
  10. data/docs/Dataset.md +38 -0
  11. data/docs/DatasetDetail.md +22 -0
  12. data/docs/DatasetsApi.md +159 -0
  13. data/docs/Envelope.md +32 -0
  14. data/docs/Error.md +26 -0
  15. data/docs/Event.md +30 -0
  16. data/docs/GetAuthor200Response.md +32 -0
  17. data/docs/GetDataset200Response.md +32 -0
  18. data/docs/GetIndex200Response.md +32 -0
  19. data/docs/GetMethod200Response.md +32 -0
  20. data/docs/GetModel200Response.md +32 -0
  21. data/docs/Index.md +36 -0
  22. data/docs/IndexDetail.md +38 -0
  23. data/docs/IndicesApi.md +144 -0
  24. data/docs/ListAuthors200Response.md +32 -0
  25. data/docs/ListDatasets200Response.md +32 -0
  26. data/docs/ListIndices200Response.md +32 -0
  27. data/docs/ListMethods200Response.md +32 -0
  28. data/docs/ListModels200Response.md +32 -0
  29. data/docs/ListTimeline200Response.md +32 -0
  30. data/docs/Method.md +28 -0
  31. data/docs/MethodDetail.md +34 -0
  32. data/docs/MethodDetailAllOfTopAuthors.md +20 -0
  33. data/docs/MethodsApi.md +144 -0
  34. data/docs/ModelDetail.md +28 -0
  35. data/docs/ModelSummary.md +42 -0
  36. data/docs/ModelsApi.md +169 -0
  37. data/docs/Passport.md +22 -0
  38. data/docs/TimelineApi.md +85 -0
  39. data/git_push.sh +54 -0
  40. data/lib/abliteration/api/authors_api.rb +167 -0
  41. data/lib/abliteration/api/datasets_api.rb +176 -0
  42. data/lib/abliteration/api/indices_api.rb +147 -0
  43. data/lib/abliteration/api/methods_api.rb +147 -0
  44. data/lib/abliteration/api/models_api.rb +191 -0
  45. data/lib/abliteration/api/timeline_api.rb +99 -0
  46. data/lib/abliteration/api_client.rb +397 -0
  47. data/lib/abliteration/api_error.rb +58 -0
  48. data/lib/abliteration/api_model_base.rb +88 -0
  49. data/lib/abliteration/configuration.rb +308 -0
  50. data/lib/abliteration/models/author.rb +194 -0
  51. data/lib/abliteration/models/author_detail.rb +211 -0
  52. data/lib/abliteration/models/dai_point.rb +165 -0
  53. data/lib/abliteration/models/dataset.rb +247 -0
  54. data/lib/abliteration/models/dataset_detail.rb +169 -0
  55. data/lib/abliteration/models/envelope.rb +364 -0
  56. data/lib/abliteration/models/error.rb +221 -0
  57. data/lib/abliteration/models/event.rb +207 -0
  58. data/lib/abliteration/models/get_author200_response.rb +384 -0
  59. data/lib/abliteration/models/get_dataset200_response.rb +384 -0
  60. data/lib/abliteration/models/get_index200_response.rb +384 -0
  61. data/lib/abliteration/models/get_method200_response.rb +384 -0
  62. data/lib/abliteration/models/get_model200_response.rb +384 -0
  63. data/lib/abliteration/models/index.rb +281 -0
  64. data/lib/abliteration/models/index_detail.rb +296 -0
  65. data/lib/abliteration/models/list_authors200_response.rb +386 -0
  66. data/lib/abliteration/models/list_datasets200_response.rb +386 -0
  67. data/lib/abliteration/models/list_indices200_response.rb +386 -0
  68. data/lib/abliteration/models/list_methods200_response.rb +386 -0
  69. data/lib/abliteration/models/list_models200_response.rb +386 -0
  70. data/lib/abliteration/models/list_timeline200_response.rb +386 -0
  71. data/lib/abliteration/models/method.rb +227 -0
  72. data/lib/abliteration/models/method_detail.rb +265 -0
  73. data/lib/abliteration/models/method_detail_all_of_top_authors.rb +156 -0
  74. data/lib/abliteration/models/model_detail.rb +196 -0
  75. data/lib/abliteration/models/model_summary.rb +265 -0
  76. data/lib/abliteration/models/passport.rb +165 -0
  77. data/lib/abliteration/version.rb +15 -0
  78. data/lib/abliteration.rb +69 -24
  79. data/openapi-generator-config.json +12 -0
  80. data/spec/api/authors_api_spec.rb +61 -0
  81. data/spec/api/datasets_api_spec.rb +64 -0
  82. data/spec/api/indices_api_spec.rb +58 -0
  83. data/spec/api/methods_api_spec.rb +58 -0
  84. data/spec/api/models_api_spec.rb +69 -0
  85. data/spec/api/timeline_api_spec.rb +50 -0
  86. data/spec/models/author_detail_spec.rb +66 -0
  87. data/spec/models/author_spec.rb +60 -0
  88. data/spec/models/dai_point_spec.rb +48 -0
  89. data/spec/models/dataset_detail_spec.rb +48 -0
  90. data/spec/models/dataset_spec.rb +96 -0
  91. data/spec/models/envelope_spec.rb +82 -0
  92. data/spec/models/error_spec.rb +60 -0
  93. data/spec/models/event_spec.rb +72 -0
  94. data/spec/models/get_author200_response_spec.rb +82 -0
  95. data/spec/models/get_dataset200_response_spec.rb +82 -0
  96. data/spec/models/get_index200_response_spec.rb +82 -0
  97. data/spec/models/get_method200_response_spec.rb +82 -0
  98. data/spec/models/get_model200_response_spec.rb +82 -0
  99. data/spec/models/index_detail_spec.rb +104 -0
  100. data/spec/models/index_spec.rb +98 -0
  101. data/spec/models/list_authors200_response_spec.rb +82 -0
  102. data/spec/models/list_datasets200_response_spec.rb +82 -0
  103. data/spec/models/list_indices200_response_spec.rb +82 -0
  104. data/spec/models/list_methods200_response_spec.rb +82 -0
  105. data/spec/models/list_models200_response_spec.rb +82 -0
  106. data/spec/models/list_timeline200_response_spec.rb +82 -0
  107. data/spec/models/method_detail_all_of_top_authors_spec.rb +42 -0
  108. data/spec/models/method_detail_spec.rb +88 -0
  109. data/spec/models/method_spec.rb +70 -0
  110. data/spec/models/model_detail_spec.rb +66 -0
  111. data/spec/models/model_summary_spec.rb +108 -0
  112. data/spec/models/passport_spec.rb +48 -0
  113. data/spec/spec_helper.rb +111 -0
  114. metadata +197 -17
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #abliteration.org Public API
3
+
4
+ #Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Abliteration
16
+ class MethodsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get one method
23
+ # Cost: 1 credit.
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GetMethod200Response]
27
+ def get_method(id, opts = {})
28
+ data, _status_code, _headers = get_method_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Get one method
33
+ # Cost: 1 credit.
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(GetMethod200Response, Integer, Hash)>] GetMethod200Response data, response status code and response headers
37
+ def get_method_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: MethodsApi.get_method ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling MethodsApi.get_method"
44
+ end
45
+ # verify enum value
46
+ allowable_values = ["M1", "M2", "M3", "M4", "M5", "M5-frankenstein", "M6", "M7", "M8", "M-uncensored", "unknown"]
47
+ if @api_client.config.client_side_validation && !allowable_values.include?(id)
48
+ fail ArgumentError, "invalid value for \"id\", must be one of #{allowable_values}"
49
+ end
50
+ # resource path
51
+ local_var_path = '/api/v1/methods/{id}'.sub('{id}', CGI.escape(id.to_s))
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'GetMethod200Response'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"MethodsApi.get_method",
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(:GET, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: MethodsApi#get_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # List the method taxonomy
91
+ # Cost: 5-15 credits. Every code is returned, including ones with no models.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ListMethods200Response]
94
+ def list_methods(opts = {})
95
+ data, _status_code, _headers = list_methods_with_http_info(opts)
96
+ data
97
+ end
98
+
99
+ # List the method taxonomy
100
+ # Cost: 5-15 credits. Every code is returned, including ones with no models.
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(ListMethods200Response, Integer, Hash)>] ListMethods200Response data, response status code and response headers
103
+ def list_methods_with_http_info(opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: MethodsApi.list_methods ...'
106
+ end
107
+ # resource path
108
+ local_var_path = '/api/v1/methods'
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+
113
+ # header parameters
114
+ header_params = opts[:header_params] || {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body]
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'ListMethods200Response'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"MethodsApi.list_methods",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: MethodsApi#list_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+ end
147
+ end
@@ -0,0 +1,191 @@
1
+ =begin
2
+ #abliteration.org Public API
3
+
4
+ #Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Abliteration
16
+ class ModelsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get one model
23
+ # Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GetModel200Response]
27
+ def get_model(id, opts = {})
28
+ data, _status_code, _headers = get_model_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Get one model
33
+ # Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(GetModel200Response, Integer, Hash)>] GetModel200Response data, response status code and response headers
37
+ def get_model_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ModelsApi.get_model ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling ModelsApi.get_model"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/models/{id}'.sub('{id}', CGI.escape(id.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
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'GetModel200Response'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"ModelsApi.get_model",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: ModelsApi#get_model\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # List models
86
+ # Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
87
+ # @param [Hash] opts the optional parameters
88
+ # @option opts [String] :method M-code, case-insensitive. See GET /api/v1/methods.
89
+ # @option opts [String] :family Base family, for example qwen or llama.
90
+ # @option opts [String] :author Publisher handle, case-insensitive.
91
+ # @option opts [String] :license SPDX-ish license string as published.
92
+ # @option opts [Integer] :downloads_gte
93
+ # @option opts [Integer] :downloads_lte
94
+ # @option opts [String] :created_after ISO-8601 date or timestamp, inclusive.
95
+ # @option opts [String] :created_before ISO-8601 date or timestamp, inclusive.
96
+ # @option opts [String] :sort Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names. (default to 'downloads')
97
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (default to 50)
98
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0. (default to 0)
99
+ # @return [ListModels200Response]
100
+ def list_models(opts = {})
101
+ data, _status_code, _headers = list_models_with_http_info(opts)
102
+ data
103
+ end
104
+
105
+ # List models
106
+ # Cost: 5-300+ credits, stepped by returned rows and multiplied by &#x60;1 + (offset/2500)²&#x60;. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset&#x3D;10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :method M-code, case-insensitive. See GET /api/v1/methods.
109
+ # @option opts [String] :family Base family, for example qwen or llama.
110
+ # @option opts [String] :author Publisher handle, case-insensitive.
111
+ # @option opts [String] :license SPDX-ish license string as published.
112
+ # @option opts [Integer] :downloads_gte
113
+ # @option opts [Integer] :downloads_lte
114
+ # @option opts [String] :created_after ISO-8601 date or timestamp, inclusive.
115
+ # @option opts [String] :created_before ISO-8601 date or timestamp, inclusive.
116
+ # @option opts [String] :sort Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names. (default to 'downloads')
117
+ # @option opts [Integer] :limit Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (default to 50)
118
+ # @option opts [Integer] :offset Rows to skip. Negative and non-numeric values are treated as 0. (default to 0)
119
+ # @return [Array<(ListModels200Response, Integer, Hash)>] ListModels200Response data, response status code and response headers
120
+ def list_models_with_http_info(opts = {})
121
+ if @api_client.config.debugging
122
+ @api_client.config.logger.debug 'Calling API: ModelsApi.list_models ...'
123
+ end
124
+ allowable_values = ["downloads", "-downloads", "likes", "-likes", "created", "-created", "created_at", "-created_at", "first_seen", "-first_seen", "first_seen_at", "-first_seen_at"]
125
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
126
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
127
+ end
128
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
129
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelsApi.list_models, must be smaller than or equal to 1000.'
130
+ end
131
+
132
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
133
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelsApi.list_models, must be greater than or equal to 1.'
134
+ end
135
+
136
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
137
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ModelsApi.list_models, must be greater than or equal to 0.'
138
+ end
139
+
140
+ # resource path
141
+ local_var_path = '/api/v1/models'
142
+
143
+ # query parameters
144
+ query_params = opts[:query_params] || {}
145
+ query_params[:'method'] = opts[:'method'] if !opts[:'method'].nil?
146
+ query_params[:'family'] = opts[:'family'] if !opts[:'family'].nil?
147
+ query_params[:'author'] = opts[:'author'] if !opts[:'author'].nil?
148
+ query_params[:'license'] = opts[:'license'] if !opts[:'license'].nil?
149
+ query_params[:'downloads_gte'] = opts[:'downloads_gte'] if !opts[:'downloads_gte'].nil?
150
+ query_params[:'downloads_lte'] = opts[:'downloads_lte'] if !opts[:'downloads_lte'].nil?
151
+ query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
152
+ query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
153
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
154
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
155
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
156
+
157
+ # header parameters
158
+ header_params = opts[:header_params] || {}
159
+ # HTTP header 'Accept' (if needed)
160
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
161
+
162
+ # form parameters
163
+ form_params = opts[:form_params] || {}
164
+
165
+ # http body (model)
166
+ post_body = opts[:debug_body]
167
+
168
+ # return_type
169
+ return_type = opts[:debug_return_type] || 'ListModels200Response'
170
+
171
+ # auth_names
172
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
173
+
174
+ new_options = opts.merge(
175
+ :operation => :"ModelsApi.list_models",
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => return_type
182
+ )
183
+
184
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug "API called: ModelsApi#list_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
187
+ end
188
+ return data, status_code, headers
189
+ end
190
+ end
191
+ end
@@ -0,0 +1,99 @@
1
+ =begin
2
+ #abliteration.org Public API
3
+
4
+ #Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Abliteration
16
+ class TimelineApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Curated field events
23
+ # Cost: 50 credits, flat.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :from Inclusive lower bound on the event date, ISO-8601.
26
+ # @option opts [String] :to Inclusive upper bound on the event date, ISO-8601.
27
+ # @option opts [String] :event_type Event type, case-insensitive.
28
+ # @option opts [Integer] :limit (default to 100)
29
+ # @return [ListTimeline200Response]
30
+ def list_timeline(opts = {})
31
+ data, _status_code, _headers = list_timeline_with_http_info(opts)
32
+ data
33
+ end
34
+
35
+ # Curated field events
36
+ # Cost: 50 credits, flat.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :from Inclusive lower bound on the event date, ISO-8601.
39
+ # @option opts [String] :to Inclusive upper bound on the event date, ISO-8601.
40
+ # @option opts [String] :event_type Event type, case-insensitive.
41
+ # @option opts [Integer] :limit (default to 100)
42
+ # @return [Array<(ListTimeline200Response, Integer, Hash)>] ListTimeline200Response data, response status code and response headers
43
+ def list_timeline_with_http_info(opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: TimelineApi.list_timeline ...'
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
48
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TimelineApi.list_timeline, must be smaller than or equal to 1000.'
49
+ end
50
+
51
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
52
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TimelineApi.list_timeline, must be greater than or equal to 1.'
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/api/v1/timeline'
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
61
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
62
+ query_params[:'event_type'] = opts[:'event_type'] if !opts[:'event_type'].nil?
63
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
64
+
65
+ # header parameters
66
+ header_params = opts[:header_params] || {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body]
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'ListTimeline200Response'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"TimelineApi.list_timeline",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: TimelineApi#list_timeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+ end
99
+ end