nolanbrown/dropcam

Camera Not Found (Dropcam::CameraNotFoundError)

Closed this issue · 4 comments

Few days ago I noticed the library stopped working and fails with the following error on login.

irb(main):001:0> require 'dropcam'
=> true
irb(main):002:0> dropcam = Dropcam::Dropcam.new("", "")
Dropcam::CameraNotFoundError: Camera Not Found
    from /Library/Ruby/Gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/base.rb:108:in `get'
    from /Library/Ruby/Gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/session.rb:37:in `_session_token'
    from /Library/Ruby/Gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/session.rb:26:in `authenticate'
    from /Library/Ruby/Gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam.rb:11:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    from /usr/bin/irb:12:in `<main>'

/api/v1/users.get_session_token returns 404.

Session token is passed in response body from login request

{"status": 0, "items": [{"migrated_to_nest": false, "allow_migration_to_nest": false, "nest_access_token": null, "session_token": "d2...d2"}], "status_description": "ok", "status_detail": ""}

Here's a fix:
#9

Thanks Radek. I've merged your change in.