Class: SendGridWebApi::Modules::InvalidEmail
- Defined in:
- lib/web_api/invalid_emails.rb
Constant Summary collapse
- INVALID_EMAILS_URL =
"suppression/invalid_emails"
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #base_url ⇒ Object
-
#delete(options = {}) ⇒ Object
This method will delete all invalid_emails from the given email.
-
#get(options = {}) ⇒ Object
Retrieve a list of all invalid email addresses.
Methods included from SendGridWebApi::Modules
#apikey, #blocks, #bounces, #event_notification, #invalid_emails, #mail, #parse_email, #profile, #spam, #stats, #sub_user, #unsubscribes
Methods inherited from Base
#builder_options, #initialize, #make_request_url, #query_api, #query_delete_api, #query_patch_api, #query_post_api, #query_post_json_api, #session, #to_query
Constructor Details
This class inherits a constructor from SendGridWebApi::Base
Instance Method Details
#base_url ⇒ Object
5 6 7 |
# File 'lib/web_api/invalid_emails.rb', line 5 def base_url "https://api.sendgrid.com/v3/" end |
#delete(options = {}) ⇒ Object
This method will delete all invalid_emails from the given email
17 18 19 20 21 |
# File 'lib/web_api/invalid_emails.rb', line 17 def delete = {} delete_url = INVALID_EMAILS_URL+"/#{[:email]}" .delete(:email) query_delete_api(delete_url, ()) end |
#get(options = {}) ⇒ Object
Retrieve a list of all invalid email addresses. You can use the offset and limit parameters to retrieve a custom number of results. You can use the start_time and end_time parameters to filter by time frames.
12 13 14 |
# File 'lib/web_api/invalid_emails.rb', line 12 def get = {} query_api(INVALID_EMAILS_URL, ()) end |