Push a button on one Photon to turn on the LED on a second Photon?

Its more than that, but its the concept.

I have one photon which is currently doing a bunch of things the way it should, I have created some functions so that I can control it from a web page. For this example it turns on and off an LED.

I would like to use another Photon with a bunch of wired buttons (instead of the web page) to control the first one. I am looking for the best way to do this…

Is there a simple way to call functions on one core from another?
Should I create a webhook, and call this?
Can do a post request from the second photon directly to the first?

I think this should be simple, just not sure the best place to start.


The easiest would be Particle.publish() on the sender and Particle.subscribe() on the receiver.