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

github.com/mohamedattahri/go-enigma

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mohamedattahri/go-enigma

  • v0.0.0-20150702220110-8c11eb5cde6c
  • Source
  • Go
  • Socket score

Version published
Created
Source

Enigma Build Status GoDoc

Enigma.io lets you quickly search and analyze billions of public records published by governments, companies and organizations.

Enigma is a simple go client for the enigma.io API.

Documentation

Full documentation and examples are available in the godoc package index GoDoc

Examples

Client

package main

import (
	enigma "github.com/mohamedattahri/enigma"
)

func main() {
	client := enigma.NewClient("some_api_key")
}

Metadata

Parent
response, err := client.Meta().Parent("us.gov.whitehouse")
if err != nil {
	fmt.Println(err)
	return
}
fmt.Println(response.Info.ChildrenTablesTotal)
Table
response, err := client.Meta().Table("us.gov.whitehouse.visitor-list")
if err != nil {
	fmt.Println(err)
	return
}
fmt.Println(response.Result.DbBoundaryLabel)

Data

response, err := client.Data("us.gov.whitehouse.visitor-list").Select("namefull", "appt_made_date").Sort("namefirst", enigma.Desc).Results()
if err != nil {
	fmt.Println(err)
	return
}
fmt.Println(string(response.Result))

Stats

response, err := client.Stats("us.gov.whitehouse.visitor-list", "total_people").Operation(enigma.Sum).Results()
if err != nil {
	fmt.Println(err)
	return
}

var obj map[string]string
json.Unmarshal(response.Result, &obj)
fmt.Println(obj["sum"])

Export

url, err := client.Export("us.gov.whitehouse.visitor-list").FileURL(nil)
if err != nil {
	fmt.Println(err)
	return
}
fmt.Println(url)

TODO:

More tests.

FAQs

Package last updated on 02 Jul 2015

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