json_pr_issue_base.rb
# get the GraphQL data from GitHub given the query
get the GraphQL data from GitHub given the query
get the GraphQL data from GitHub given the query
def gql_request(query, filename: nil)
    body = {}
    body['query'] = query
    data = nil
    Net::HTTP.start('api.github.com', 443, use_ssl: true) do |http|
      http.verify_mode = OpenSSL::SSL::VERIFY_PEER
      data = run_request http, query
      if data
        if filename
          File.write "#{__dir__}/#{filename}", resp.body, mode: 'wb:UTF-8'
        end
      else
        return nil
      end
    end
    data
  end
def gql_request ( query , filename : nil ) body = { } body [ 'query' ] = query data = nil Net :: HTTP . start ( 'api.github.com' , 443 , use_ssl : true ) do | http | http . verify_mode = OpenSSL :: SSL :: VERIFY_PEER data = run_request http , query if data if filename File . write "#{__dir__}/#{filename}" , resp . body , mode : 'wb:UTF-8' end else return nil end end data end
get the GraphQL data from GitHub given the query
get the GraphQL data from GitHub given the query
query
<not_specific>
filename
<not_specific>