Class: WidgetsApiClient

Inherits:
Object
  • Object
show all
Defined in:
lib/widgets_api_client.rb

Class Method Summary collapse

Class Method Details

.change_password(user_data, bearer_token) ⇒ Object

Change password



53
54
55
# File 'lib/widgets_api_client.rb', line 53

def self.change_password(user_data, bearer_token)
    return UserService.change_password(user_data, bearer_token) 
end

.check_email(user_data) ⇒ Object

Check email



43
44
45
# File 'lib/widgets_api_client.rb', line 43

def self.check_email(user_data) 
    return UserService.check_email(user_data) 
end

.create_authentication_token(auth_data) ⇒ Object

Create authentication token



17
18
19
# File 'lib/widgets_api_client.rb', line 17

def self.create_authentication_token(auth_data)
   return AuthenticationService.create_authentication(auth_data) 
end

.create_user(user_data) ⇒ Object

Create user



33
34
35
# File 'lib/widgets_api_client.rb', line 33

def self.create_user(user_data)
    return UserService.create_user(user_data) 
end

.create_widget(widget_data, bearer_token) ⇒ Object

Create widget



88
89
90
# File 'lib/widgets_api_client.rb', line 88

def self.create_widget(widget_data, bearer_token)
    return WidgetService.create_widget(widget_data, bearer_token)
end

.destroy_widget(widget_id, bearer_token) ⇒ Object

Destroy widget



98
99
100
# File 'lib/widgets_api_client.rb', line 98

def self.destroy_widget(widget_id, bearer_token)
    return WidgetService.destroy_widget(widget_id, bearer_token)
end

.get_access_tokenObject

Remove after tesing



118
119
120
# File 'lib/widgets_api_client.rb', line 118

def self.get_access_token
    return ApplicationConfig.get_access_token
end

.get_private_widgets(bearer_token) ⇒ Object

Get private widgets



68
69
70
# File 'lib/widgets_api_client.rb', line 68

def self.get_private_widgets(bearer_token)
    return UserWidgetService.get_private_widgets(bearer_token) 
end

.get_private_widgets_with_search_term(search_term, bearer_token) ⇒ Object

Get private widgets with search term



73
74
75
# File 'lib/widgets_api_client.rb', line 73

def self.get_private_widgets_with_search_term(search_term, bearer_token)
    return UserWidgetService.get_private_widgets_with_search_term(search_term, bearer_token) 
end

.get_public_widgets(bearer_token) ⇒ Object

Get public widgets



108
109
110
# File 'lib/widgets_api_client.rb', line 108

def self.get_public_widgets(bearer_token)
    return WidgetService.get_public_widgets(bearer_token)
end

.get_public_widgets_with_search_term(search_term, bearer_token) ⇒ Object

Get public widgets with serach term



113
114
115
# File 'lib/widgets_api_client.rb', line 113

def self.get_public_widgets_with_search_term(search_term, bearer_token)
    return WidgetService.get_public_widgets_with_search_term(search_term, bearer_token)
end

.get_widgets_by_user_id(user_id, bearer_token) ⇒ Object

Get widgets by user id



78
79
80
# File 'lib/widgets_api_client.rb', line 78

def self.get_widgets_by_user_id(user_id, bearer_token)
    return UserWidgetService.get_widgets_by_user_id(user_id, bearer_token)
end

.get_widgets_by_user_id_with_search_term(user_id, search_term, bearer_token) ⇒ Object

Get widgets by user id with search term



83
84
85
# File 'lib/widgets_api_client.rb', line 83

def self.get_widgets_by_user_id_with_search_term(user_id, search_term, bearer_token)
    return UserWidgetService.get_widgets_by_user_id_with_search_term(user_id, search_term, bearer_token)
end

.refresh_authentication_token(auth_data, bearer_token) ⇒ Object

Refresh authentication token



22
23
24
# File 'lib/widgets_api_client.rb', line 22

def self.refresh_authentication_token(auth_data, bearer_token)
    return AuthenticationService.refresh_authentication_token(auth_data, bearer_token)
end

.reset_password(user_data) ⇒ Object

Reset password



48
49
50
# File 'lib/widgets_api_client.rb', line 48

def self.reset_password(user_data) 
    return UserService.reset_password(user_data) 
end

.revoke_authentication_token(auth_data, bearer_token) ⇒ Object

Revoke authentication token



27
28
29
# File 'lib/widgets_api_client.rb', line 27

def self.revoke_authentication_token(auth_data, bearer_token)
    return AuthenticationService.revoke_authentication_token(auth_data, bearer_token)
end

.set_config(client_id, client_secret) ⇒ Object



11
12
13
# File 'lib/widgets_api_client.rb', line 11

def self.set_config(client_id, client_secret)
   ApplicationConfig.set_config(client_id, client_secret)
end

.show_logged_in_user(bearer_token) ⇒ Object

Show logged in user



58
59
60
# File 'lib/widgets_api_client.rb', line 58

def self.show_logged_in_user(bearer_token)
    return UserService.show_logged_in_user(bearer_token) 
end

.show_user_id(user_id, bearer_token) ⇒ Object

Show user id



63
64
65
# File 'lib/widgets_api_client.rb', line 63

def self.show_user_id(user_id, bearer_token)
    return UserService.show_user_id(user_id, bearer_token) 
end

.update_user(user_data, bearer_token) ⇒ Object

Update user



38
39
40
# File 'lib/widgets_api_client.rb', line 38

def self.update_user(user_data, bearer_token)
    return UserService.update_user(user_data, bearer_token) 
end

.update_widget(widget_data, widget_id, bearer_token) ⇒ Object

Update widget



93
94
95
# File 'lib/widgets_api_client.rb', line 93

def self.update_widget(widget_data, widget_id, bearer_token)
    return WidgetService.update_widget(widget_data, widget_id, bearer_token)
end