Class: BombBomb::ListsApi
- Inherits:
-
Object
- Object
- BombBomb::ListsApi
- Defined in:
- lib/bombbomb/api/lists_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_new_list(list_name, opts = {}) ⇒ nil
Add list.
-
#add_new_list_with_http_info(list_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add list.
-
#clear_list(list_id, opts = {}) ⇒ nil
Clear Contacts from List Clears all contacts from a list.
-
#clear_list_with_http_info(list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear Contacts from List Clears all contacts from a list.
-
#copy_list_contacts(from_list_id, list_id, opts = {}) ⇒ nil
Copy All Contacts from a List Copy all contacts from a list.
-
#copy_list_contacts_with_http_info(from_list_id, list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy All Contacts from a List Copy all contacts from a list.
-
#get_all_lists(opts = {}) ⇒ nil
Get all Lists Get all the lists for a specific user.
-
#get_all_lists_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get all Lists Get all the lists for a specific user.
-
#initialize(api_client = ApiClient.default) ⇒ ListsApi
constructor
A new instance of ListsApi.
-
#suppress_all_in_list(list_id, opts = {}) ⇒ nil
Suppress All Contacts from List Suppresses all contacts in a list.
-
#suppress_all_in_list_with_http_info(list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Suppress All Contacts from List Suppresses all contacts in a list.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/bombbomb/api/lists_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_new_list(list_name, opts = {}) ⇒ nil
Add list. Add a list to the users account.
28 29 30 31 |
# File 'lib/bombbomb/api/lists_api.rb', line 28 def add_new_list(list_name, opts = {}) add_new_list_with_http_info(list_name, opts) return nil end |
#add_new_list_with_http_info(list_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add list. Add a list to the users account.
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 76 |
# File 'lib/bombbomb/api/lists_api.rb', line 38 def add_new_list_with_http_info(list_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ListsApi.add_new_list ..." end # verify the required parameter 'list_name' is set if @api_client.config.client_side_validation && list_name.nil? fail ArgumentError, "Missing the required parameter 'list_name' when calling ListsApi.add_new_list" end # resource path local_var_path = "/lists/" # query parameters query_params = {} # header parameters 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/x-www-form-urlencoded']) # form parameters form_params = {} form_params["listName"] = list_name # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListsApi#add_new_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clear_list(list_id, opts = {}) ⇒ nil
Clear Contacts from List Clears all contacts from a list.
83 84 85 86 |
# File 'lib/bombbomb/api/lists_api.rb', line 83 def clear_list(list_id, opts = {}) clear_list_with_http_info(list_id, opts) return nil end |
#clear_list_with_http_info(list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear Contacts from List Clears all contacts from a list.
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 130 |
# File 'lib/bombbomb/api/lists_api.rb', line 93 def clear_list_with_http_info(list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ListsApi.clear_list ..." end # verify the required parameter 'list_id' is set if @api_client.config.client_side_validation && list_id.nil? fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.clear_list" end # resource path local_var_path = "/lists/{listId}/clear".sub('{' + 'listId' + '}', list_id.to_s) # query parameters query_params = {} # header parameters 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListsApi#clear_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#copy_list_contacts(from_list_id, list_id, opts = {}) ⇒ nil
Copy All Contacts from a List Copy all contacts from a list.
138 139 140 141 |
# File 'lib/bombbomb/api/lists_api.rb', line 138 def copy_list_contacts(from_list_id, list_id, opts = {}) copy_list_contacts_with_http_info(from_list_id, list_id, opts) return nil end |
#copy_list_contacts_with_http_info(from_list_id, list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy All Contacts from a List Copy all contacts from a list.
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 186 187 188 189 190 191 |
# File 'lib/bombbomb/api/lists_api.rb', line 149 def copy_list_contacts_with_http_info(from_list_id, list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ListsApi.copy_list_contacts ..." end # verify the required parameter 'from_list_id' is set if @api_client.config.client_side_validation && from_list_id.nil? fail ArgumentError, "Missing the required parameter 'from_list_id' when calling ListsApi.copy_list_contacts" end # verify the required parameter 'list_id' is set if @api_client.config.client_side_validation && list_id.nil? fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.copy_list_contacts" end # resource path local_var_path = "/lists/{listId}/copy".sub('{' + 'listId' + '}', list_id.to_s) # query parameters query_params = {} # header parameters 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/x-www-form-urlencoded']) # form parameters form_params = {} form_params["fromListId"] = from_list_id # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListsApi#copy_list_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_lists(opts = {}) ⇒ nil
Get all Lists Get all the lists for a specific user.
197 198 199 200 |
# File 'lib/bombbomb/api/lists_api.rb', line 197 def get_all_lists(opts = {}) get_all_lists_with_http_info(opts) return nil end |
#get_all_lists_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get all Lists Get all the lists for a specific user.
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/bombbomb/api/lists_api.rb', line 206 def get_all_lists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ListsApi.get_all_lists ..." end # resource path local_var_path = "/lists/" # query parameters query_params = {} # header parameters 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListsApi#get_all_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#suppress_all_in_list(list_id, opts = {}) ⇒ nil
Suppress All Contacts from List Suppresses all contacts in a list.
246 247 248 249 |
# File 'lib/bombbomb/api/lists_api.rb', line 246 def suppress_all_in_list(list_id, opts = {}) suppress_all_in_list_with_http_info(list_id, opts) return nil end |
#suppress_all_in_list_with_http_info(list_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Suppress All Contacts from List Suppresses all contacts in a list.
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/bombbomb/api/lists_api.rb', line 256 def suppress_all_in_list_with_http_info(list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ListsApi.suppress_all_in_list ..." end # verify the required parameter 'list_id' is set if @api_client.config.client_side_validation && list_id.nil? fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.suppress_all_in_list" end # resource path local_var_path = "/lists/{listId}/suppress".sub('{' + 'listId' + '}', list_id.to_s) # query parameters query_params = {} # header parameters 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListsApi#suppress_all_in_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |