Sha256: b6ada8b2a75e862cb2642aa8d57f0dfef2e42051a48fb0f3ed72c6ef73634f4b

Contents?: true

Size: 708 Bytes

Versions: 2

Compression:

Stored size: 708 Bytes

Contents

require 'httparty'

module FlightPlanCli
  class Api
    include HTTParty
    def initialize(url:, key:, secret:)
      @url = url
      @key = key
      @secret = secret
    end

    def board_tickets(board_id: nil, repo_id: nil, repo_url: nil, assignee_username: nil)
      params = {}
      params[:board_id] = board_id unless board_id.nil?
      params[:repo_id] = repo_id unless repo_id.nil?
      params[:repo_url] = repo_url unless repo_url.nil?
      params[:assignee_username] = assignee_username unless assignee_username.nil?

      self.class.get("#{url}/board_tickets", query: params, headers: headers)
    end

    private

    attr_reader :url, :key, :secret

    def headers
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flight_plan_cli-0.0.2 lib/flight_plan_cli/api.rb
flight_plan_cli-0.0.1 lib/flight_plan_cli/api.rb