No commit activity in last 3 years
No release in over 3 years
This Fasttrack library enables you to request the Fasttrack API in a convenient way. For more information about the Fasttrack API please see https://api.fasttrack-intl.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0

Runtime

 Project Readme

fasttrack-client

Installation

Add to your Gemfile:

gem 'fasttrack-client'

And do:

bundle install

Usage

Get company

require 'fasttrack-client'

client = FastTrack::Client.new('your_token')

begin
  company = client.get_company('example.com')
  puts company
rescue Exception => e
  puts e
end

Get contact

require 'fasttrack-client'

client = FastTrack::Client.new('your_token')

begin
  company = client.get_contact('example@example.com')
  puts company
rescue Exception => e
  puts e
end

Error handling

require 'fasttrack-client'

client = FastTrack::Client.new('your_token')

begin
  response = client.get_company('example.com')
  puts response
rescue FastTrack::UnauthorizedException
  puts 'UnauthorizedException'
end

Available exceptions

  • BadParametersException: send parameters through GET method
  • BadRequestException: request is malformed
  • InternalServerException
  • InvalidVersionException: API version is invalid
  • MethodNotAllowedException: you tried to access an endpoint with an invalid method
  • NoResultException: no result matching your request
  • NotAcceptableException: you requested a format that is not json
  • NotFoundException: specified endpoint could not be found
  • TooManyRequestsException: you made too many requests on the API in a short period of time
  • UnauthorizedException: API key is wrong
  • VersionRequiredException: send API version in the HTTP Accept headers