On a previous post we've talked abut our new REST API and the benefits it provides to our power users. If that was not enough for your satisfaction, we are releasing REST Clients for Python and Ruby to help you use our service without having worry about anything.
Having Invalid Signature problems? Your OAuth Library doesn't comply the OAuth standards? Don't worry, we've already faced all this problems and we have the solution for them. Our client respects the full standard and you won't have to deal with OAuth problems AT ALL.
The installation is a simple and quick process, as our libraries are published at Python Package Index and Rubygems.
- Python:
$ sudo pip install netdnarws
- Ruby:
$ gem install netdnarws
Using our client is really simple and straight forward. The following example is for getting the Pullzonees our account has.
- Python:
from netdnarws import NetDNA
api = NetDNA("my_username", "my_key", "my_secret")
api.get("/zones/pull.json")
# ... outputs ...
# {u'code': 200,
# u'data': {u'current_page_size': 3,
# u'page': 1,
# u'page_size': u'50',
# u'pages': 1,
# u'pullzones': [ ... ],
# u'total': 3}}
- Ruby:
require 'netdnarws'
api = NetDNARWS::NetDNA.new("my_username", "my_key", "my_secret")
api.get("/zones/pull.json")
# ... outputs ...
# {"code"=>200,
# "data"=>
# {"page"=>1,
# "pages"=>1,
# "page_size"=>"50",
# "current_page_size"=>3,
# "total"=>3,
# "pullzones"=> [ ... ]}
# }
This software is Open Source and published in our Public GitHub Repository. If you wish to contribute, feel free to report us any issues or send us pull requests.
looking good!