Module: Miniphonic::Info
Instance Method Summary collapse
-
#algorithms ⇒ Object
Returns a hash where the keys are audio processing algorithms and the values option/info hashes.
- #files_on(uuid) ⇒ Object
- #get_info(name) ⇒ Object
-
#info ⇒ Object
Returns a hash with the combined data of output_files, service_types, status_codes, algorithms as well as all known file endings (those are all keys).
-
#output_files ⇒ Object
Returns a hash of all available output formats (keys) and their metadata (values).
-
#service_types ⇒ Object
Returns a hash where the keys are outgoing services.
-
#services ⇒ Object
Returns an array of hashes like this: { “outgoing”: true, “display_name”: “Mr. Derpson”, “uuid”: “h8DesucEK6mepmyxtW83MY”, “incoming”: true, “type”: “dropbox”, “email”: “[email protected]” }.
-
#status_codes ⇒ Object
Returns a dictionary of production status codes.
-
#user_info ⇒ Object
Returns a hash of user information.
Methods included from Helpers
#delete_from_server, #from_server, #handle_response, #path_to_payload, #server_error, #to_server
Instance Method Details
#algorithms ⇒ Object
Returns a hash where the keys are audio processing algorithms and the values option/info hashes
28 29 30 |
# File 'lib/miniphonic/info.rb', line 28 def algorithms get_info :algorithms end |
#files_on(uuid) ⇒ Object
57 58 59 60 |
# File 'lib/miniphonic/info.rb', line 57 def files_on(uuid) response = from_server "api/service/#{ uuid }/ls.json" response.data end |
#get_info(name) ⇒ Object
62 63 64 65 |
# File 'lib/miniphonic/info.rb', line 62 def get_info(name) response = from_server "/api/info/#{ name }.json" response.data end |
#info ⇒ Object
Returns a hash with the combined data of output_files, service_types, status_codes, algorithms as well as all known file endings (those are all keys)
52 53 54 55 |
# File 'lib/miniphonic/info.rb', line 52 def info response = from_server "api/info.json" response.data end |
#output_files ⇒ Object
Returns a hash of all available output formats (keys) and their metadata (values)
34 35 36 |
# File 'lib/miniphonic/info.rb', line 34 def output_files get_info :output_files end |
#service_types ⇒ Object
Returns a hash where the keys are outgoing services
22 23 24 |
# File 'lib/miniphonic/info.rb', line 22 def service_types get_info :service_types end |
#services ⇒ Object
Returns an array of hashes like this:
{
"outgoing": true,
"display_name": "Mr. Derpson",
"uuid": "h8DesucEK6mepmyxtW83MY",
"incoming": true,
"type": "dropbox",
"email": "[email protected]"
}
16 17 18 19 |
# File 'lib/miniphonic/info.rb', line 16 def services response = from_server "/api/services.json" response.data end |
#status_codes ⇒ Object
Returns a dictionary of production status codes
39 40 41 |
# File 'lib/miniphonic/info.rb', line 39 def status_codes get_info :production_status end |
#user_info ⇒ Object
Returns a hash of user information
44 45 46 47 |
# File 'lib/miniphonic/info.rb', line 44 def user_info response = from_server "api/user.json" response.data end |