Plex Companion

Is there any API documentation and/or working samples ? I would like to change PlexConnect (a non-official Plex client) to include Plex Companion functionality.