Forum

Thread tagged as: Question

Examples of creating collection items programatically

Hi all,

I have a requirement to integrate with the instagram API via a schedule task that needs to take the information and transform it into a collection item that exists on the site. i found this post that outlines something i could potentially do.

https://forum.grabaperch.com/forum/03-05-2015-creating-collection-items-programmatically

Not sure if there is now a public API to do this sort of thing, but if not is there any examples on how the data should be passed into the, i am not sure how to structure the data part of the input (the portion that would populate the itemJSON column in the collection_items table in the database) specifically:

  • is it just a PHP array that matches the json items that are already in the database?
  • how can you deal with the markdown field programatically as the value has the structure
"body":{"_flang":"markdown","raw":"Content","processed":"<p>Content\/p>"}

Any input would be greatly appreciated,

Thanks,

Rob

Roberto Modica

Roberto Modica 0 points

  • 4 years ago

Roberto, Perch has an API for Runway import into collection. Are you planning Perch or Perch Runway for this project?

Hi Robert,

Its Runway, do you mean this?

https://perchrunway.com/blog/2017-02-10-importing-content-into-collections

If so, thanks for direction me to the right place :)

Thanks,

Rob

Roberto, Looks like your on the right path...

Yes, Runway... often referred to as Perch Runway

Happy Coding :)