Class: Svix::Client
- Inherits:
-
Object
- Object
- Svix::Client
- Defined in:
- lib/svix/svix.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#background_task ⇒ Object
Returns the value of attribute background_task.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#health ⇒ Object
Returns the value of attribute health.
-
#ingest ⇒ Object
Returns the value of attribute ingest.
-
#integration ⇒ Object
Returns the value of attribute integration.
-
#message ⇒ Object
Returns the value of attribute message.
-
#message_attempt ⇒ Object
Returns the value of attribute message_attempt.
-
#operational_webhook ⇒ Object
Returns the value of attribute operational_webhook.
-
#operational_webhook_endpoint ⇒ Object
Returns the value of attribute operational_webhook_endpoint.
-
#statistics ⇒ Object
Returns the value of attribute statistics.
Instance Method Summary collapse
-
#initialize(auth_token, options = SvixOptions.new) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(auth_token, options = SvixOptions.new) ⇒ Client
Returns a new instance of Client.
30 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 |
# File 'lib/svix/svix.rb', line 30 def initialize(auth_token, = SvixOptions.new) region = auth_token.split(".").last if region == "us" regional_url = "https://api.us.svix.com" elsif region == "eu" regional_url = "https://api.eu.svix.com" elsif region == "in" regional_url = "https://api.in.svix.com" elsif region == "ca" regional_url = "https://api.ca.svix.com" elsif region == "au" regional_url = "https://api.au.svix.com" else regional_url = "https://api.svix.com" end uri = URI(.server_url || regional_url) api_client = SvixHttpClient.new(auth_token, uri) @application = Application.new(api_client) @authentication = Authentication.new(api_client) @background_task = BackgroundTask.new(api_client) @endpoint = Endpoint.new(api_client) @environment = Environment.new(api_client) @event_type = EventType.new(api_client) @health = Health.new(api_client) @ingest = Ingest.new(api_client) @integration = Integration.new(api_client) @message = Message.new(api_client) @message_attempt = MessageAttempt.new(api_client) @operational_webhook = OperationalWebhook.new(api_client) @operational_webhook_endpoint = OperationalWebhookEndpoint.new(api_client) @statistics = Statistics.new(api_client) end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
15 16 17 |
# File 'lib/svix/svix.rb', line 15 def application @application end |
#authentication ⇒ Object
Returns the value of attribute authentication.
16 17 18 |
# File 'lib/svix/svix.rb', line 16 def authentication @authentication end |
#background_task ⇒ Object
Returns the value of attribute background_task.
17 18 19 |
# File 'lib/svix/svix.rb', line 17 def background_task @background_task end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
18 19 20 |
# File 'lib/svix/svix.rb', line 18 def endpoint @endpoint end |
#environment ⇒ Object
Returns the value of attribute environment.
19 20 21 |
# File 'lib/svix/svix.rb', line 19 def environment @environment end |
#event_type ⇒ Object
Returns the value of attribute event_type.
20 21 22 |
# File 'lib/svix/svix.rb', line 20 def event_type @event_type end |
#health ⇒ Object
Returns the value of attribute health.
21 22 23 |
# File 'lib/svix/svix.rb', line 21 def health @health end |
#ingest ⇒ Object
Returns the value of attribute ingest.
22 23 24 |
# File 'lib/svix/svix.rb', line 22 def ingest @ingest end |
#integration ⇒ Object
Returns the value of attribute integration.
23 24 25 |
# File 'lib/svix/svix.rb', line 23 def integration @integration end |
#message ⇒ Object
Returns the value of attribute message.
24 25 26 |
# File 'lib/svix/svix.rb', line 24 def @message end |
#message_attempt ⇒ Object
Returns the value of attribute message_attempt.
25 26 27 |
# File 'lib/svix/svix.rb', line 25 def @message_attempt end |
#operational_webhook ⇒ Object
Returns the value of attribute operational_webhook.
26 27 28 |
# File 'lib/svix/svix.rb', line 26 def operational_webhook @operational_webhook end |
#operational_webhook_endpoint ⇒ Object
Returns the value of attribute operational_webhook_endpoint.
27 28 29 |
# File 'lib/svix/svix.rb', line 27 def operational_webhook_endpoint @operational_webhook_endpoint end |
#statistics ⇒ Object
Returns the value of attribute statistics.
28 29 30 |
# File 'lib/svix/svix.rb', line 28 def statistics @statistics end |