reg.api2 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -98,6 +98,16 @@ We hope that this information will be useful for you and that it will help you t
98
98
 
99
99
  ## REG.API 2.0 overview
100
100
 
101
+ ### Method accessibility
102
+
103
+ All REG.API methods can be divided into categories of accessibility. On Ruby documentation accessibility marked by note. At the moment the following categories of accessibility present:
104
+
105
+ | Category | Description |
106
+ |----------|-------------|
107
+ | everyone | All methods tagged by this one are accessible to all users. Those methods does not require authentication before call. |
108
+ | clients | This tag indicates the methods which accessible only for users registered on REG.API provider. Strongly required an authenticated API request. |
109
+ | partners | Group of methods which accessible only for partners (resellers) of the REG.API provider (REG.RU LLC). Actually, partners (resellers) able to execute all methods of the REG.API without any restrictions. |
110
+
101
111
  ### Service identification parameters
102
112
  This group of parameters serves for identification of specific pre-ordered services.
103
113
 
@@ -8,14 +8,14 @@ module RegApi2
8
8
  category :domain
9
9
 
10
10
  # @!method nop(opts = {})
11
- # @param [Hash] opts
11
+ # @param [Hash] opts Options.
12
12
  # @option opts [String] :dname Domain name to check.
13
13
  # For testing purposes. Also, with the help of this function you can check accessibility of a domain and get its ID. For this, pass username+password+dname.
14
14
  # @return [NilClass or String] nil or Domain identifier, available only when the domain name is passed in the field domain_name/dname.
15
15
  define :nop
16
16
 
17
17
  # @!method get_prices(opts = {})
18
- # @param [Hash] opts
18
+ # @param [Hash] opts Options.
19
19
  # @option opts [Fixnum] :show_renew_data With this flag enabled the System will return the price of registration renewal (1/0). Optional field.
20
20
  # @option opts [Fixnum] :show_update_data Флаг возврата цен для обновления домена (1/0). Необязательное поле.
21
21
  # @option opts [String] :currency Identifier of the currency in which the prices will be quoted: RUR (default), UAH, USD, EUR. Optional field.
@@ -26,70 +26,174 @@ module RegApi2
26
26
  define :get_prices
27
27
 
28
28
  # @!method get_suggest(opts = {})
29
- define :get_suggest
29
+ # @param [Hash] opts Options.
30
+ # Suggest a domain name using keywords. The function is similar to the [Reg.Choice](https://www.reg.com/domain/new/choose) service.
31
+ # @option opts [String] :word Main keyword. For example, «domain». Mandatory field.
32
+ # @option opts [String] :additional_word Additional keyword. For example, «new» or «best». Optional field.
33
+ # @option opts [String/Symbol] :category The category of picked up names. Valid values: `pattern` — names matching defined patterns («name + prefix»), `search_trends` – current search trends, `all` (default) – all categories.
34
+ # @option opts [String/Array<String>] :tlds The zone in which the domain name should be checked for availability. Valid zones: `ru`, `рф`, `su`, `com`, `net`, `org`, `biz`, `info`. If a request does not contain a single `tlds` field, the domains will be searched in all the above-mentioned zones.
35
+ # @option opts [Boolean] :use_hyphen Use hyphens to delimit words in domain names (for example, “best- domain”). Valid values: `false` (do not use hyphens) and `true` (use hyphens). By default hyphens are not used (“bestdomain”).
36
+ # @option opts [Boolean] :use_plural Suggest plural forms for domain names. Valid values: `false` (do not suggest plural forms) and `true` (suggest plural forms). Optional field.
37
+ # @return [Array<Hash(name, avail_in)>] An array with domain name alternatives. Each element includes the field `name` (name alternative) and the array `avail_in` with a list of zones in which this name is available for registration. Maximum array size: 100.
38
+ # @example Suggest for `house` and `new`
39
+ # RegApi2.domain.get_suggest word: 'house', additional_word: 'new', use_hyphen: false, tlds: [ :ru ]
40
+ # @note Accessibility: partners
41
+ # @note Support of service lists: no
42
+ define :get_suggest, required: %w[ word ], field: :suggestions
30
43
 
31
44
  # @!method get_premium(opts = {})
