yandex_domains 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b585be5a4b837cadbb735a27f9e015e382ae3daf
4
- data.tar.gz: 9794d4a261ac075cce892c712b01ae64cef7134f
3
+ metadata.gz: 277c32eb2b75d01b8cca09f0773b346d765db57c
4
+ data.tar.gz: 310dc2aecdfd994aaf533a84b766895cd8e31f8c
5
5
  SHA512:
6
- metadata.gz: 2b89af835baa920e2e3929423467cc9b726fa113c09ecf1b82034443399afa67d3696c5ed6c6ad5c3138985a9f9cd88c63b9bc0ed4a58ce55606f7650004c839
7
- data.tar.gz: 0c434f3406289682f91fd481101ea62449d97b6a8974750bbc157936f82cf47455fe339414b3bbb6a8a3893c71ce0055c90a2fd0271e6237eae20d0947d54ea4
6
+ metadata.gz: 9daf3719232de306e16a54d90f37d64e85d9d202dbbc582d30a62e1a65828e97efce6a698fa913384d64ae89394e17b2c083e1be12d5abfba071e14625ac0615
7
+ data.tar.gz: e7e792b58a978042312ad074b3df0da1d5995d7d3ccc7ea517d3c3860bf8988c12cd94194371288df895dff80cf55d3f43ea1bfa490536a099d3f17df8185733
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # YandexDomains
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/yandex_domains`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Ruby client for [Yandex.Mail for Domains API](https://tech.yandex.com/domain).
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,34 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ This client works for only **Administrator** access. More details about Administrator user is [here](https://tech.yandex.com/domain/doc/concepts/termin-docpage/). In order to use the client and API features, the PDD token is required. You can get a PDD token on the [token management](https://pddimp.yandex.ru/api2/admin/get_token) page by entering a domain name that has already been verified.
24
+
25
+ ** Initialize a client
26
+ ```ruby
27
+ client = YandexDomains::Client.new(pdd_token)
28
+ ```
26
29
 
27
- ## Development
30
+ ## Usage Examples
31
+ After configuring a client, you can do the followings.
28
32
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
33
+ **Signing up a domain**
34
+ ```ruby
35
+ client.connect('google.com')
36
+ ```
30
37
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+ ** Adding a mailbox for a domain**
39
+ ```ruby
40
+ client.add_mailbox('google.com', 'hi', 'strongpassword')
41
+ ```
42
+
43
+ ** Deleting a mailbox on a domain**
44
+ ```ruby
45
+ client.delete_mailbox('google.com', 'hi')
46
+ ```
32
47
 
33
48
  ## Contributing
34
49
 
35
- 1. Fork it ( https://github.com/[my-github-username]/yandex_domains/fork )
50
+ 1. Fork it ( https://github.com/beydogan/yandex_domains/fork )
36
51
  2. Create your feature branch (`git checkout -b my-new-feature`)
37
52
  3. Commit your changes (`git commit -am 'Add some feature'`)
38
53
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module YandexDomains
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -127,7 +127,7 @@ module YandexDomains
127
127
  req = self.class.post("/admin/email/edit", query: query)
128
128
  req.parsed_response
129
129
  end
130
- # Used for editing mailbox parameters: password, user's first and last name, and so on.
130
+ # Used for deleting a mailbox on a domain
131
131
  # @param domain [String] Name of the domain.
132
132
  # @param login [String] The email address of the mailbox, in the format “username@domain.com” or “username”.
133
133
  # @return [Hash] Parsed Response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex_domains
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Beydogan