Module: Swiftype::Client::User
- Included in:
- Swiftype::Client
- Defined in:
- lib/swiftype/client.rb
Instance Method Summary collapse
-
#create_user ⇒ Object
Create a new user for the configured application.
-
#user(user_id) ⇒ Object
Return a user created by the configured application.
-
#users(options = {}) ⇒ Object
List users for the configured application.
Instance Method Details
#create_user ⇒ Object
Create a new user for the configured application.
229 230 231 232 233 234 235 |
# File 'lib/swiftype/client.rb', line 229 def create_user params = { :client_id => Swiftype.platform_client_id, :client_secret => Swiftype.platform_client_secret } post("users.json", params) end |
#user(user_id) ⇒ Object
Return a user created by the configured application.
240 241 242 243 244 245 246 |
# File 'lib/swiftype/client.rb', line 240 def user(user_id) params = { :client_id => Swiftype.platform_client_id, :client_secret => Swiftype.platform_client_secret } get("users/#{user_id}.json", params) end |
#users(options = {}) ⇒ Object
List users for the configured application.
220 221 222 223 224 225 226 |
# File 'lib/swiftype/client.rb', line 220 def users(={}) params = { :client_id => Swiftype.platform_client_id, :client_secret => Swiftype.platform_client_secret } get("users.json", params.merge()) end |