From 6ba84d7ab9af33d933563bc2b465158f7255a514 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Wed, 8 May 2013 22:10:50 -0700 Subject: [PATCH] /dev/api: Add an explanation of modhashes to the overview. --- r2/r2/lib/validator/validator.py | 2 +- r2/r2/public/static/css/reddit.less | 4 ++++ r2/r2/templates/apihelp.html | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/validator/validator.py b/r2/r2/lib/validator/validator.py index 8a1352ff5..ac5e3c733 100644 --- a/r2/r2/lib/validator/validator.py +++ b/r2/r2/lib/validator/validator.py @@ -762,7 +762,7 @@ class VModhash(Validator): def param_docs(self): return { - self.param: 'a modhash', + self.param: 'a [modhash](#modhashes)', } class VVotehash(Validator): diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index 580248792..0d64120ea 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -5976,6 +5976,10 @@ body:not(.gold) .allminus-link { } .api-help .contents .overview { + h3 { + margin-top: 1.5em; + } + p { margin: .8em 0; } diff --git a/r2/r2/templates/apihelp.html b/r2/r2/templates/apihelp.html index af213738a..6cd65e8e4 100644 --- a/r2/r2/templates/apihelp.html +++ b/r2/r2/templates/apihelp.html @@ -132,6 +132,14 @@

overview

+

modhashes

+ +

A modhash is a token that the reddit API requires to help prevent CSRF. Modhashes can be + obtained via the /api/me.json call + or in the Listing structures of several other API + calls.

+

fullnames

A fullname is a combination of a thing's type