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 => 'peter.pan@example.com'
)
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 => 'paulaer.panter@example.com'
)
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