Skip to content

dctabuyz/Yandex-API-PDD.ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

API wrapper for Yandex mailhosting service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages