Sha256: 7d8d341b9959f8b9460c4cd02f12551c155612e0eb4a9bca5eb7d810feda6960

Contents?: true

Size: 675 Bytes

Versions: 1

Compression:

Stored size: 675 Bytes

Contents

require_relative 'graphql_network'
require_relative 'rest_api_network'

module Gitlab
  module Triage
    Network = Struct.new(:restapi, :graphql, keyword_init: true) do
      def query_api(url)
        restapi.query_api(url)
      end

      def query_graphql(...)
        graphql.query(...)
      end

      def query_api_cached(url)
        restapi.query_api_cached(url)
      end

      def restapi_options
        restapi.options
      end

      # FIXME: Remove the alias method
      alias_method :options, :restapi_options

      def graphql_options
        graphql.options
      end

      def post_api(...)
        restapi.post_api(...)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitlab-triage-1.24.0 lib/gitlab/triage/network.rb