class Platforms::Yammer::Api::Users
Public Instance Methods
Get a User by email @param address [#to_s] email of the User @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersby_emailjsonemailuserdomaincom
# File lib/platforms/yammer/api/users.rb, line 51 def by_email address, options={}, headers={} params = options.merge({ email: address }) @connection.get "users/by_email.json", params, headers end
Get current User @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/userscurrentjson
# File lib/platforms/yammer/api/users.rb, line 27 def current options={}, headers={} @connection.get "users/current.json", options, headers end
Delete an existing User (admins and verified admins only) @param user_id [#to_s] the id of the User to update @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersidjson-2
# File lib/platforms/yammer/api/users.rb, line 101 def delete user_id, options={}, headers={} @connection.delete "users/#{user_id}.json", options, headers end
Get a User by id
@note Called get_user
because of the potential confusion with GET /users.json
@param id [#to_s] id of the User @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersidjson
# File lib/platforms/yammer/api/users.rb, line 41 def get_user id, options={}, headers={} @connection.get "users/#{id}.json", options, headers end
Get Users
@note Called get_users
because of the potential confusion with GET /users/.json
@param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersjson
# File lib/platforms/yammer/api/users.rb, line 18 def get_users options={}, headers={} @connection.get "users.json", options, headers end
Get a Users
in a Group @param group_id [#to_s] id of the Group @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersin_groupidjson
# File lib/platforms/yammer/api/users.rb, line 62 def in_group group_id, options={}, headers={} @connection.get "users/in_group/#{group_id}.json", options, headers end
Get Users
who have liked a Message @param message_id [#to_s] id of the Message @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersliked_messagemessage_idjson
# File lib/platforms/yammer/api/users.rb, line 72 def liked_message message_id, options={}, headers={} @connection.get "users/liked_message/#{message_id}.json", options, headers end
Create a new User (verified admins only) @param body [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersjson-1
# File lib/platforms/yammer/api/users.rb, line 81 def post body=nil, headers={} @connection.post "users.json", body, headers end
Update an existing User (verified admins only) @param user_id [#to_s] the id of the User to update @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/usersidjson-1
# File lib/platforms/yammer/api/users.rb, line 91 def put user_id, options={}, headers={} @connection.put "users/#{user_id}.json", options, headers end