[asterisk-commits] dlee: trunk r386462 - in /trunk: res/stasis_http/ rest-api-templates/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 24 16:47:07 CDT 2013


Author: dlee
Date: Wed Apr 24 16:47:03 2013
New Revision: 386462

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386462
Log:
Document JSON models in resource_*.h

Modified:
    trunk/res/stasis_http/resource_asterisk.h
    trunk/res/stasis_http/resource_bridges.h
    trunk/res/stasis_http/resource_channels.h
    trunk/res/stasis_http/resource_endpoints.h
    trunk/res/stasis_http/resource_events.h
    trunk/res/stasis_http/resource_playback.h
    trunk/res/stasis_http/resource_recordings.h
    trunk/res/stasis_http/resource_sounds.h
    trunk/rest-api-templates/stasis_http_resource.h.mustache

Modified: trunk/res/stasis_http/resource_asterisk.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_asterisk.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_asterisk.h (original)
+++ trunk/res/stasis_http/resource_asterisk.h Wed Apr 24 16:47:03 2013
@@ -53,4 +53,10 @@
  */
 void stasis_http_get_asterisk_info(struct ast_variable *headers, struct ast_get_asterisk_info_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * AsteriskInfo
+ */
+
 #endif /* _ASTERISK_RESOURCE_ASTERISK_H */

Modified: trunk/res/stasis_http/resource_bridges.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_bridges.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_bridges.h (original)
+++ trunk/res/stasis_http/resource_bridges.h Wed Apr 24 16:47:03 2013
@@ -151,4 +151,12 @@
  */
 void stasis_http_record_bridge(struct ast_variable *headers, struct ast_record_bridge_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Bridge
+ * - channels: List[string] (required)
+ * - bridgeType: string (required)
+ */
+
 #endif /* _ASTERISK_RESOURCE_BRIDGES_H */

Modified: trunk/res/stasis_http/resource_channels.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_channels.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_channels.h (original)
+++ trunk/res/stasis_http/resource_channels.h Wed Apr 24 16:47:03 2013
@@ -241,4 +241,34 @@
  */
 void stasis_http_record_channel(struct ast_variable *headers, struct ast_record_channel_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Originated
+ * DialplanCEP
+ * - priority: long (required)
+ * - exten: string (required)
+ * - context: string (required)
+ * Channel
+ * - accountcode: string (required)
+ * - linkedid: string (required)
+ * - name: string (required)
+ * - userfield: string (required)
+ * - caller: CallerID (required)
+ * - creationtime: Date (required)
+ * - state: string (required)
+ * - parkinglot: string (required)
+ * - peeraccount: string (required)
+ * - appl: string (required)
+ * - connected: CallerID (required)
+ * - uniqueid: string (required)
+ * - hangupsource: string (required)
+ * - dialplan: DialplanCEP (required)
+ * - data: string (required)
+ * CallerID
+ * - name: string (required)
+ * - number: string (required)
+ * Dialed
+ */
+
 #endif /* _ASTERISK_RESOURCE_CHANNELS_H */

Modified: trunk/res/stasis_http/resource_endpoints.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_endpoints.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_endpoints.h (original)
+++ trunk/res/stasis_http/resource_endpoints.h Wed Apr 24 16:47:03 2013
@@ -66,4 +66,12 @@
  */
 void stasis_http_get_endpoint(struct ast_variable *headers, struct ast_get_endpoint_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Endpoint
+ * - technology: string (required)
+ * - name: string (required)
+ */
+
 #endif /* _ASTERISK_RESOURCE_ENDPOINTS_H */

Modified: trunk/res/stasis_http/resource_events.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_events.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_events.h (original)
+++ trunk/res/stasis_http/resource_events.h Wed Apr 24 16:47:03 2013
@@ -55,4 +55,42 @@
  */
 void stasis_http_event_websocket(struct ast_variable *headers, struct ast_event_websocket_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * DtmfReceived
+ * - digit: string 
+ * - channel: Channel 
+ * BridgeCreated
+ * - bridge: Bridge 
+ * BridgeDestroyed
+ * - bridge: Bridge 
+ * ApplicationReplaced
+ * - application: string 
+ * ChannelLeftBridge
+ * - bridge: Bridge 
+ * - channel: Channel 
+ * StasisStart
+ * - args: List[string] 
+ * - channel_info: Channel 
+ * StasisEnd
+ * - channel_info: Channel 
+ * ChannelStateChange
+ * - channel_info: Channel 
+ * ChannelEnteredBridge
+ * - bridge: Bridge 
+ * - channel: Channel 
+ * Event
+ * - stasis_start: StasisStart 
+ * - channel_entered_bridge: ChannelEnteredBridge 
+ * - channel_left_bridge: ChannelLeftBridge 
+ * - application_replaced: ApplicationReplaced 
+ * - channel_state_change: ChannelStateChange 
+ * - bridge_created: BridgeCreated 
+ * - application: string (required)
+ * - stasis_end: StasisEnd 
+ * - dtmf_received: DtmfReceived 
+ * - bridge_destroyed: BridgeDestroyed 
+ */
+
 #endif /* _ASTERISK_RESOURCE_EVENTS_H */

Modified: trunk/res/stasis_http/resource_playback.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_playback.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_playback.h (original)
+++ trunk/res/stasis_http/resource_playback.h Wed Apr 24 16:47:03 2013
@@ -81,4 +81,11 @@
  */
 void stasis_http_control_playback(struct ast_variable *headers, struct ast_control_playback_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Playback
+ * - id: string (required)
+ */
+
 #endif /* _ASTERISK_RESOURCE_PLAYBACK_H */

Modified: trunk/res/stasis_http/resource_recordings.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_recordings.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_recordings.h (original)
+++ trunk/res/stasis_http/resource_recordings.h Wed Apr 24 16:47:03 2013
@@ -190,4 +190,18 @@
  */
 void stasis_http_unmute_recording(struct ast_variable *headers, struct ast_unmute_recording_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Recording
+ * - id: string (required)
+ * StoredRecording
+ * - durationSeconds: int 
+ * - time: Date 
+ * - id: string (required)
+ * - formats: List[string] (required)
+ * LiveRecording
+ * - id: string (required)
+ */
+
 #endif /* _ASTERISK_RESOURCE_RECORDINGS_H */

Modified: trunk/res/stasis_http/resource_sounds.h
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/resource_sounds.h?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/res/stasis_http/resource_sounds.h (original)
+++ trunk/res/stasis_http/resource_sounds.h Wed Apr 24 16:47:03 2013
@@ -66,4 +66,14 @@
  */
 void stasis_http_get_stored_sound(struct ast_variable *headers, struct ast_get_stored_sound_args *args, struct stasis_http_response *response);
 
+/*
+ * JSON models
+ *
+ * Sound
+ * - lang: string (required)
+ * - text: string 
+ * - id: string (required)
+ * - formats: List[string] (required)
+ */
+
 #endif /* _ASTERISK_RESOURCE_SOUNDS_H */

Modified: trunk/rest-api-templates/stasis_http_resource.h.mustache
URL: http://svnview.digium.com/svn/asterisk/trunk/rest-api-templates/stasis_http_resource.h.mustache?view=diff&rev=386462&r1=386461&r2=386462
==============================================================================
--- trunk/rest-api-templates/stasis_http_resource.h.mustache (original)
+++ trunk/rest-api-templates/stasis_http_resource.h.mustache Wed Apr 24 16:47:03 2013
@@ -64,5 +64,16 @@
 {{/operations}}
 {{/apis}}
 
+/*
+ * JSON models
+ *
+{{#models}}
+ * {{id}}
+{{#properties}}
+ * - {{name}}: {{type}} {{#required}}(required){{/required}}
+{{/properties}}
+{{/models}}
+ */
+
 #endif /* _ASTERISK_RESOURCE_{{name_caps}}_H */
 {{/api_declaration}}




More information about the asterisk-commits mailing list