🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github_api-v4-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github_api-v4-client

0.2.0
Rubygems
Version published
Maintainers
1
Created
Source

GithubApi::V4::Client

A very thin GitHub GraphQL API v4 client

Installation

Add this line to your application's Gemfile:

gem 'github_api-v4-client'

Usage

client = GithubApi::V4::Client.new("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

client.schema
# {"data"=>
#   {"__schema"=>
#     {"types"=>
#       [{"name"=>"Repository",
#         "kind"=>"OBJECT",
#         "description"=>"A repository contains the content for a project.",
#         "fields"=>
#          [{"name"=>"nameWithOwner"},

client.graphql(query: 'query { repository(owner: "k0kubun", name: "hamlit") { nameWithOwner } }')
# {"data"=>{"repository"=>{"nameWithOwner"=>"k0kubun/hamlit"}}}

client.graphql(query: <<~QUERY, variables: { name: 'hamlit' })
  query Repository($name: String!) {
    repository(owner: "k0kubun", name: $name) {
      nameWithOwner
    }
  }
QUERY
# {"data"=>{"repository"=>{"nameWithOwner"=>"k0kubun/hamlit"}}}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/k0kubun/github_api-v4-client.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 28 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts