Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

kasthack-labs/kasthack.yandex.pdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yandex PDD API for .NET

Nuget NuGet Build status license Join the chat at https://gitter.im/kasthack-yandex-pdd/Lobby

Installation

Install-Package kasthack.yandex.pdd

Docs

API Description by yandex

https://tech.yandex.ru/pdd/doc/about-docpage/

Tokens

Admin token: https://pddimp.yandex.ru/api2/admin/get_token Registar registration/token: https://pddimp.yandex.ru/api2/registrar/registrar

Sample:

var unread =
    (
        await                   // we only have async methods
            new PddApi(
                "PddToken",
                /*
                    get it here: https://pddimp.yandex.ru/api2/admin/get_token
                */
                "OAuthToken"
                /*
                    Getting oauth token:
                        a)
                            build oauth uri with YaToken.GetOAuthURL
                            feed redirect uri to FromRedirectUrl
                        b)
                            implicit cast from token string like here
                */
            )
            .Domain( "who.ec" ) //get domain context
            .Mail
            .Counters( "test@who.ec" )
    )
    .Counters
    .Unread;

API coverage

  • Mail
    • Add
    • Del
    • List
    • Edit
    • Counters
  • DKIM
    • Status
    • Enable
    • Disable
  • DNS
    • Add
    • List
    • Edit
    • Delete
  • Domain
    • Register
    • RegistrationStatus
    • Details
    • Delete
    • SetCountry
    • GetLogo
    • DeleteLogo
    • SetLogo
  • Import
    • CheckSettings
    • StartOneImport
    • CheckImport
    • StopAllImports
  • Maillist
    • Add
    • List
    • Delete
    • Subscribe
    • Subscribers
    • Unsubscribe
    • GetCanSendOnBehalf
    • SetCanSendOnBehalf
    • Import file
  • Domains
    • List
  • Deputy
    • Add
    • List
    • Delete