Class: Pushover::Sounds

Inherits:
Object
  • Object
show all
Defined in:
lib/pushover/sounds.rb

Overview

Sounds provides operations for the Sounds API.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Sounds

Returns a new instance of Sounds.



4
5
6
# File 'lib/pushover/sounds.rb', line 4

def initialize(client)
  @client = client
end

Instance Method Details

#getResponse

Retrieve built-in and application-account custom sounds.

Returns:

  • (Response)

    the Pushover API response



10
11
12
13
14
15
16
# File 'lib/pushover/sounds.rb', line 10

def get
  response = @client.connection.get(
    path:  '/1/sounds.json',
    query: { token: @client.token }
  )
  Response.create_from_excon_response(response)
end