Sha256: becba9182e25028d29da2970ba05078756fda64ce63563d0156452aa7d5cdb42

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

module FedgerAPI
  class Client
    # Company
    module Company
      # Returns a detailed funding history collection.
      def funding_details(company_domain)
        company_provider(company_domain, 'funding/details')
      end

      # Returns Total funding amount and current stage.
      def funding_status(company_domain)
        company_provider(company_domain, 'funding/status')
      end

      # Returns a detailed funding history collection.
      def fundings(company_domain)
        company_provider(company_domain, 'fundings')
      end

      # Returns nodes connected to a company.
      def company_insights(company_domain)
        company_provider(company_domain, 'insights')
      end

      # Returns a list of investors in a company.
      def investors(company_domain)
        company_provider(company_domain, 'investors')
      end

      # Returns a list with city/country for operative sites of a company.
      def locations(company_domain)
        company_provider(company_domain, 'locations')
      end

      # Returns company peers.
      def peers(company_domain)
        company_provider(company_domain, 'peers')
      end

      # List of company names, an investor has invested in.
      def portfolio_companies(company_domain)
        company_provider(company_domain, 'portfolio')
      end

      # Returns details of a company profile.
      def company_snapshot(company_domain)
        company_provider(company_domain, 'snapshot')
      end

      # Returns team profiles for a company.
      def team_details(company_domain)
        company_provider(company_domain, 'team/details')
      end

      private

      def company_provider(company_domain, uri)
        Response.new(company_request(company_domain, uri))
      end

      def company_request(company_domain, uri)
        self.class.get("/company/#{company_domain}/#{uri}", merge_options)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fedger_api-0.0.1 lib/fedger_api/client/company.rb