Imediava's Blog

Just another site

Create a new list-item on google sites api

Here’s a quick explanation for those who are using the google sites api but can’t find the way to create a new list-item in an existing listpage.

Generally the problem is that the documentation seems to point to “CreatePage” as the method to use to create any kind of item. However list-item is one of the “more complex” kinds described in the following paragraph :

To create more complex entry kind that are populated on creation (e.g. a listpage with column headings), you’ll need to create the manually, fill in the properties of interest, and call client.Post().

What means that for creating a new list-item we need to first create the entry manually and then “Post” it:

# Create new_entry
client.Post(new_entry, '/feeds/content/')

It’s all about reading the fine print..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: