Coder Social home page Coder Social logo

python-uptimerobot's People

Contributors

clean-cole avatar codebradley avatar drivard avatar manuq avatar nachouve avatar philippeowagner avatar tfeldmann avatar ticoombs avatar walterrenner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

python-uptimerobot's Issues

need new alert types

alert_contact.py

from future import absolute_import, division, print_function, unicode_literals

from termcolor import colored

class AlertContact(object):
class Type:
SMS = 1
EMAIL = 2
TWITTER = 3
BOXCAR = 4
PUSHBULLET = 6
WEBHOOK = 5

TYPES = {
    Type.SMS: "sms",
    Type.EMAIL: "email",
    Type.TWITTER: "twitter",
    Type.BOXCAR: "boxcar",
    Type.PUSHBULLET: "pushbullet",
    Type.WEBHOOK: "webhook",
}

Lines 171-176 in RequestApi(self, url)

I'm extending your code to include some additional API functions and this method was returning None. The problem is that if UptimeRobot returns stat:'fail' then the method doesn't return. This is because stat does exist, but the value is not 'ok'. I believe I fixed this issue by updating the code to:

def requestApi(self, url):
        response = urllib_request.urlopen(url)
        content = response.read().decode('utf-8')
        jContent = json.loads(content)
        if jContent.get('stat'):
            stat = jContent.get('stat')
            if stat == "ok":
                return True, jContent
        return False, jContent

Python3 compatibility

Some errors occur on import (Python3.4):

from uptimerobot.uptimerobot import UptimeRobot
  File "~/Code/src/uptimerobot/uptimerobot/uptimerobot.py", line 103
    except Exception, e:
                    ^
SyntaxError: invalid syntax

PyPI transfer required

Hi @CodeBradley

I'm happy that you continue the development of python-uptimerobot and maintain the package.
We should transfer the project on the Python Package Index as well - otherwise you cannot push new releases to the PyPI. Could you please give me your username? Thanks.

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.