e621_openapi 1.0.385

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.
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "net/http"
4
+
5
+ module E621OpenAPI
6
+ # The spec this client was generated from.
7
+ SPEC_URL = "https://raw.githubusercontent.com/DonovanDMC/E621OpenAPI/#{SPEC_COMMIT}/openapi.yaml"
8
+
9
+ # The spec this client was generated from, with every `$ref` inlined.
10
+ DEREFERENCED_SPEC_URL = "https://raw.githubusercontent.com/DonovanDMC/E621OpenAPI/#{SPEC_COMMIT}/openapi.dereferenced.yaml"
11
+
12
+ # Fetches the spec this client was generated from, as YAML.
13
+ def self.fetch_spec(dereferenced: false)
14
+ response = Net::HTTP.get_response(URI(dereferenced ? DEREFERENCED_SPEC_URL : SPEC_URL))
15
+ raise "Failed to fetch the spec: #{response.code} #{response.message}" unless response.is_a?(Net::HTTPSuccess)
16
+
17
+ response.body.to_s
18
+ end
19
+ end
@@ -0,0 +1,6 @@
1
+ # Generated by scripts/generate.rb from the E621OpenAPI spec, don't edit by hand.
2
+
3
+ module E621OpenAPI
4
+ # The E621OpenAPI commit this client was generated from.
5
+ SPEC_COMMIT = "1450ed9b8dcf4dd775f52fefbebb2a6956150d56"
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module E621OpenAPI
4
+ # set when publishing
5
+ VERSION = "1.0.385"
6
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "e621_openapi/version"
4
+ require_relative "e621_openapi/spec_commit"
5
+ require_relative "e621_openapi/spec"
6
+ require_relative "e621_openapi/error"
7
+ require_relative "e621_openapi/enums"
8
+ require_relative "e621_openapi/operations"
9
+ require_relative "e621_openapi/client"
10
+
11
+ # Types and a client for the e621.net API, generated from the E621OpenAPI spec.
12
+ module E621OpenAPI
13
+ end
@@ -0,0 +1,15 @@
1
+ # Generated by scripts/generate.rb from the E621OpenAPI spec, don't edit by hand.
2
+
3
+ module E621OpenAPI
4
+ module TagCategory
5
+ GENERAL: 0
6
+ ARTIST: 1
7
+ CONTRIBUTOR: 2
8
+ COPYRIGHT: 3
9
+ CHARACTER: 4
10
+ SPECIES: 5
11
+ INVALID: 6
12
+ META: 7
13
+ LORE: 8
14
+ end
15
+ end