Commit daae26d

mo khan <mo@mokhan.ca>
2026-02-01 08:03:15
chore: add rbs signatures tag: v1.5.0
1 parent 1677068
sig/net/hippie/client.rbs
@@ -0,0 +1,25 @@
+module Net
+  module Hippie
+    class Client
+      DEFAULT_HEADERS: Hash[String, String]
+
+      attr_reader mapper: ContentTypeMapper
+      attr_reader logger: untyped
+      attr_reader follow_redirects: Integer
+
+      def initialize: (?Hash[Symbol, untyped] options) -> void
+
+      def get: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def post: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def put: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def patch: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def delete: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def head: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped
+      def options: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped
+
+      def execute: (untyped uri, untyped request, ?limit: Integer, ?stream: bool) ?{ (untyped) -> void } -> untyped
+      def with_retry: (?retries: Integer) { (Client) -> untyped } -> untyped
+      def close_all: () -> void
+    end
+  end
+end
sig/net/hippie/content_type_mapper.rbs
@@ -0,0 +1,7 @@
+module Net
+  module Hippie
+    class ContentTypeMapper
+      def map_from: (Hash[String, String] headers, (Hash[untyped, untyped] | String) body) -> (String | Hash[untyped, untyped])
+    end
+  end
+end
sig/net/hippie.rbs
@@ -0,0 +1,29 @@
+module Net
+  module Hippie
+    VERSION: String
+
+    CONNECTION_ERRORS: Array[Class]
+
+    def self.logger: () -> untyped
+    def self.logger=: (untyped) -> untyped
+
+    def self.verify_mode: () -> Integer
+    def self.verify_mode=: (Integer) -> Integer
+
+    def self.basic_auth: (String username, String password) -> String
+    def self.bearer_auth: (String token) -> String
+
+    def self.default_client: () -> Client
+    def self.reset_default_client!: () -> nil
+
+    def self.resolve: (String hostname, ?timeout: Integer) -> String?
+
+    def self.get: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+    def self.post: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+    def self.put: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+    def self.patch: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+    def self.delete: (untyped uri, ?headers: Hash[String, String], ?body: untyped, ?stream: bool) ?{ (untyped) -> void } -> untyped
+    def self.head: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped
+    def self.options: (untyped uri, ?headers: Hash[String, String]) ?{ (untyped) -> void } -> untyped
+  end
+end