32
- define :get_premium
45
+ # Gets the list of available premium domain registration, the function works like the [Reg.Premium](https://www.reg.com/domain/new/premiumdomains) service
46
+ # @param [Hash] opts Options.
47
+ # @note Accessibility: partners
48
+ # @note Support of service lists: no
49
+ define :get_premium, field: :domains
50
+
51
+ # @!method get_deleted(opts = {})
52
+ # Get a list of deleted domains. The function is similar to the [Deleted Domains](https://www.reg.com/domain/new/freeing_domains) page.
53
+ # @param [Hash] opts Options.
54
+ # @note Accessibility: partners
55
+ # @note Support of service lists: no
56
+ define :get_deleted, field: :domains
33
57
 
34
58
  # @!method check(opts = {})
35
- define :check
59
+ # This function serves to check availability of domains for registration.
60
+ # @param [Hash] opts Options.
61
+ # @note Accessibility: partners
62
+ # @note Support of service lists: yes
63
+ define :check, field: :domains
36
64
 
37
65
  # @!method create(opts = {})
66
+ # Apply for domain name registration.
67
+ # @param [Hash] opts Options.
68
+ # @note Accessibility: clients
69
+ # @note Support of service lists: For privileged clients only
38
70
  define :create
39
71
 
40
72
  # @!method transfer(opts = {})
73
+ # With the help of this function you can apply for a transfer of a domain from another registrar.
74
+ # @param [Hash] opts Options.
75
+ # @note Accessibility: clients
76
+ # @note Support of service lists: For privileged clients only
41
77
  define :transfer
42
78
 
43
79
  # @!method get_rereg_data(opts = {})
80
+ # Use this function to get a list of “to be released” domains and their details. The data is updated every 90 minutes.
81
+ # @param [Hash] opts Options.
82
+ # @note Accessibility: clients
83
+ # @note Support of service lists: no
44
84
  define :get_rereg_data
45
85
 
46
86
  # @!method set_rereg_bids(opts = {})
87
+ # Use this function to place bids for “to be released” domains. Click [here](https://www.reg.com/domain/new/rereg) for details.
88
+ # @param [Hash] opts Options.
89
+ # @note Accessibility: clients. Partners can make an advance payment in the amount of 225 rub. and to pay the balance upon the successful fulfillment of the application for registration within 10 days of its execution (see the instalment parameter below). In case of choosing this payment procedure the domain will be registered, and after payment of the full amount it will be re-registered automatically on the specified data. In case of payment violation of the full amount by the due date, the pre-payment will be considered as firfeit and will not be refunded. See more information: Clauses 2.16, 2.17, 3.2.9, 6.11 of the agreement.
90
+ # @note Support of service lists: yes
47
91
  define :set_rereg_bids
48
92
 
49
93
  # @!method get_user_rereg_bids(opts = {})
94
+ # Use this function to get the list with information about bids placed on them. The list also includes domains with overbids.
95
+ # @param [Hash] opts Options.
96
+ # @note Accessibility: clients.
97
+ # @note Support of service lists: yes
50
98
  define :get_user_rereg_bids
51
99
 
52
100
  # @!method get_docs_upload_uri(opts = {})
101
+ # Use this function to get a hyperlink for uploading documents on .RU/.SU/.РФ domains.
102
+ # @param [Hash] opts Options.
103
+ # @note Accessibility: clients.
104
+ # @note Support of service lists: no
53
105
  define :get_docs_upload_uri
54
106
 
55
107
  # @!method update_contacts(opts = {})
108
+ # @param [Hash] opts Options.
109
+ # With the help of this function you can make changes in the domain contact data.
110
+ # @note Accessibility: clients.
111
+ # @note Support of service lists: yes
56
112
  define :update_contacts
57
113
 
58
114
  # @!method update_private_person_flag(opts = {})
59
- define :update_private_person_flag
115
+ # Use this function to change settings of the Private Person and Total Private Person flags (show/hide contact data in WHOIS).
116
+ # @param [Hash] opts Options.
117
+ # @note Accessibility: clients.
118
+ # @note Support of service lists: yes
119
+ define :update_private_person_flag
60
120
 
61
121
  # @!method register_ns(opts = {})
122
+ # Domain registration in the NSI registry (for internatonal domains only).
123
+ # @param [Hash] opts Options.
124
+ # @note Accessibility: everyone.
125
+ # @note Support of service lists: no
62
126
  define :register_ns
63
127
 
64
128
  # @!method delete_ns(opts = {})
129
+ # Deletion of a domain from the NSI registry (for international domains only).
130
+ # @param [Hash] opts Options.
131
+ # @note Accessibility: everyone.
132
+ # @note Support of service lists: no
65
133
  define :delete_ns
66
134
 
67
135
  # @!method get_nss(opts = {})
136
+ # You can use this function to get DNSs for domains.
137
+ # @param [Hash] opts Options.
138
+ # @note Accessibility: clients.
139
+ # @note Support of service lists: yes
68
140
  define :get_nss
69
141
 
70
142
  # @!method update_nss(opts = {})
71
- define :update_nss
143
+ # Use this function to change DNS servers of the domain. Also this function enables/disables domain delegation (for partners only).
144
+ # @param [Hash] opts Options.
145
+ # @note Accessibility: clients.
146
+ # @note Support of service lists: yes
147
+ define :update_nss, field: :domains
72
148
 
73
149
  # @!method delegate(opts = {})
150
+ # Use this this function to set the domain delegation flag.
151
+ # @param [Hash] opts Options.
152
+ # @note Accessibility: partners.
153
+ # @note Support of service lists: yes
74
154
  define :delegate
75
155
 
76
156
  # @!method undelegate(opts = {})
157
+ # Use this flag to clear the domain delegation flag.
158
+ # @param [Hash] opts Options.
159
+ # @note Accessibility: partners.
160
+ # @note Support of service lists: yes
77
161
  define :undelegate
78
162
 
79
163
  # @!method transfer_to_another_account(opts = {})
80
- define :transfer_to_another_account
164
+ # Full transfer of a domain to another account.
165
+ # @param [Hash] opts Options.
166
+ # @note Accessibility: partners.
167
+ # @note Support of service lists: yes
168
+ define :transfer_to_another_account, field: :domains
81
169
 
82
170
  # @!method look_at_entering_list(opts = {})
83
- define :look_at_entering_list
171
+ # Use this function to view the list of domains transferred to this account.
172
+ # @param [Hash] opts Options.
173
+ # @note Accessibility: partners.
174
+ # @note Support of service lists: yes
175
+ define :look_at_entering_list, field: :messages
84
176
 
85
177
  # @!method accept_or_refuse_entering_list(opts = {})
86
- define :accept_or_refuse_entering_list
178
+ # Accept or decline domains transferred to this account.
179
+ # @param [Hash] opts Options.
180
+ # @note Accessibility: partners.
181
+ # @note Support of service lists: yes
182
+ define :accept_or_refuse_entering_list, field: :domains
87
183
 
88
184
  # @!method cancel_transfer(opts = {})
185
+ # Use this function for cancelling domain transfers
186
+ # @param [Hash] opts Options.
187
+ # @note Accessibility: partners.
188
+ # @note Support of service lists: yes
89
189
  define :cancel_transfer
90
190
 
91
191
  # @!method request_to_transfer(opts = {})
92
- define :request_to_transfer
192
+ # Send request to domain transfer.
193
+ # @param [Hash] opts Options.
194
+ # @note Accessibility: partners.
195
+ # @note Support of service lists: no
196
+ define :request_to_transfer, field: :domains
93
197
 
94
198
  extend self
95
199
  end
@@ -9,7 +9,7 @@ module RegApi2
9
9
 
10
10
  # @!method nop(opts = {})
11
11
  # Return list of specified services with its stats if specified.
12
- # @param opts
12
+ # @param opts Options.
13
13
  # @option opts [Array] services
14
14
  # @return [Hash("services" => [])]
15
15
  # @example List of services by specified identifiers
@@ -24,7 +24,7 @@ module RegApi2
24
24
 
25
25
  # @!method get_prices(opts = {})
26
26
  # Get services registration/renewal prices.
27
- # @param opts
27
+ # @param opts Options.
28
28
  # @option opts [Boolean] :show_renew_data With this flag enabled the system will return the price of renewal (1/0). Optional field.
29
29
  # @option opts [String, Symbol] :currency Identifier of the currency in which the prices will be quoted: rur (default), uah, usd, eur. Optional field.
30
30
  # @return [Hash(currency, price_group, show_renew_data, prices)] Prices.
@@ -35,7 +35,7 @@ module RegApi2
35
35
  # @!method get_servtype_details(opts = {})
36
36
  # Use this function to get prices for services and general data.
37
37
  # @note To obtain prices for several service types, you can define them in the servtype field delimiting them with commas or include several servtype fields into the request. In this case the field subtype is ignored.
38
- # @param opts
38
+ # @param opts Options.
39
39
  # @option opts [String, Symbol] :servtype Type of service: srv_webfwd — web forwarding, srv_parking — domain parking, srv_dns_both — DNS support, srv_hosting_ispmgr — hosting, srv_certificate — domain certificate, srv_voucher — domain voucher, srv_kvm — KVM access.
40
40
  # @option opts [String, Symbol] :subtype Service subtype.
41
41
  # @option opts [Boolean] :unroll_prices Show prices in expanded form.
@@ -70,6 +70,7 @@ module RegApi2
70
70
  #
71
71
  # Common payment options are allowed.
72
72
  # folder_name or folder_id are allowed.
73
+ # @param opts Options.
73
74
  # @option opts [String] :domain_name Name of the domain, for which the service is ordered.
74
75
  # @option opts [String, Symbol] :servtype The type of the ordered service.
75
76
  # @option opts [Object] :period The period for which the service is ordered, the unit of measurement (year or month) depends on the type of the service being ordered. To learn about the measurement units used for each service, use the {#get_servtype_details} function.
@@ -90,57 +91,98 @@ module RegApi2
90
91
  define :create, required: %w[ servtype ]
91
92
 
92
93
  # @!method delete(opts = {})
94
+ # Removes the service.
95
+ # @param opts Options.
93
96
  define :delete, required: %w[ servtype ]
94
97
 
95
98
  # @!method get_info(opts = {})
99
+ # Use this function to obtain information about all services.
100
+ # @param opts Options.
96
101
  define :get_info
97
102
 
98
103
  # @!method get_list(opts = {})
104
+ # Use this function to obtain a list of active services.
105
+ # @param opts Options.
99
106
  define :get_list
100
107
 
101
108
  # @!method get_folders(opts = {})
109
+ # Use this function to get the list of folders the service is associated with.
110
+ # @param opts Options.
102
111
  define :get_folders
103
112
 
104
113
  # @!method get_details(opts = {})
114
+ # Use this function to get detailed information about the service, including contact data for domains.
115
+ # @param opts Options.
105
116
  define :get_details
106
117
 
107
118
  # @!method service_get_details(opts = {})
119
+ # @deprecated Use {#get_info} instead.
120
+ # You can use this function to obtain general information about the ordered service, as well as additional data about the hosting and web forwarding services. It is an obsolete function. For the major part of service it is advisable to use the {#get_info} function instead.
121
+ # @param opts Options.
108
122
  define :service_get_details
109
123
 
110
124
  # @!method get_dedicated_server_list(opts = {})
125
+ # Get the dedicated server list.
126
+ # @param opts Options.
111
127
  define :get_dedicated_server_list
112
128
 
113
129
  # @!method update(opts = {})
130
+ # Service configuration.
131
+ # @param opts Options.
114
132
  define :update
115
133
 
116
134
  # @!method renew(opts = {})
135
+ # Domain or service renewal.
136
+ # @param opts Options.
117
137
  define :renew
118
138
 
119
139
  # @!method get_bills(opts = {})
140
+ # Use this function to get a list of invoices associated with the defined services.
141
+ # @param opts Options.
120
142
  define :get_bills
121
143
 
122
144
  # @!method set_autorenew_flag(opts = {})
145
+ # Enables or disables automatic service renewal.
146
+ # @param opts Options.
123
147
  define :set_autorenew_flag
124
148
 
125
149
  # @!method suspend(opts = {})
150
+ # Use this function to suspend services (for domains – suspend delegation).
151
+ # @param opts Options.
126
152
  define :suspend
127
153
 
128
154
  # @!method resume(opts = {})
155
+ # Use this function to resume services (for domains – resume domain delegation).
156
+ # @param opts Options.
129
157
  define :resume
130
158
 
131
159
  # @!method get_depreciated_period(opts = {})
160
+ # Use this function to calculate the number of periods till the service expiration date.
161
+ # @param opts Options.
132
162
  define :get_depreciated_period
133
163
 
134
164
  # @!method upgrade(opts = {})
