GithubHelp home page GithubHelp logo

rm-sdk-python's Introduction

Official Resellme Python SDK

Usage

  • Make sure you already got you developer token. If you dont have the token refer to this guide: - and that its set properly using this guide: -

Installation Guide

  • Use the pyhton package manager pip to install the official Python SDK
pip3 install rm_sdk_python

Import the Resellme module to your project

  • Import the resellme package and initiate with the API_KEY from Resellme
from rm_sdk_python import Resellme


resellme = Resellme(api_key='YOUR_RESELLME_API_KEY_TOKEN')

Checking / Searching for Domain Availability

  • The resellme.search_domain method can return a json object with the values such as available or not_available
search_response = resellme.search_domain('xyz.co.zw')

# search_response is a json object
if search_response['status'] == 'available':
    # do registration etc

Registering a New Domain

  • The client's contact details are entered upon registering the domain
  • The SDK uses default nameservers upon creation and registration of the domain, however there is room to update to your preferred nameservers, check the Updating Nameserver section
# A contact is created with the details provided upon registering a domain
response = resellme.register_domain(
    domain_name='xbc.co.zw',
    first_name='Beven',
    last_name='Nyamande',
    email='[email protected]',
    company='test1',
    mobile='123123123',
    street_address='123 Xyz Street',
    core_business='Area of business undertaken by the company',
    city='Harare',
    country='Zimbabwe',
)

Updating nameservers

  • To update nameservers to custom nameservers, firstly provide the domain name of the site you want to update as shown below
  • NB: The method returns a json object
response = resellme.update_nameserver('test8.co.zw',ns1='ns1.xyz.com', ns2='ns2.xyz.com')

Updating Contact details

  • To update the email, mobile, city details for a specified domain use the following method
  • The following method illustrates a case were you want to update all the fields, however you can choose any specific field
  • NB: the method requires the domain and email as positional arguments
updated_contact_details = resellme.update_contact('test.co.zw', email='[email protected]',
                                           first_name='your name',
                                           last_name='your surname',
                                           company='Xyz Inc',
                                           mobile='0777123123',
                                           street_address='Xyz Street',
                                           core_business='Vending',
                                           city='Harare',
                                           country='Zimbabwe')

Get Domains

  • You can use this method to fetch all your domains
domains = resellme.get_all_domains()

rm-sdk-python's People

Contributors

bevennyamande avatar privyreza avatar tendai-zw avatar

Watchers

James Cloos 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.