Sha256: 4ad88b7e637c227055b071d57716c049d25e582203957ca0c37fbcfd7fb43fcc
Contents?: true
Size: 671 Bytes
Versions: 4
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true module Api module V1 # This class is responsible for all the API calls related to projects connections. class Projects < Api::V1::Base def by(id:) get("#{@url_api_path}/projects/#{id}") end def all(page: 1, per_page: 100, order_by: nil, order_direction: nil, company_id: nil) query = { page: page, per_page: per_page } query[:order_by] = order_by if order_by query[:order_direction] = order_direction if order_direction query[:company_id] = company_id if company_id get("#{@url_api_path}/projects", query) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems