qaddy-client 0.0.10 → 0.0.11
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.
- data/lib/qaddy_client.rb +21 -0
- data/lib/qaddy_client/account_webstore.rb +20 -0
- data/lib/qaddy_client/version.rb +1 -1
- metadata +3 -2
data/lib/qaddy_client.rb
CHANGED
@@ -9,6 +9,7 @@ require "qaddy_client/errors"
|
|
9
9
|
require "qaddy_client/response"
|
10
10
|
require "qaddy_client/order"
|
11
11
|
require "qaddy_client/order_item"
|
12
|
+
require "qaddy_client/account_webstore"
|
12
13
|
|
13
14
|
module QaddyClient
|
14
15
|
class << self
|
@@ -45,6 +46,26 @@ module QaddyClient
|
|
45
46
|
QaddyClient::Response.new rcresponse
|
46
47
|
end
|
47
48
|
|
49
|
+
def self.create_account_and_webstore account_webstore
|
50
|
+
begin
|
51
|
+
resource = self.new_resource "/accounts"
|
52
|
+
rcresponse = self.do_post resource, account_webstore
|
53
|
+
rescue RestClient::Exception => e
|
54
|
+
self.raise_exception e
|
55
|
+
end
|
56
|
+
QaddyClient::Response.new rcresponse
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.get_info_by_login email, password
|
60
|
+
begin
|
61
|
+
resource = self.new_resource "/accounts/get_info_by_login"
|
62
|
+
rcresponse = self.do_post resource, { email: email, password: password }
|
63
|
+
rescue RestClient::Exception => e
|
64
|
+
self.raise_exception e
|
65
|
+
end
|
66
|
+
QaddyClient::Response.new rcresponse
|
67
|
+
end
|
68
|
+
|
48
69
|
|
49
70
|
private
|
50
71
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module QaddyClient
|
2
|
+
class AccountWebstore
|
3
|
+
include QaddyClient::Helpers
|
4
|
+
|
5
|
+
attr_reader :user_email
|
6
|
+
attr_reader :user_full_name
|
7
|
+
attr_reader :webstore_name
|
8
|
+
attr_reader :webstore_description
|
9
|
+
attr_reader :webstore_url
|
10
|
+
|
11
|
+
def initialize(attributes)
|
12
|
+
@user_email = attributes[:user_email]
|
13
|
+
@user_full_name = attributes[:user_full_name]
|
14
|
+
@webstore_name = attributes[:webstore_name]
|
15
|
+
@webstore_description = attributes[:webstore_description]
|
16
|
+
@webstore_url = attributes[:webstore_url]
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
data/lib/qaddy_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qaddy-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
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-07-
|
12
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- README.md
|
73
73
|
- Rakefile
|
74
74
|
- lib/qaddy_client.rb
|
75
|
+
- lib/qaddy_client/account_webstore.rb
|
75
76
|
- lib/qaddy_client/configuration.rb
|
76
77
|
- lib/qaddy_client/errors.rb
|
77
78
|
- lib/qaddy_client/helpers.rb
|