shilpa20 1.2.3 → 1.2.4
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 +4 -4
- data/lib/shilpa20/user_service.rb +4 -4
- data/lib/shilpa20/user_widget_service.rb +4 -4
- data/lib/shilpa20/widget_service.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 885e0522ea5f14f2b7589ae9ad2464e5f6f5f5efe59dd9a46a436ad0e1e0147e
|
4
|
+
data.tar.gz: f066611e281e3318dcdc81a08e6796a83054b67781f555ef5aec5ac8b6071d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 928bfd5df60e6f0395c6e3e24faa3d60ece1fe53e60da2516d15765526505b59adb91b6b84e1965838705273c0e8d0814493ff8a7e5602f6f6b7b9322bf6398c
|
7
|
+
data.tar.gz: 8020813cd3b9ec1be7ddca57a9e9089a3d556ac503abe9d9ec12e721bb09b681d4dac2d4e839b81ac14585b9d634e5c7e93a795242ba8e77e748ba07889e0ecb
|
@@ -25,7 +25,7 @@ class UserService
|
|
25
25
|
update_user_payload = User.get_payload(user)
|
26
26
|
return RestClient::Request.execute(method: :put, url: @@create_update_url,
|
27
27
|
payload: update_user_payload,
|
28
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
28
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.check_email(user)
|
@@ -45,18 +45,18 @@ class UserService
|
|
45
45
|
change_password_payload = User.get_payload(user)
|
46
46
|
return RestClient::Request.execute(method: :post, url: @@change_password_url,
|
47
47
|
payload: change_password_payload,
|
48
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
48
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.show_logged_in_user(bearer_token)
|
52
52
|
return RestClient::Request.execute(method: :get, url: @@show_logged_in_user_url,
|
53
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
53
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
54
54
|
end
|
55
55
|
|
56
56
|
def self.show_user_id(user_id, bearer_token)
|
57
57
|
url_with_id = @@show_user_id_url + "#{user_id}"
|
58
58
|
return RestClient::Request.execute(method: :get, url: url_with_id,
|
59
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
59
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.get_user_with_client_info(user)
|
@@ -13,27 +13,27 @@ class UserWidgetService
|
|
13
13
|
def self.get_private_widgets(bearer_token)
|
14
14
|
return RestClient::Request.execute(method: :get, url: @@own_widgets_url,
|
15
15
|
headers: {'Content-Type': 'application/json', params: {:client_id => ApplicationConfig.get_client_id, :client_secret => ApplicationConfig.get_client_secret},
|
16
|
-
'Authorization':
|
16
|
+
'Authorization': bearer_token})
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.get_private_widgets_with_search_term(search_term, bearer_token)
|
20
20
|
return RestClient::Request.execute(method: :get, url: @@own_widgets_url,
|
21
21
|
headers: {'Content-Type': 'application/json', params: {:client_id => ApplicationConfig.get_client_id, :client_secret => ApplicationConfig.get_client_secret, :term => search_term},
|
22
|
-
'Authorization':
|
22
|
+
'Authorization': bearer_token})
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.get_widgets_by_user_id(user_id, bearer_token)
|
26
26
|
url_with_id = @@widgets_by_user_id_url + "#{user_id}" + "/widgets"
|
27
27
|
return RestClient::Request.execute(method: :get, url: url_with_id,
|
28
28
|
headers: {'Content-Type': 'application/json', params: {:client_id => ApplicationConfig.get_client_id, :client_secret => ApplicationConfig.get_client_secret},
|
29
|
-
'Authorization':
|
29
|
+
'Authorization': bearer_token})
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.get_widgets_by_user_id_with_search_term(user_id, search_term, bearer_token)
|
33
33
|
url_with_id = @@widgets_by_user_id_url + "#{user_id}" + "/widgets"
|
34
34
|
return RestClient::Request.execute(method: :get, url: url_with_id,
|
35
35
|
headers: {'Content-Type': 'application/json', params: {:client_id => ApplicationConfig.get_client_id, :client_secret => ApplicationConfig.get_client_secret, :term => search_term},
|
36
|
-
'Authorization':
|
36
|
+
'Authorization': bearer_token})
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
@@ -17,7 +17,7 @@ class WidgetService
|
|
17
17
|
create_widget_payload = Widget.get_payload(widget_data)
|
18
18
|
return RestClient::Request.execute(method: :post, url: @@create_widget_url,
|
19
19
|
payload: create_widget_payload,
|
20
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
20
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.update_widget(widget_data, widget_id, bearer_token)
|
@@ -25,30 +25,30 @@ class WidgetService
|
|
25
25
|
update_widget_payload = Widget.get_payload(widget_data)
|
26
26
|
return RestClient::Request.execute(method: :put, url: update_url_with_widget_id,
|
27
27
|
payload: update_widget_payload,
|
28
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
28
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.destroy_widget(widget_id, bearer_token)
|
32
32
|
destroy_url_with_widget_id = @@update_destroy_widget_url + "#{widget_id}"
|
33
33
|
return RestClient::Request.execute(method: :delete, url: destroy_url_with_widget_id,
|
34
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
34
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.get_private_widgets(bearer_token)
|
38
38
|
return RestClient::Request.execute(method: :get, url: @@create_widget_url,
|
39
|
-
headers: {'Content-Type': 'application/json', 'Authorization':
|
39
|
+
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
40
40
|
end
|
41
41
|
|
42
42
|
def self.get_public_widgets(bearer_token)
|
43
43
|
return RestClient::Request.execute(method: :get, url: @@list_widget_url,
|
44
44
|
headers: {'Content-Type': 'application/json', params: {:client_id => @@client_id, :client_secret => @@client_secret},
|
45
|
-
'Authorization':
|
45
|
+
'Authorization': bearer_token})
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.get_public_widgets_with_search_term(search_term, bearer_token)
|
49
49
|
return RestClient::Request.execute(method: :get, url: @@list_widget_url,
|
50
50
|
headers: {'Content-Type': 'application/json', params: {:client_id => @@client_id, :client_secret => @@client_secret, :term => search_term},
|
51
|
-
'Authorization':
|
51
|
+
'Authorization': bearer_token})
|
52
52
|
end
|
53
53
|
|
54
54
|
# to remove once tested
|