Spectrum API - Client JS samples