forked from asterisk/ari-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request asterisk#2 from asterisk/mwi
Add Mailboxes resource
- Loading branch information
Showing
4 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"_copyright": "Copyright (C) 2013, Digium, Inc.", | ||
"_author": "Jonathan Rose <[email protected]>", | ||
"apiVersion": "0.0.0-test", | ||
"swaggerVersion": "1.1", | ||
"basePath": "http://ari.py/ari", | ||
"resourcePath": "/api-docs/mailboxes.{format}", | ||
"apis": [ | ||
{ | ||
"path": "/mailboxes", | ||
"description": "Mailboxes", | ||
"operations": [ | ||
{ | ||
"httpMethod": "GET", | ||
"summary": "List all mailboxes.", | ||
"nickname": "list", | ||
"responseClass": "List[Mailbox]" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "/mailboxes/{mailboxName}", | ||
"description": "Mailbox state", | ||
"operations": [ | ||
{ | ||
"httpMethod": "GET", | ||
"summary": "Retrieve the current state of a mailbox.", | ||
"nickname": "get", | ||
"responseClass": "Mailbox", | ||
"parameters": [ | ||
{ | ||
"name": "mailboxName", | ||
"description": "Name of the mailbox", | ||
"paramType": "path", | ||
"required": true, | ||
"allowMultiple": false, | ||
"dataType": "string" | ||
} | ||
], | ||
"errorResponses": [ | ||
{ | ||
"code": 404, | ||
"reason": "Mailbox not found" | ||
} | ||
] | ||
}, | ||
{ | ||
"httpMethod": "PUT", | ||
"summary": "Change the state of a mailbox. (Note - implicitly creates the mailbox).", | ||
"nickname": "update", | ||
"responseClass": "void", | ||
"parameters": [ | ||
{ | ||
"name": "mailboxName", | ||
"description": "Name of the mailbox", | ||
"paramType": "path", | ||
"required": true, | ||
"allowMultiple": false, | ||
"dataType": "string" | ||
}, | ||
{ | ||
"name": "oldMessages", | ||
"description": "Count of old messages in the mailbox", | ||
"paramType": "query", | ||
"required": true, | ||
"allowMultiple": false, | ||
"dataType": "int" | ||
}, | ||
{ | ||
"name": "newMessages", | ||
"description": "Count of new messages in the mailbox", | ||
"paramType": "query", | ||
"required": true, | ||
"allowMultiple": false, | ||
"dataType": "int" | ||
} | ||
], | ||
"errorResponses": [ | ||
{ | ||
"code": 404, | ||
"reason": "Mailbox not found" | ||
} | ||
] | ||
}, | ||
{ | ||
"httpMethod": "DELETE", | ||
"summary": "Destroy a mailbox.", | ||
"nickname": "delete", | ||
"responseClass": "void", | ||
"parameters": [ | ||
{ | ||
"name": "mailboxName", | ||
"description": "Name of the mailbox", | ||
"paramType": "path", | ||
"required": true, | ||
"allowMultiple": false, | ||
"dataType": "string" | ||
} | ||
], | ||
"errorResponses": [ | ||
{ | ||
"code": 404, | ||
"reason": "Mailbox not found" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"models": { | ||
"Mailbox": { | ||
"id": "Mailbox", | ||
"description": "Represents the state of a mailbox.", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Name of the mailbox.", | ||
"required": true | ||
}, | ||
"old_messages": { | ||
"type": "int", | ||
"description": "Count of old messages in the mailbox.", | ||
"required": true | ||
}, | ||
"new_messages": { | ||
"type": "int", | ||
"description": "Count of new messages in the mailbox.", | ||
"required": true | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters