-
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.
- Loading branch information
Trevor
committed
Jun 1, 2015
1 parent
bfbb9ff
commit 3a4eefb
Showing
3 changed files
with
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
Opt outs http api | ||
================= | ||
|
||
.. http:get:: /optouts/(str:address_type)/(str:address) | ||
**Request** | ||
|
||
.. sourcecode:: http | ||
|
||
GET /optouts/msisdn/"+273121100" | ||
Host: example.com | ||
Accept: application/json | ||
|
||
**Response** | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Vary: accept | ||
Content-type: application/json | ||
|
||
[ | ||
{ | ||
"id": 2468, | ||
"address-type": "msisdn", | ||
"address": "+273121100" | ||
}, | ||
{ | ||
"id": 8642, | ||
"address-type": "twitter", | ||
"address": "@vumi-app" | ||
} | ||
] | ||
|
||
:statuscode 200: no error | ||
:statuscode 404: there's no opt out for this contact | ||
|
||
.. http:put:: /optouts/(str:address_type)/(str:address) | ||
**Request** | ||
|
||
.. sourcecode:: http | ||
|
||
PUT /optouts/facebook/"@fb-app" | ||
Host: example.com | ||
Accept: application/json | ||
|
||
{"address-type": "facebook", "address": "@fb-app"} | ||
|
||
**Response** | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Vary: accept | ||
Content-type: application/json | ||
|
||
{..., "address": "@fb-app", ""address-type": "facebook", ...} | ||
|
||
.. http:delete:: /optouts/(str:address_type)/01dfae6e5d4d90d9892622325959afbe | ||
**Request** | ||
|
||
.. sourcecode:: http | ||
|
||
DELETE /optouts/twitter/01dfae6e5d4d90d9892622325959afbe | ||
Host: axample.com | ||
Accept: application/json | ||
|
||
**Response** | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Vary: accept | ||
Content-type: application/json | ||
|
||
{..., "id": "68e456a0c8da43bea162839a9a1669c0", ...} |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ Contents: | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
http_api | ||
|
||
|
||
Indices and tables | ||
|
3a4eefb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hodgestar ready for review