All Projects → dnsimple → Dnsimple Ruby

dnsimple / Dnsimple Ruby

Licence: mit
The DNSimple API client for Ruby.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Dnsimple Ruby

Js Client
A Open-API derived JS + Node.js API client for Netlify
Stars: ✭ 170 (-1.73%)
Mutual labels:  api, api-client
Sdk Js
Directus JS SDK — JavaScript Software Development Kit for Node and Browser
Stars: ✭ 117 (-32.37%)
Mutual labels:  api, api-client
Douyin Api
抖音API、抖音数据、抖音直播数据、抖音直播Api、抖音视频Api、抖音爬虫、抖音去水印、抖音视频下载、抖音视频解析、抖音直播监控、抖音数据采集
Stars: ✭ 112 (-35.26%)
Mutual labels:  api, api-client
Google Searchconsole
A wrapper for the Google Search Console API.
Stars: ✭ 83 (-52.02%)
Mutual labels:  api, api-client
Thehive4py
Python API Client for TheHive
Stars: ✭ 143 (-17.34%)
Mutual labels:  api, api-client
Rapidql
Query multiple APIs and DBs and join them in a single query
Stars: ✭ 91 (-47.4%)
Mutual labels:  api, api-client
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-32.95%)
Mutual labels:  api, api-client
Slacko
A neat interface for Slack
Stars: ✭ 64 (-63.01%)
Mutual labels:  api, api-client
Laravel Api Explorer
API explorer for laravel applications
Stars: ✭ 138 (-20.23%)
Mutual labels:  api, api-client
Anyapi
AnyAPI is a library that helps you to write any API wrappers with ease and in pythonic way.
Stars: ✭ 126 (-27.17%)
Mutual labels:  api, api-client
Httpie Oauth
OAuth plugin for HTTPie
Stars: ✭ 78 (-54.91%)
Mutual labels:  api, api-client
Dialogflow
Unofficial php sdk for Dialogflow
Stars: ✭ 165 (-4.62%)
Mutual labels:  api, api-client
Openvulnapi
Documentation and Tools for Cisco's PSIRT openVuln API
Stars: ✭ 73 (-57.8%)
Mutual labels:  api, api-client
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-36.42%)
Mutual labels:  api, api-client
Igdb
Go client for the Internet Game Database API
Stars: ✭ 65 (-62.43%)
Mutual labels:  api, api-client
Pixiv Api Client
Promise based Pixiv API client for node.js and react native
Stars: ✭ 114 (-34.1%)
Mutual labels:  api, api-client
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+6046.82%)
Mutual labels:  api, api-client
Redux Api Call
One declarative API to create reducers, action creators and selectors for any API calls
Stars: ✭ 63 (-63.58%)
Mutual labels:  api, api-client
Tik4net
Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Stars: ✭ 118 (-31.79%)
Mutual labels:  api, api-client
Mobx Rest
REST conventions for Mobx
Stars: ✭ 164 (-5.2%)
Mutual labels:  api, api-client

DNSimple Ruby Client

A Ruby client for the DNSimple API v2.

Build Status Coverage Status

DNSimple provides DNS hosting and domain registration that is simple and friendly. We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.

Installation

You can install the gem manually:

gem install dnsimple

Or use Bundler and define it as a dependency in your Gemfile:

gem 'dnsimple', '~> 4.0'

Usage

This library is a Ruby client you can use to interact with the DNSimple API v2. Here are some examples.

require 'dnsimple'

client = Dnsimple::Client.new(access_token: "a1b2c3")

# Fetch your details
response = client.identity.whoami   # execute the call
response.data                       # extract the relevant data from the response or
client.identity.whoami.data         # execute the call and get the data in one line

# Define an account ID.
account_id = 1010

# You can also fetch it from the whoami response
# as long as you authenticate with an Account access token
whoami = client.identity.whoami.data
account_id = whoami.account.id

# List your domains
puts client.domains.list_domains(account_id).data                      # => domains from the account 1234, first page
puts client.domains.list_domains(account_id, query: { page: 3 }).data  # => domains from the account 1234, third page
puts client.domains.all_domains(account_id).data                       # => all domains from the account 1234 (use carefully)

# Create a domain
response = client.domains.create_domain(account_id, name: "example.com")
puts response.data

# Get a domain
response = client.domains.domain(account_id, "example.com")
puts response.data

For the full library documentation visit http://rubydoc.info/gems/dnsimple

Sandbox Environment

We highly recommend testing against our sandbox environment before using our production environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.

The client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host using the base_url option when you construct the client:

client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", access_token: "a1b2c3")

You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Setting a custom User-Agent header

You can customize the User-Agent header for the calls made to the DNSimple API:

client = Dnsimple::Client.new(user_agent: "my-app/1.0")

The value you provide will be prepended to the default User-Agent the client uses. For example, if you use my-app/1.0, the final header value will be my-app/1.0 dnsimple-ruby/0.14.0 (note that it will vary depending on the client version).

We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.

License

Copyright (c) 2010-2021 DNSimple Corporation. This is Free Software distributed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].