You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/minh-dng/openfigi-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/minh-dng/openfigi-go

v1.0.3
Source
Go
Version published
Created
Source

openfigi

A client for the OpenFIGI API.

Types of queries

  • Search
  • Filter (Search but with total count)
  • Mapping

Instructions

  • Construct a builder.

    • Search and Filter use BaseItemBuilder, then construct a BaseItem.
    • Mapping uses MappingItemBuilder, then construct a MappingItem. MappingRequest is []MappingItem.
  • Set the properties through setters. (.Set[...](...))

  • Build the item (.Build()). The package will validate the content of the item, reducing bad API calls.

  • [optional] API Key, set with SetAPIKey(string).

  • Use the client to make the request.

    • BaseItem use .[Search|Filter](query string, start string) returning SearchResponse or FilterResponse
    • MappingRequest use .Fetch() returning []SingleMappingResponse
    • SearchResponse and FilterResponse have a .Next() method to fetch the next page.

Developing

  • make generate to generate the constants and hashset for validation
  • make test for testing, will run make generate

FAQs

Package last updated on 05 Jan 2025

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