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

apimon

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apimon

Get Apimon's power in Javascript without a hassle.

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

apimon-js

Get Apimon's power in Javascript without a hassle.

  • Examples

For Websites

<script src="https://cdn.hell.sh/apimon-js/latest/apimon.js" crossorigin="anonymous"></script>

Need SRI?

Usage

When using nodejs, you can simply use npm i apimon and then const apimon = require("apimon");, but you can also run npm -g i apimon to have global access to the apimon CLI utility, which you might like.

Regardless of NPM or <script> tag, you will have access to the apimon object which has a function for every Apimon HTTP API except for "Generate QR Code," e.g. https://apimon.de/ip/arg = apimon.ip(arg). The "My IP Address" endpoints are accessible using apimon.myip(), .myipv4(), and .myipv6().

All of these functions will return a Promise, which, if resolved, will provide you with an object corresponding to the JSON object or plain text that Apimon has returned; however, some objects will have additional values provided exclusively by apimon-js:

  • country
    • .english_name - alias for .name.EN
    • .native_name - alias for .name[.language.code]
  • mcuser
    • .initial_name - alias for .history[0].name
    • .full_id - .id but with dashes

Instead of apimon., you can also use apimon.hi. to get a humanly-readable \n-terminated string in response to these functions. Additionally, apimon.hi. also exposes ASforHumans, countryForHumans, and contactForHumans so you can turn AS, country, and WHOIS contact objects into humanly-readable \n-terminated strings, respectively.

If an error occured, the Promise will be rejected with the HTTP error code or 0 in the case of a network error. See Error Handling for information on what HTTP error codes mean. apimon.hi also exposes the errors object which contains the meanings of some reject codes in English.

Keywords

FAQs

Package last updated on 25 Mar 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