Wordcount API

How to use the wordcount API to update your wordcount

  1. Create a hashable string comprised of your secret key + your user name + your new wordcount (as a string)
    Example: if your key is 'abc123' and your user name is 'annabelle' an your new wordcount is 23000, then your hashable string is 'abc123annabelle23000'
  2. Create an sha1 hash of the hashable string
    In this case 'abc123annabelle23000' has an sha1 hash of: 59d8fb8ba284cf3e4cd671b2df848e2bb9251074
  3. Send the sha1 hash, user name, and new wordcount to http://nanowrimo.org/api/wordcount as a PUT request using the following keys :
    'hash' for the sha1 hash, 'name' for your user name, 'wordcount' for your wordcount
    So in our example with annabelle we would send
    hash=59d8fb8ba284cf3e4cd671b2df848e2bb9251074
    name=annabelle
    wordcount=23000