Comments (7)
Hi,
Sorry the interface has been overhauled for 1.0.0 and I've neglected to update the README file. While I get something together to document the updated interface you can check the tests to see how the different types of requests can be created now.
from epp-client.
Ok, thanks for your quick response.
Could you provide just a brief working example of checking a domain availability.
Regards
M
from epp-client.
I've pushed up a quick set of examples in the README file
resp = client.check EPP::Domain::Check.new('example.com', 'example.net', 'example.org')
resp.available?('example.com') #=> true
resp.available?('example.net') #=> false
resp.available?('example.org') #=> false
if you've only got one name you want to check then you can use
resp = client.check EPP::Domain::Check.new('example.com')
resp.available? #=> true
as you don't have to pass the name to the #available?
method when theres only one item being checked.
from epp-client.
Thank you very much!
from epp-client.
@geoffgarside sorry to bother you again, but your example is just partially working for me..
The check is working, but the resp.available? isn't.
My code
require "epp-client"
client = EPP::Client.new('user', 'pass', 'host', { :port => 1234} )
client.hello
resp = client.check EPP::Domain::Check.new('example.com', 'example.org')
puts resp.class
resp.available?('example.com')
My output
EPP::Response
new.rb:7:in `<main>': undefined method `available?' for #<EPP::Response:0x00000001f00220> (NoMethodError)
It's looks to me, like the client.check response is of type EPP::Response instead of EPP::Domain::CheckResponse, am I doing something really stupid or missing something?
FTR, gem epp-client installed is version 1.0.0
Regards
M
from epp-client.
Damn,
Most of my use of this code is in m247/nominet-epp so I'd forgotten how low the interface was with this. The interface was quite influenced by the needs for testing the generated XML.
I've updated the README. I'd forgotten that you need to pass the EPP::Response to something like EPP::Domain::CheckResponse.new. It makes me think that it might be worth adding another method to the likes of EPP::Domain::Check where it can specify the response class to use.
from epp-client.
I've just see how you guys do it on the nominet-epp., I will try to backport the logic into the epp-client and send a pull request.
I'll let you know if I need some help with the test cases.
Thanks for all your help Sir!
Regards
M
from epp-client.
Related Issues (7)
- DEFAULT_SERVICES HOT 4
- Extract requests into their own objects HOT 1
- Ensure the TCP socket used is verifying the SSL peer certificate HOT 1
- Cannot get extensions to work HOT 8
- Contact create/update and info doesn't support multiple "street" elements HOT 1
- LibXML error when calling #to_xml more than once on a command with extension loaded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epp-client.