Socket
Book a DemoInstallSign in
Socket

magic-admin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-admin

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Magic Admin Ruby SDK

The Magic Admin Ruby SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to handle DID Token.

Table of Contents

Documentation

See the Magic doc!

Installation

Add this line to your application's Gemfile:

gem 'magic-admin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install magic-admin

Prerequisites

  • Ruby 2.5+

Quick Start

Before you start, you will need an API secret key. You can get one from the Magic Dashboard. Once you have the API secret key, you can instantiate a Magic object.

require 'magic-admin'

magic = Magic.new(api_secret_key: '<YOUR_API_SECRET_KEY>')

magic.token.validate('DID_TOKEN')

# Read the docs to learn more! 🚀

Optionally if you would like, you can load the API secret key from the environment variable, MAGIC_API_SECRET_KEY.

# Set the env variable `MAGIC_API_SECRET_KEY`.

magic = Magic.new

Note: The arguments passed to the Magic object takes precedence over the environment variables.

Configure Network Strategy

The Magic object also takes in retries, timeout and backoff as optional arguments at the object instantiation time so you can override those values for your application setup.

magic = Magic.new(retries: 5, timeout: 10, backoff: 0.03)

Changelog

See Changelog

License

See License

FAQs

Package last updated on 10 Jul 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.