Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1011 Bytes

README.rdoc

File metadata and controls

55 lines (33 loc) · 1011 Bytes

Yandex::PDD

RUBY

require 'rubygems'
require 'YandexPDD'

token = 'abcd...'

pdd = Yandex::PDD::new(token)

unless pdd.is_user_exists('test')

    unless pdd.create_user( 'test', 'secret-0123' )

        puts 'error: ' + pdd.error.code
    else

        puts 'user created'

        if pdd.delete_user('test')

            puts 'user deleted'
        else

            puts 'error: ' + pdd.error.code
        end
    end
end

COMMAND LINE

1. edit ~/.yandex_pdd (YAML)

        cert_file: /path/to/ca-root-nss.crt

        example.com:
                token:     abcdefghijklmnopqrstuvwxyz01234567890abcdefghijklmnopqrs

2. add users

        pdd_adduser --domain example.com --user username --password secret

3. remove users

        pdd_rmuser  --domain example.com --user username

TODO

  • documentation

  • tests