Looks like the Great Firewall or something like it is preventing you from completely loading www.skritter.com because it is hosted on Google App Engine, which is periodically blocked. Try instead our mirror:

legacy.skritter.cn

This might also be caused by an internet filter, such as SafeEyes. If you have such a filter installed, try adding appspot.com to the list of allowed domains.

VocabListSection Endpoints

This complements the VocabList endpoints. Use this if you want to:

  • Get only a specific section.
  • Edit the words in a list.
GET http://beta.skritter.com/api/v0/vocablists/(id)/sections/(id)

Fetches a single section within a list.

Parameters

  • fields optional list of strings, comma delimited. Only returns the VocabListSection properties listed.

Response

PUT http://beta.skritter.com/api/v0/vocablists/(id)/sections/(id)

Modifies a single section within a list. Can only be used to modify the section rows, so the only property used is rows.

Input

One VocabListSection dictionary, specifying the VocabListRows for the section.

Request

Same as GET

Response

Same as GET

Example: Editing Sections

Goal:

Given a VocabListSection id, add 上 to the end.

Solution:

Fetch the section, add the word, and use PUT to return the result.


    # no special GET parameters needed
    params = {
        'gzip': False
    }
    url = 'http://beta.skritter.com/api/v0/vocablists/%s/sections/%s'
    url = url % vocab_list_id, vocab_list_section_id

    # fetch the section
    response = client.get(url, params)
    response = json.loads(response.content)
    section = response['VocabListSection']

    # add the VocabListRow
    section['rows'].append({
        'vocabId': 'ja-上-0', # use the Vocab endpoint to get this id
    })

    # save changes
    data = json.dumps(section)
    client.put(url, params, data=data)