Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

first-class-postcodes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

first-class-postcodes

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ruby Library

Gem Version Build Status codecov

The First Class Postcodes Ruby library provides convenient access to our API for applications written in the Ruby language. It includes a pre-defined set of classes for API operations and models that initialize themselves dynamically from API responses.

The library also provides other features. For example:

  • Easy configuration path for fast setup and use.
  • Built-in mechanisms for the serialization of parameters according to the expectations of our API.

Installation

You don't need this source code unless you want to modify the gem. If you just want to use the package, just run:

gem install first-class-postcodes

If you want to build the gem from source:

gem build first-class-postcodes.gemspec

Requirements

  • Ruby >= 2.2.0.

Bundler

If you are installing via bundler, you should be sure to use the https rubygems source in your Gemfile, as any gems fetched over http could potentially be compromised in transit and alter the code of gems fetched securely over https:

source 'https://rubygems.org'

gem 'rails'
gem 'first-class-postcodes'

Install from Git

You can install directly from git, add the following into your Gemfile:

gem 'first-class-postcodes', :git => 'https://github.com/firstclasspostcodes/firstclasspostcodes-ruby.git'

Usage

The library needs to be configured with your API Key, which is available on the dashboard.

# Load the gem
require 'first-class-postcodes'

# Setup authorization
FCP.configure do |config|
  # Configure API key authorization: Authorizer
  config.api_key['X-Api-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-Api-Key'] = 'Bearer'
end

api_instance = FCP::DataApi.new
search = 'search_example' # String | The typeahead search query to return matching results for. 

begin
  #Typeahead Search
  result = api_instance.get_typeahead(search)
  p result
rescue FCP::ApiError => e
  puts "Exception when calling DataApi->get_typeahead: #{e}"
end

FAQs

Package last updated on 28 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc