Class: SmartRecruiters::MessagesApi
- Inherits:
-
Object
- Object
- SmartRecruiters::MessagesApi
- Defined in:
- lib/smart_recruiters/api/messages_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ MessagesApi
constructor
A new instance of MessagesApi.
-
#messages_fetch(candidate_id, opts = {}) ⇒ MessagesView
Fetch messages Search for messages of given candidate.
-
#messages_fetch_with_http_info(candidate_id, opts = {}) ⇒ Array<(MessagesView, Integer, Hash)>
Fetch messages Search for messages of given candidate.
-
#messages_shares_create(opts = {}) ⇒ MessageDetails
Shares new messages on Hireloop with Users, Hiring Teams or Everyone and sends emails.
-
#messages_shares_create_with_http_info(opts = {}) ⇒ Array<(MessageDetails, Integer, Hash)>
Shares new messages on Hireloop with Users, Hiring Teams or Everyone and sends emails.
-
#messages_shares_delete(id, opts = {}) ⇒ nil
Delete a message Delete a message with a given id.
-
#messages_shares_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a message Delete a message with a given id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MessagesApi
Returns a new instance of MessagesApi.
7 8 9 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 7 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#messages_fetch(candidate_id, opts = {}) ⇒ MessagesView
Fetch messages Search for messages of given candidate. Use jobId parameter to filter results to messages only for specific job application. Accessible only for users with ADMINISTRATOR role.
18 19 20 21 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 18 def (candidate_id, opts = {}) data, _status_code, _headers = (candidate_id, opts) data end |
#messages_fetch_with_http_info(candidate_id, opts = {}) ⇒ Array<(MessagesView, Integer, Hash)>
Fetch messages Search for messages of given candidate. Use jobId parameter to filter results to messages only for specific job application. Accessible only for users with ADMINISTRATOR role.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 31 def (candidate_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessagesApi.messages_fetch ...' end # verify the required parameter 'candidate_id' is set if @api_client.config.client_side_validation && candidate_id.nil? fail ArgumentError, "Missing the required parameter 'candidate_id' when calling MessagesApi.messages_fetch" end # resource path local_var_path = '/messages' # query parameters query_params = opts[:query_params] || {} query_params[:'candidateId'] = candidate_id query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil? query_params[:'pageId'] = opts[:'page_id'] if !opts[:'page_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'MessageView' auth_names = opts[:auth_names] || ['key', 'oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MessagesApi#messages_fetch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#messages_shares_create(opts = {}) ⇒ MessageDetails
Shares new messages on Hireloop with Users, Hiring Teams or Everyone and sends emails. How does it work: * In content field, provide a text to be shared. * @-mention users to send them an email * In content field use **@[USER:id]** to mention a User, e.g. @[USER:324132421] * Email responses are added as comments to your update * \#-tag candidates to link updates to their profiles * In content field use #[CANDIDATE:id] to tag a candidate, e.g. #[CANDIDATE:9847954623] * Use shareWith to share a feed update with individuals, hiring teams or everyone * In users field, provide an array of User IDs with which you want to share, e.g. "users": ["12343542356","12343542357"]. * In hiringTeamOf field, provide an array of Job IDs, this will share message with a full hiring team of those jobs, e.g. "hiringTeamOf": ["123423432322","123423432324"]. * everyone flag allows sharing with everyone in a company. If not provided, defaults to false. * openNote flag allows sharing with everyone in a company that has access to the candidate. If not provided, defaults to false
81 82 83 84 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 81 def (opts = {}) data, _status_code, _headers = (opts) data end |
#messages_shares_create_with_http_info(opts = {}) ⇒ Array<(MessageDetails, Integer, Hash)>
Shares new messages on Hireloop with Users, Hiring Teams or Everyone and sends emails. How does it work: * In content field, provide a text to be shared. * @-mention users to send them an email * In content field use **@[USER:id]** to mention a User, e.g. @[USER:324132421] * Email responses are added as comments to your update * \#-tag candidates to link updates to their profiles * In content field use #[CANDIDATE:id] to tag a candidate, e.g. #[CANDIDATE:9847954623] * Use shareWith to share a feed update with individuals, hiring teams or everyone * In users field, provide an array of User IDs with which you want to share, e.g. "users": ["12343542356","12343542357"]. * In hiringTeamOf field, provide an array of Job IDs, this will share message with a full hiring team of those jobs, e.g. "hiringTeamOf": ["123423432322","123423432324"]. * everyone flag allows sharing with everyone in a company. If not provided, defaults to false. * openNote flag allows sharing with everyone in a company that has access to the candidate. If not provided, defaults to false
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 91 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessagesApi.messages_shares_create ...' end # resource path local_var_path = '/messages/shares' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'MessageDetails' auth_names = opts[:auth_names] || ['key', 'oauth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MessagesApi#messages_shares_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#messages_shares_delete(id, opts = {}) ⇒ nil
Delete a message Delete a message with a given id. Deleted message is no longer visible on Hireloop.
135 136 137 138 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 135 def (id, opts = {}) (id, opts) nil end |
#messages_shares_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a message Delete a message with a given id. Deleted message is no longer visible on Hireloop.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/smart_recruiters/api/messages_api.rb', line 145 def (id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessagesApi.messages_shares_delete ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MessagesApi.messages_shares_delete" end # resource path local_var_path = '/messages/shares/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] auth_names = opts[:auth_names] || ['key', 'oauth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: MessagesApi#messages_shares_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |