Skip to content

Commit

Permalink
Merge pull request #153 from readthedocs/document-jsonp
Browse files Browse the repository at this point in the history
Add basic docs for the JSONP endpoint for users
  • Loading branch information
ericholscher committed Jul 1, 2020
2 parents 3a95073 + a7d0574 commit cb6c2a4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions adserver/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ class AdDecisionView(GeoIpMixin, APIView):
Supports the same parameters as via POST with the following changes:
:<json string div_ids: A ``|`` delimited string of on-page ids.
The number and order must correspond to the ``ad_types``
:<json string ad_types: A ``|`` delimited string of ad types.
The number and order must correspond to the ``div_ids``.
:<json string priorities: An optional ``|`` delimited string of priorities for different ad types.
The number and order matter, applying to ``div_ids`` and ``ad_types``.
An example::
{
"ad_types": "readthedocs-fixed-footer|readthedocs-sidebar",
"div_ids": "text-div|image-div"
"priorities": "3|5"
}
* The publisher must be explicitly permitted to allow unauthenticated requests
* Supports an optional parameter ``format=jsonp`` to signify a JSONP request
* Supports an optional parameter ``callback``
Expand Down

0 comments on commit cb6c2a4

Please sign in to comment.