Collection Save
This API call is used to create or edit Collections within Historypin. Collections are the parent container for Pins, and generally represent a particular theme, place or area of interest that a single person or group of people wish to collaborate around. The same API call is used to create or save a Collection, depending on the parameters used.
URL
To crate a project you access the save.json endpoint without project-path and slug and new_project variable is needed in the post data. http://www.historypin.org/en/api/projects/save.json
To edit a project it needs project-path or project slug. http://www.historypin.org/en/api/api-collection-title/projects/save.json
Postdata
-
new_project (true or blank/not present) - this is only needed when a new project is create otherwise it should not be present or blank
-
title (string)
- short_description (string)
- description (string)
- contact (string) - get in touch information
Timemap Object*
- timemap[lat] (float) - project's center lattitude
- timemap[lng] (float) - project's center longitude
- timemap[range] (int) - range in meters for the project area
Owners Array
This is an array of objects. These objects can consists of just a user id.
Example:
- owners[0][id]:123
- owners[1][id]:234
Premium Features
Here are features for premium projects only
- video_url - direct url to a video source file
- explore_view (map, gallery, hybrid)- changes the defualt state of the explore view
- rss - direct url to an rss
- gallery_sort - defualt sorting in the explore view gallery
- allow_pinning (bool) - wheter non managers can pin to this collection
- about_opened (bool) -
Example Response
{
"success" : true,
"slug" : "...",
"errors" : []
}
Response may contain error:
{
"slug": "",
"errors": [
{ "type" : "title", "message" : "reserved" }
]
}