Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Python
  • JavaScript
  • Perl
  • format such that additional language support is not difficult.

...

Library

...

Suggestions have included the following. Still open for debate. Erin wishes we could use the same name for libraries written in multiple languages.

  • AsteriskPy
  • AsterPy, AstraPy
  • AsteRESTpy
  • PAsteREST
  • AsteREST

Library structure

  • Top-level library or object or structure
    • Asterisk.get_info()
    • Endpoints.get_endpoints()
    • Channels.get_channels()
    • Bridges.get_bridges()
    • Recordings.get_recordings()
    • Endpoint.get_endpoint(id)
    • Channel.get_channel(id)
    • Bridges.get_bridge(id)
    • Recordings.get_recording(id)
    • add_event_handler(event_name, function)
    • remove_event_handler(event_name, function)
  • Each object in the Swagger resource files
    • Methods listed therein
    • Relevant object attribute getters
    • add_event_handler(event_name, function)
    • remove_event_handler(event_name, function)

Events/messages/callbacks/pub-sub

...

Library API

Python

  • Methods should return the object specified in the Swagger documentation or throw an appropriate exception.

    Perl

  • Methods should return the object specified in the Swagger documentation if the call succeeds. Undecided as of yet how error-handling will take place. We will avoid setting an error variable which may be over written by subsequent or parallel calls.

    JavaScript

  • Methods should pass the object specified in the Swagger documentation into a success handler. Fatal errors will cause an exception to be throw. Non-fatal errors will call an error handler.

Project location and directory structure

...