Class: Zavudev::Resources::URLs
- Inherits:
-
Object
- Object
- Zavudev::Resources::URLs
- Defined in:
- lib/zavudev/resources/urls.rb,
sig/zavudev/resources/urls.rbs
Instance Method Summary collapse
-
#escalate(url_id, reason:, request_options: {}) ⇒ Zavudev::Models::URLEscalateResponse
Request manual review of a rejected URL.
-
#initialize(client:) ⇒ URLs
constructor
private
A new instance of URLs.
-
#list_verified(cursor: nil, limit: nil, status: nil, request_options: {}) ⇒ Zavudev::Internal::Cursor<Zavudev::Models::VerifiedURL>
List URLs that have been verified for this project.
-
#retrieve_details(url_id, request_options: {}) ⇒ Zavudev::Models::URLRetrieveDetailsResponse
Get details of a specific verified URL.
-
#submit_for_verification(url:, request_options: {}) ⇒ Zavudev::Models::URLSubmitForVerificationResponse
Submit a URL for verification.
Constructor Details
#initialize(client:) ⇒ URLs
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of URLs.
109 110 111 |
# File 'lib/zavudev/resources/urls.rb', line 109 def initialize(client:) @client = client end |
Instance Method Details
#escalate(url_id, reason:, request_options: {}) ⇒ Zavudev::Models::URLEscalateResponse
Request manual review of a rejected URL. Only URLs in 'rejected' status can be escalated; the status then moves to 'escalated'.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/zavudev/resources/urls.rb', line 20 def escalate(url_id, params) parsed, = Zavudev::URLEscalateParams.dump_request(params) @client.request( method: :post, path: ["v1/urls/%1$s/escalate", url_id], body: parsed, model: Zavudev::Models::URLEscalateResponse, options: ) end |
#list_verified(cursor: nil, limit: nil, status: nil, request_options: {}) ⇒ Zavudev::Internal::Cursor<Zavudev::Models::VerifiedURL>
List URLs that have been verified for this project.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/zavudev/resources/urls.rb', line 46 def list_verified(params = {}) parsed, = Zavudev::URLListVerifiedParams.dump_request(params) query = Zavudev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/urls", query: query, page: Zavudev::Internal::Cursor, model: Zavudev::VerifiedURL, options: ) end |
#retrieve_details(url_id, request_options: {}) ⇒ Zavudev::Models::URLRetrieveDetailsResponse
Get details of a specific verified URL.
69 70 71 72 73 74 75 76 |
# File 'lib/zavudev/resources/urls.rb', line 69 def retrieve_details(url_id, params = {}) @client.request( method: :get, path: ["v1/urls/%1$s", url_id], model: Zavudev::Models::URLRetrieveDetailsResponse, options: params[:request_options] ) end |
#submit_for_verification(url:, request_options: {}) ⇒ Zavudev::Models::URLSubmitForVerificationResponse
Submit a URL for verification. URLs are automatically checked against Google Web Risk API. Safe URLs are auto-approved, malicious URLs are blocked. URL shorteners (bit.ly, t.co, etc.) are always blocked.
Important: All SMS and Email messages containing URLs require those URLs to be verified before the message can be sent. This endpoint allows pre-verification of URLs.
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/zavudev/resources/urls.rb', line 95 def submit_for_verification(params) parsed, = Zavudev::URLSubmitForVerificationParams.dump_request(params) @client.request( method: :post, path: "v1/urls", body: parsed, model: Zavudev::Models::URLSubmitForVerificationResponse, options: ) end |