billputer / go-namecheap Goto Github PK
View Code? Open in Web Editor NEWA Go library for using the Namecheap API
License: MIT License
A Go library for using the Namecheap API
License: MIT License
As described by Namecheap, a domain check may return special pricing for premium domains.
https://www.namecheap.com/support/api/methods/domains/check.aspx
To implement this, we could add DomainCheckResult.IsPremiumName,.PremiumRegistrationPrice,.PremiumRenewalPrice,.PremiumRestorePrice,. PremiumTransferPrice,.IcannFee as returned by the API. (They are all just null for normal domains!)
type DomainCheckResult struct {
Domain string
Available bool
IsPremiumName bool
PremiumRegistrationPrice float32
PremiumRenewalPrice float32
PremiumRestorePrice float32
PremiumTransferPrice float32
IcannFee float32
}
I will take a look at implementing this when I have time :)
@billputer Thank you for go-namecheap!
2018/09/05 05:24:53 strconv.ParseBool: parsing "NotAlloted": invalid syntax panic: strconv.ParseBool: parsing "NotAlloted": invalid syntax
Some of these are required to register domain names such as .eu: https://www.namecheap.com/support/api/extended-attributes.aspx
After playing with the api in postman for a bit, I have discovered that ALL endpoints work fine if you make an http POST request and provide all data in x-www-form-urlencoded format instead of query parameters.
In all of my testing, all endpoints have worked fine, although query parameters will take priority over post body ones.
This is necessary for things like setHosts, where there can be a ton of data that won't fit reliably in a url string.
I propose making all calls over http post and using http form encoding instead of query strings. Hopefully that will ease some of the odd encoding/escaping behavior we have to work around too, but I wouldn't count on it.
I'm working on a pr to this effect now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.