Git Product home page Git Product logo

cps-client's Introduction

CPS-CLIENT

Ruby api for the arp-client of cps-datensysteme.de

Installation

sudo gem install cps-client
bundle # to install dependencies

Howto register a domain

Create a cps-client object:

server = CPS::Client.new(
  :cid => 'your-cid',
  :uid => 'your-uid',
  :pwd => 'your-pwd',
  :production => false # for development
)

Create a client contact handle:

client_contact = CPS::Contact.new(
  :object      => 'QD1234',
  :firstname   => 'Peter',
  :lastname    => 'Pan',
  :street      => 'your-street',
  :postal      => '60000',
  :city        => 'Frankfurt am Main',
  :state       => 'Hessen',
  :iso_country => 'DE',
  :phone       => '+49 69471117',
  :fax         => '+49 69471118',
  :email       => '[email protected]'
)
          
server.query(client_contact.create)

Create your company contact handle:

company_contact = CPS::Contact.new(
  :object      => 'QD0001',
  :firstname   => 'Paulär',
  :lastname    => 'Panter',
  :street      => 'my-street',
  :postal      => '60000',
  :city        => 'Frankfurt am Main',
  :state       => 'Hessen',
  :iso_country => 'DE',
  :phone       => '+49 69471123',
  :fax         => '+49 69471124',
  :email       => '[email protected]'
)
          
server.query(company_contact.create)

Register the domain:

domain = CPS::Domain.new(
  :domain => 'example-domain-123456.com',
  :adminc => 'QD1234',
  :ownerc => 'QD1234',
  :techc  => 'QD0001',
  :billc  => 'QD0001',
  :ns1    => 'my1.dns.com',
  :ns2    => 'my2.dns.com'
)

server.query(domain.create)

Tranfer a domain:

domain = CPS::Domain.new(
  :domain => 'example-domain-123456.com',
  :adminc => 'QD1234',
  :ownerc => 'QD1234',
  :techc  => 'QD0001',
  :billc  => 'QD0001',
  :ns1    => 'my1.dns.com',
  :ns2    => 'my2.dns.com',
  :reg_type  => 'transfer',
  :auth_info => 'Geheim0815'
)

server.query(domain.transfer)

Add a DNSKEY to a domain:

domain = CPS::Dnssec.new(
  :domain     => 'example-domain-123456.com',
  :flags      => '257',
  :protocol   => '3',
  :algorithm  => '13',
  :public_key => 'q17D4VK9Wl2q...xUA=='
)

server.query(dnssec.create)

Todo

- Add validation and error handling

© 2010-2023 qutic development GmbH

cps-client's People

Contributors

jfqd avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.