Sha256: b5fb6428948c113ed36c518ea7f23e7fc11479266636c18fbbace0b38aef4026
Contents?: true
Size: 760 Bytes
Versions: 6
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true module GithubApi class Client module Labels def list_labels(repo, params = {}) JSON.parse( RestClient.get( "https://api.github.com/repos/#{repo}/labels", { "Authorization" => "token #{@token}", params: params } ) ) end alias labels list_labels def create_label(repo, params) JSON.parse( RestClient.post( "https://api.github.com/repos/#{repo}/labels", params.to_json, { "Authorization" => "token #{@token}", "Accept" => "application/vnd.github.v3+json" } ) ) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems