yotpo 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/yotpo/api/review.rb +1 -1
- data/lib/yotpo/version.rb +1 -1
- data/spec/api/account_platform_spec.rb +0 -1
- data/spec/api/account_spec.rb +0 -1
- data/spec/api/product_spec.rb +0 -2
- data/spec/api/purchase_spec.rb +0 -3
- data/spec/api/review_spec.rb +1 -2
- data/spec/api/user_spec.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDQ2MjFmYTQ4ZTQ4Zjc0ZDU5ZDUwYTQyM2YzZjdmZTIyMjQzNzg1OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDk4ODZhYTJlYjE2NGI3YmI0MTQ1OGE3ZTc2NzM3NzhlZTUwNzg4YQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzhkMjJiMWFhNDZlMDY4Y2UzNjE1N2Y1ZWFhYThhYThmMmE1YjAwOTU3MjU5
|
10
|
+
N2UwNjRmYmY3Y2Y3YTk4NjlhZDM4MjFiZDhlN2Q1NmQzOGE2YWYwMGU1NDEx
|
11
|
+
ZjM0ZjI3NTI3Mjg4YmE5NjM2OTI2NjQxNTcxMjZjNjdlMTVmY2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWI2YTU3NmQ0NDI3MTFiZmY0OGM5YWQ2ZjZkYjI5ZDVlZmM1ZjE1N2Q5NTMw
|
14
|
+
ZDIzNTAzZjZjOWU0MzEwMDFiOGI4ZGM0OWU3YTA5NmRiZDYyM2Y2OTIyNGEw
|
15
|
+
MDNhMmE1YjAwZjdkMDUyZGEyM2YzZGVhYzc1ODNkZTFmNjFiNWY=
|
data/lib/yotpo/api/review.rb
CHANGED
@@ -20,7 +20,7 @@ module Yotpo
|
|
20
20
|
# @return [::Hashie::Rash] The new review with all of it's date
|
21
21
|
def create_review(params)
|
22
22
|
request = {
|
23
|
-
|
23
|
+
appkey: params[:app_key],
|
24
24
|
sku: params[:product_id],
|
25
25
|
domain: params[:shop_domain],
|
26
26
|
product_title: params[:product_title],
|
data/lib/yotpo/version.rb
CHANGED
@@ -13,7 +13,6 @@ describe Yotpo::AccountPlatform do
|
|
13
13
|
app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
|
14
14
|
}
|
15
15
|
stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/account_platform").
|
16
|
-
with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
|
17
16
|
to_return(:status => 200, :body => fixture('new_account_platform.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
18
17
|
|
19
18
|
@response = Yotpo.create_account_platform(create_account_platform_request)
|
data/spec/api/account_spec.rb
CHANGED
@@ -30,7 +30,6 @@ describe Yotpo::Account do
|
|
30
30
|
utoken: '12ei1rr1i3ufn23itfoijver903'
|
31
31
|
}
|
32
32
|
stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/subomain_check/shalom1?utoken=12ei1rr1i3ufn23itfoijver903').
|
33
|
-
with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
|
34
33
|
to_return(:status => 200, :body => fixture('check_subdomain.json'), :headers => {})
|
35
34
|
|
36
35
|
@response = Yotpo.check_minisite_subdomain(sub_domain_data)
|
data/spec/api/product_spec.rb
CHANGED
@@ -9,7 +9,6 @@ describe Yotpo::Product do
|
|
9
9
|
|
10
10
|
}
|
11
11
|
stub_get("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/bottom_lines?utoken=asdeuh1di1udifn1309fn09").
|
12
|
-
with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
|
13
12
|
to_return(:status => 200, :body => fixture('get_all_bottom_lines.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
14
13
|
|
15
14
|
@response = Yotpo.get_all_bottom_lines(get_app_bottom_lines_params)
|
@@ -30,7 +29,6 @@ describe Yotpo::Product do
|
|
30
29
|
}
|
31
30
|
|
32
31
|
stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/bottomline").
|
33
|
-
with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
|
34
32
|
to_return(:status => 200, :body => fixture('get_product_bottom_line.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
35
33
|
|
36
34
|
@response = Yotpo.get_product_bottom_line(get_bottom_line_params)
|
data/spec/api/purchase_spec.rb
CHANGED
@@ -20,7 +20,6 @@ describe Yotpo::Purchase do
|
|
20
20
|
app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
|
21
21
|
}
|
22
22
|
stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases").
|
23
|
-
with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
|
24
23
|
to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
25
24
|
|
26
25
|
@response = Yotpo.create_new_purchase(create_new_purchase_request)
|
@@ -57,7 +56,6 @@ describe Yotpo::Purchase do
|
|
57
56
|
]
|
58
57
|
}
|
59
58
|
stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases/mass_create").
|
60
|
-
with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
|
61
59
|
to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
62
60
|
|
63
61
|
@response = Yotpo.create_new_purchases(create_new_purchase_request)
|
@@ -76,7 +74,6 @@ describe Yotpo::Purchase do
|
|
76
74
|
app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
|
77
75
|
}
|
78
76
|
stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases?count=10&page=1&utoken=asdeuh1di1udifn1309fn09').
|
79
|
-
with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
|
80
77
|
to_return(:status => 200, :body => fixture('get_list_of_purchases.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
81
78
|
|
82
79
|
@response = Yotpo.get_purchases(get_purchases_request)
|
data/spec/api/review_spec.rb
CHANGED
@@ -18,7 +18,7 @@ describe Yotpo::Review do
|
|
18
18
|
review_title: Faker::Lorem.sentence(5),
|
19
19
|
review_score: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5].sample
|
20
20
|
}
|
21
|
-
stub_get('/reviews/dynamic_create').with(:query => hash_including({:
|
21
|
+
stub_get('/reviews/dynamic_create').with(:query => hash_including({:appkey => 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'})).to_return(:body => fixture('new_review.json'),
|
22
22
|
:headers => {:content_type => 'application/json; charset=utf-8'})
|
23
23
|
@response = Yotpo.create_review(anonymous_review)
|
24
24
|
end
|
@@ -40,7 +40,6 @@ describe Yotpo::Review do
|
|
40
40
|
product_id: 'A12'
|
41
41
|
}
|
42
42
|
stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/reviews?count=5&page=1").
|
43
|
-
with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
|
44
43
|
to_return(:status => 200, :body => fixture('get_product_reviews.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
45
44
|
@response = Yotpo.get_product_reviews(get_reviews_params)
|
46
45
|
end
|
data/spec/api/user_spec.rb
CHANGED
@@ -34,8 +34,7 @@ describe Yotpo::User do
|
|
34
34
|
grant_type: "client_credentials"
|
35
35
|
}
|
36
36
|
stub_request(:post, "https://api.yotpo.com/oauth/token").
|
37
|
-
with(:body => "{\":client_id\":\"a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP\",\":client_secret\":\"NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm\",\":grant_type\":\"client_credentials\"}"
|
38
|
-
:headers => {'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
|
37
|
+
with(:body => "{\":client_id\":\"a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP\",\":client_secret\":\"NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm\",\":grant_type\":\"client_credentials\"}").
|
39
38
|
to_return(:status => 200, :body => fixture('bearer_token.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
40
39
|
@response = Yotpo.get_oauth_token(oauth_request)
|
41
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yotpo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Shub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|