From af28b21c255ec742d5c4042b760c227c10e7aecf Mon Sep 17 00:00:00 2001 From: John W Kerns Date: Tue, 5 Sep 2017 13:13:36 -0700 Subject: [PATCH] README Updated --- README.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ad3819b..579290c 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ The version of CheckMyIP documented here is: **v1.0.0** ### TABLE OF CONTENTS ### 1. [What is CheckMyIP](#what-is-checkmyip) 2. [How to Use](#how-to-use) -3. [Install Process](#install-process) -4. [Using the API](#using-the-api) +3. [Using the API](#using-the-api) +4. [Install Process](#install-process) 5. [Contributing](#contributing) ----------------------------------------- ### WHAT IS CHECKMYIP ### -Everybody has used a service like [WhatIsMyIP.com](https://www.whatismyip.com/) before. If you are an IT engineer or even an amateur technology enthusiast, then you have probably had a reason to check to see your public IP address. This service works great when a browser is available, but at times it is not. We often find ourselves logged into a remote Linux machine or a network switch/router which has a command line and terminal clients (Telnet and SSH), but no browser. The CheckMyIP app and the [TelnetMyIP.com](telnet://telnetmyip.com/) and **SSHMyIP.com** public services were created with this in mind. +Everybody has used a service like [WhatIsMyIP.com](https://www.whatismyip.com/) before. If you are an IT engineer or even an amateur technology enthusiast, then you have probably had a reason to check to see your public IP address. This service works great when a browser is available, but at times it is not. We often find ourselves logged into a remote Linux machine or a network switch/router which has a command line and terminal clients (Telnet and SSH), but no browser. The CheckMyIP app and the **TelnetMyIP.com** and **SSHMyIP.com** public services were created with this in mind. ----------------------------------------- @@ -34,6 +34,20 @@ To enable the use of this service as a simple API, the response is formatted as **Note:** _The DNS records for_ `telnetmyip.com` _and_ `sshmyip.com` _point to the same services._ +----------------------------------------- +### USING THE API ### +The CheckMyIP code contains the `CheckMyIP_Client` class which is an API client example which can be used to query a CheckMyIP server (like telnetmyip.com). Below is an example of how you can use it. + +``` +from checkmyip import CheckMyIP_Client + +client = CheckMyIP_Client() +ipdict = client.get() +print("\nMy IP is %s\n" % ipdict["ip"]) +print("\nI used port number %s\n" % ipdict["port"]) +``` + + ----------------------------------------- ### INSTALL PROCESS ### If you would rather set up your own private instance of CheckMyIP, then you can follow the below instructions to set it up for yourself. @@ -146,19 +160,6 @@ service checkmyip status ``` ------------------------------------------ -### USING THE API ### -The CheckMyIP code contains the `CheckMyIP_Client` class which is an API client example which can be used to query a CheckMyIP server (like telnetmyip.com). Below is an example of how you can use it. - -``` -from checkmyip import CheckMyIP_Client - -client = CheckMyIP_Client() -ipdict = client.get() -print("\nMy IP is %s\n" % ipdict["ip"]) -print("\nI used port number %s\n" % ipdict["port"]) -``` - ----------------------------------------- ### CONTRIBUTING ### If you would like to help out by contributing code or reporting issues, please do!