165
+ # This function upgrades service subtypes (rate plans). It can be used for changes of rate plans for virtual hosting ("srv_hosting_ispmgr"), VPS servers("srv_vps") and Additional Disk Space for VPS ("srv_disk_space").
166
+ # @param opts Options.
135
167
  define :upgrade
136
168
 
137
169
  # @!method partcontrol_grant(opts = {})
170
+ # You can use this function to grant a part of service management rights to other users.
171
+ # @param opts Options.
138
172
  define :partcontrol_grant
139
173
 
140
174
  # @!method partcontrol_revoke(opts = {})
175
+ # Use this function to stop granting service management rights to other.
176
+ # @param opts Options.
141
177
  define :partcontrol_revoke
142
178
 
143
179
  # @!method resend_mail(opts = {})
180
+ # Resend mail to user.
181
+ # @param opts Options.
182
+ # @option opts [Array] mailtype Email type: `approver_email` — approve ssl certificate order, `certificate_email` — certificate email.
183
+ # @return [Hash(service_id, dname)]
184
+ # @example Resend mail.
185
+ # RegApi2.service.resend_mail servtype: :srv_ssl_certificate
144
186
  define :resend_mail
145
187
 
146
188
  extend self
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module RegApi2
3
3
  # Gem version.
4
- VERSION = "0.0.4".freeze
4
+ VERSION = "0.0.5".freeze
5
5
  end
data/reg.api2.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rr"
28
28
  spec.add_development_dependency "faker"
29
29
  spec.add_development_dependency "machinist"
30
- spec.add_development_dependency "yard"
31
- spec.add_development_dependency "redcarpet"
32
- spec.add_development_dependency "yard-redcarpet-ext"
30
+ spec.add_development_dependency "yard", "~> 0.8"
31
+ spec.add_development_dependency "redcarpet", "~> 3.0"
32
+ spec.add_development_dependency "yard-redcarpet-ext", "~> 0.0.3"
33
33
  end
@@ -23,4 +23,11 @@ describe RegApi2::Domain do
23
23
  prices.currency.should == 'USD'
24
24
  end
25
25
  end
26
+
27
+ describe :get_suggest do
28
+ it "should return suggestions" do
29
+ ans = domain.get_suggest word: 'house', additional_word: 'new', use_hyphen: false, tlds: [ :ru ]
30
+ ans.should be_kind_of(Array)
31
+ end
32
+ end
26
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reg.api2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-01 00:00:00.000000000 Z
12
+ date: 2013-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yajl-ruby
@@ -144,49 +144,49 @@ dependencies:
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
- - - ! '>='
147
+ - - ~>
148
148
  - !ruby/object:Gem::Version
149
- version: '0'
149
+ version: '0.8'
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
- - - ! '>='
155
+ - - ~>
156
156
  - !ruby/object:Gem::Version
157
- version: '0'
157
+ version: '0.8'
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: redcarpet
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
- - - ! '>='
163
+ - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: '0'
165
+ version: '3.0'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
171
- - - ! '>='
171
+ - - ~>
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '3.0'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: yard-redcarpet-ext
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
- - - ! '>='
179
+ - - ~>
180
180
  - !ruby/object:Gem::Version
181
- version: '0'
181
+ version: 0.0.3
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
187
- - - ! '>='
187
+ - - ~>
188
188
  - !ruby/object:Gem::Version
189
- version: '0'
189
+ version: 0.0.3
190
190
  description: REG.API v2 Implementation
191
191
  email:
192
192
  - akzhan.abdulin@gmail.com
@@ -198,7 +198,6 @@ files:
198
198
  - .gitignore
199
199
  - .rspec
200
200
  - .travis.yml
201
- - .yard_redcarpet_ext
202
201
  - .yardopts
203
202
  - Gemfile
204
203
  - LICENSE
@@ -253,7 +252,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
252
  version: '0'
254
253
  segments:
255
254
  - 0
256
- hash: 784159006101606174
255
+ hash: -3976809343195065454
257
256
  required_rubygems_version: !ruby/object:Gem::Requirement
258
257
  none: false
259
258
  requirements:
@@ -262,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
261
  version: '0'
263
262
  segments:
264
263
  - 0
265
- hash: 784159006101606174
264
+ hash: -3976809343195065454
266
265
  requirements: []
267
266
  rubyforge_project:
268
267
  rubygems_version: 1.8.24
data/.yard_redcarpet_ext DELETED
@@ -1 +0,0 @@
1
- tables